Skip to content

Instantly share code, notes, and snippets.

@aikar
Created August 2, 2012 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aikar/3232211 to your computer and use it in GitHub Desktop.
Save aikar/3232211 to your computer and use it in GitHub Desktop.
INRES="1920x1080" # input resolution
OUTRES="1024x576"
FPS="23" # target FPS
QUAL="veryfast" # one of the many FFMPEG preset
ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0+0,0 \
-f alsa -ac 2 -i hw:0,2 -f alsa -i pulse -vcodec libx264 -vpre "$QUAL" -s "$OUTRES" \
-acodec libmp3lame -ar 44100 -async 1 \
-f flv "rtmp://live.twitch.tv/app/$STREAM_KEY" 2>&1 | grep -v "live.twitch.tv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment