Created
January 21, 2015 18:10
-
-
Save abaez/a3868c48567b6a635bdf to your computer and use it in GitHub Desktop.
twitch screenshare with audio streamer script.
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
STREAM_KEY="" | |
STREAM_URL="rtmp://live.twitch.tv/app" | |
OUTPUT="$STREAM_URL/$STREAM_KEY" | |
#OUTPUT="out.flv" | |
#rm "out.flv" | |
DEVVID="x11grab" | |
FPS=25 | |
VIDIN="hd1080" | |
VIDOUT="hd720" | |
VIN=":0.0" | |
AIN="hw:3,0" # hw:0,0 | |
DEVAUD="alsa" | |
CHAN="1" | |
VC="libx264" | |
VT="4" | |
VB="2000k" | |
VBMIN="1000k" | |
AC="libmp3lame" | |
AB="192k" | |
MIN="300" | |
AQ="3" | |
AR="44100" | |
ffmpeg \ | |
-f $DEVVID -framerate $FPS -video_size $VIDIN -i $VIN \ | |
-f $DEVAUD -ac $CHAN -i $AIN \ | |
-c:v $VC -b:v $VB -threads $VT -video_size $VIDOUT -preset "ultrafast" \ | |
-g 50 -minrate $VBMIN -maxrate $VB -pix_fmt yuv420p \ | |
-c:a $AC -b:a $AB -q:a $AQ -ar $AR -strict normal \ | |
-f flv $OUTPUT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment