Guest User

Untitled

a guest
Nov 17th, 2012
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.95 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="1920x1080" # input resolution
  9. #OUTRES="1024x640" # Output resolution
  10. OUTRES="768x432" # Output resolution
  11. FPS="30" # target FPS
  12. QUAL="fast" # one of the many FFMPEG preset on (k)ubuntu found in /usr/share/ffmpeg
  13. # If you have low bandwidth, put the qual preset on 'fast' (upload bandwidth)
  14. # If you have medium bandwitch put it on normal to medium
  15.  
  16. # Write your key in a file named .twitch_key in your home directory
  17. STREAM_KEY=$(cat ~/.twitch_key) # This is your streamkey generated by jtv/twitch found at: http://www.justin.tv/broadcast/adv_other
  18.  
  19. avconv \
  20.     -f x11grab -s $INRES -r "$FPS" -i :0.0 \
  21.     -f alsa -ac 2 -i pulse \
  22.     -vcodec libx264 -s $OUTRES -preset $QUAL \
  23.     -acodec libmp3lame -ar 44100 -threads 4 -qscale 3 -b 1000000 -bufsize 512k \
  24.     -f flv "rtmp://live.justin.tv/app/$STRAElM_KEY"
Advertisement
Add Comment
Please, Sign In to add comment