Created
October 9, 2012 01:15
-
-
Save Taehun/3856003 to your computer and use it in GitHub Desktop.
Live stream shell script using ffmpeg in justin.tv
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/sh | |
# ref> http://onestep.tistory.com/83 | |
INRES="1920x1080" # input resolution | |
OUTRES="640x360" | |
FPS="20" # target FPS | |
# Justin | |
STREAM_KEY="live_29225937_MudL5ituoYdWTqHSZkIrMqMxKTi0OG" | |
URL="rtmp://live.justin.tv/app/$STREAM_KEY" | |
ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0 \ | |
-f alsa -ac 2 -i pulse -vcodec libx264 -s "$OUTRES" -ar 22050 \ | |
-acodec libmp3lame -ab 64k -threads 0 \ | |
-f flv $URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment