Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # originaly from http://tinyurl.com/twitch-linux from taladan
- # http://www.youtube.com/user/taladan
- # gist created by brodul
- #INRES="1920x1200"
- zenity --question --text="Start streaming?"
- if [ $? -ne 0 ]
- then
- exit 1
- fi
- INRES=`xdpyinfo | grep "dimensions" | sed "s/.* \([0-9]*x[0-9]*\) pixels.*/\1/"` # fullscreen
- OUTRES="720"
- FPS="25" # target FPS
- QUAL="medium"
- QSCALE=30
- VIDBR=2000k
- STREAM_KEY=$(cat ~/.twitch_key)
- avconv -f x11grab -s "$INRES" -i :0.0 -f pulse -i 0 -f pulse -i 1 -filter_complex amerge -vcodec libx264 -r "$FPS" -vf scale=-1:$OUTRES -preset "$QUAL" -acodec libfaac -ar 44100 -ab 128k -threads 4 -b:v "$VIDBR" -force_key_frames expr:gte\(t,n_forced*2\) -pix_fmt yuv422p -f flv "rtmp://live.twitch.tv/app/$STREAM_KEY"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement