Skip to content

Instantly share code, notes, and snippets.

@cornedor
Created April 14, 2013 11:33
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 cornedor/5382384 to your computer and use it in GitHub Desktop.
Save cornedor/5382384 to your computer and use it in GitHub Desktop.
#!/bin/sh
SIZE="1920x1080"
BITRATE="32k"
FRAMERATE="20"
KEY="KEY_HERE"
TIMESTAMP=$(date "+%m-%d-%y-%H%M")
ffmpeg\
-f x11grab -s $SIZE -r $FRAMERATE -i :0.0\
-f alsa -ac 2 -i pulse\
-vcodec libx264 -preset ultrafast\
-b:v 1024k -b:a 128k\
-pix_fmt yuv420p\
-acodec libmp3lame -ar 44100 -ab 96k\
-threads 0\
-f flv - |\
ffmpeg -i - \
-c copy -f flv "rtmp://live.justin.tv/app/$KEY"
# -c copy -f mp4 "~/Videos on echo $TIMESTAMP.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment