Skip to content

Instantly share code, notes, and snippets.

@master-q
Created September 14, 2011 04:24
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 master-q/1215853 to your computer and use it in GitHub Desktop.
Save master-q/1215853 to your computer and use it in GitHub Desktop.
ffmpeg for justin.tv
#!/bin/sh
VIDEO_SIZE="320x240"
FPS="15"
STREAM_KEY="live_XXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
STREAM_URL="rtmp://live.justin.tv/app/$STREAM_KEY"
date
padsp ffmpeg -f video4linux2 -pix_fmt bgra -s "$VIDEO_SIZE" -r "$FPS" \
-i /dev/video1 \
-f alsa -ac 1 -ar 11025 -i pulse \
-vcodec libx264 -vpre baseline \
-acodec libmp3lame -ab 32k \
-threads 0 \
-f flv "$STREAM_URL"
notify-send "ffmpeg disconnected..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment