Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #! /bin/bash
  2. #
  3. # Broadcast ffmpeg to YouTube
  4.  
  5. VBR="6000k" # Output video bitrate
  6. FPS="30" # FPS framerate
  7. QUAL="veryfast" # FFMPEG quality preset (slow,medium,fast,veryfast,ultrafast)
  8. YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # YouTube Server URL
  9.  
  10. SOURCE="udp://239.255.139.0:1234" # Source - UDP
  11. KEY="ENTER_YOUR_NAME-KEY_HERE" # Stream name/key
  12.  
  13. ffmpeg \
  14. -i "$SOURCE" \
  15. -vcodec libx264 -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS * 2)) -b:v $VBR \
  16. -acodec aac -ar 44100 -qscale 5 -b:a 712000 -bufsize 512k \
  17. -f mp4 "$YOUTUBE_URL/$KEY"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement