YouTube Live stream for a music festival. H.264 at 6 Mbps for YouTube recommended 1080p live settings, keyframe interval of 2s (GOP 60 at 30fps), AAC audio, FLV container for RTMP ingest to YouTube Live.
| Video Codec | H.264 |
| Bitrate | 6M |
| Resolution | 1080p |
| Audio | AAC |
| Container | FLV |
ffmpeg -i input.mp4 -c:v libx264 -b:v 6M -g 60 -c:a aac -b:a 160k -f flv rtmp://a.rtmp.youtube.com/live2/STREAM_KEY
YouTube requires a keyframe interval of exactly 2 seconds for live streams. If your GOP size does not match, YouTube will re-encode your stream server-side, adding latency and potentially degrading quality.
A new FFmpeg encoding puzzle every day. Six tries, in the browser or from your terminal.