Skip to content

Instantly share code, notes, and snippets.

@johnbender
Created July 27, 2012 17:50
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 johnbender/3f75d86183cea0fd40d7 to your computer and use it in GitHub Desktop.
Save johnbender/3f75d86183cea0fd40d7 to your computer and use it in GitHub Desktop.
OUTRES="1280x720"
FPS="15"
QUAL="superfast"
STREAM_KEY="$1"
ffmpeg \
-f alsa -ac 2 -i pulse \
-f x11grab -s 1680x1050 -r "$FPS" -i :0.0+0,0 -aspect 16:10 \
-vf "movie=/dev/video0:f=video4linux2, setpts=N/($FPS*TB), scale=300:-1 [movie]; [in][movie] overlay=main_w-overlay_w:0 [out]" \
-vcodec libx264 -vpre "$QUAL" -s "$OUTRES" \
-acodec libmp3lame -ab 128k -ar 22050 \
-threads 4 \
-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