krzys_h

Twitch streaming

Feb 9th, 2014
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.20 KB | None | 0 0
  1. #! /bin/bash
  2.  
  3. # originaly from http://tinyurl.com/twitch-linux from taladan
  4. # www.youtube.com/user/taladan
  5.  
  6. # gist created by brodul
  7.  
  8. INRES="1366x768"                                            # input resolution <----- TU USTAWIĆ ROZDZIELCZOŚĆ
  9. OUTRES=$INRES                                           # Output resolution
  10. FPS="30"                                                    # target FPS
  11. #QUAL="medium"                                               # one of the many FFMPEG preset on (k)ubuntu found in /usr/share/ffmpeg
  12. # If you have low bandwidth, put the qual preset on 'fast' (upload bandwidth)
  13. # If you have medium bandwitch put it on normal to medium
  14.  
  15. # Write your key in a file named .twitch_key in your home directory
  16. STREAM_KEY="TU USTAWIĆ STREAM KEY"   # This is your streamkey generated by jtv/twitch found at: http://www.justin.tv/broadcast/adv_other
  17.  
  18. # -i pulse
  19. # -preset $QUAL
  20.  
  21. avconv \
  22.     -f x11grab -s $INRES  -r "$FPS" -i :0.0 \
  23.     -f alsa -ac 2 -f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor  \
  24.     -vcodec libx264 -s $OUTRES \
  25.     -acodec libmp3lame -ar 44100 -threads 4 -qscale 3 -b 712000  -bufsize 512k \
  26.     -f flv "rtmp://live.justin.tv/app/$STREAM_KEY"
Add Comment
Please, Sign In to add comment