Created
January 28, 2015 16:59
-
-
Save peko/735a695f2cdd5d4c3b9d to your computer and use it in GitHub Desktop.
Stream to twitch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INRES="2560x1600" | |
OUTRES="640x400" | |
FPS="30" | |
QUAL="slower" #ultrafast,superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo | |
STREAM_KEY=$(cat ~/.twitch_key) # This is your streamkey generated by jtv/twitch found at: http://www.justin.tv/broadcast/adv_other | |
avconv \ | |
-f x11grab -s $INRES -r "$FPS" -i :0.0 \ | |
-f alsa -ac 2 -i pulse \ | |
-vcodec libx264 -s $OUTRES -preset $QUAL -keyint_min 60 \ | |
-acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b 712000 -bufsize 512k \ | |
-f flv "rtmp://live.justin.tv/app/$STREAM_KEY" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment