Skip to content

Instantly share code, notes, and snippets.

@darccio
Created August 21, 2014 21:00
Show Gist options
  • Save darccio/c1176e770c1570a07d06 to your computer and use it in GitHub Desktop.
Save darccio/c1176e770c1570a07d06 to your computer and use it in GitHub Desktop.
How to broadcast to Youtube Live using ffmpeg (only audio with still image)
mkfifo $pipe
cat $pipe | ffmpeg -y
-loop 1 -i cover.png
-i pipe:0
-c:v libx264 -preset ultrafast -pix_fmt yuv420p -minrate 6000k -maxrate 6000k -bufsize 12000k -b:v 6000k
-r 30 -g 30 -keyint_min 60 -x264opts "keyint=60:min-keyint=60:no-scenecut"
-s 1920x1080 -tune zerolatency
-b:a 128k -c:a aac -ar 48000
-strict experimental
-f flv rtmp://a.rtmp.youtube.com/live2/$broadcast_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment