Advertisement
Guest User

Untitled

a guest
Sep 21st, 2014
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.75 KB | None | 0 0
  1. #!/bin/sh
  2. # originaly from http://tinyurl.com/twitch-linux from taladan
  3. # http://www.youtube.com/user/taladan
  4. # gist created by brodul
  5. #INRES="1920x1200"
  6. zenity --question --text="Start streaming?"
  7. if [ $? -ne 0 ]
  8. then
  9.   exit 1
  10. fi
  11. INRES=`xdpyinfo | grep "dimensions" | sed "s/.* \([0-9]*x[0-9]*\) pixels.*/\1/"` # fullscreen
  12. OUTRES="720"
  13. FPS="25" # target FPS
  14. QUAL="medium"
  15. QSCALE=30
  16. VIDBR=2000k
  17. STREAM_KEY=$(cat ~/.twitch_key)
  18. 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