ffmpuzzle
Puzzle #15 · Standard · 5 params

H.264 · Bitrate 6M · 1080p · AAC · FLV

The scenario

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.

The answer

Video CodecH.264
Bitrate6M
Resolution1080p
AudioAAC
ContainerFLV

The command

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

Why

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.

Play

A new FFmpeg encoding puzzle every day. Six tries, in the browser or from your terminal.

$ play today's puzzle

← all puzzles