How to Convert Video to Blu-ray Using FFmpeg

This article provides a straightforward guide on how to convert standard video files into Blu-ray compliant H.264 elementary streams or MPEG-TS files using FFmpeg. You will learn the exact command-line parameters required to meet strict hardware Blu-ray specifications, including profile limits, GOP structures, and color spacing.

To create a video stream that hardware Blu-ray players can successfully read, you must adhere to the H.264 High Profile, Level 4.1 standard, define specific buffer sizes, and enable x264’s compatibility flags.

Convert Video to Blu-ray H.264 Elementary Stream (.264)

If you plan to use professional authoring software to build your Blu-ray directory, you will need a raw H.264 elementary stream. Use the following command for a 1080p video at 23.976 frames per second:

ffmpeg -i input.mp4 -an -c:v libx264 -preset slow -profile:v high -level 4.1 -pix_fmt yuv420p -b:v 30M -maxrate 40M -bufsize 30M -color_primaries bt709 -color_trc bt709 -colorspace bt709 -g 24 -keyint_min 1 -sc_threshold 0 -bf 3 -b_strategy 1 -coder 1 -x264opts "bluray-compat=1:vbv-maxrate=40000:vbv-bufsize=30000:keyint=24:slices=4" output.264

Convert Video to a Blu-ray Compatible MPEG-TS File (.ts)

If you need a multiplexed file containing both video and compatible audio (AC-3 format) in an MPEG-TS container, use this command:

ffmpeg -i input.mp4 -c:v libx264 -preset slow -profile:v high -level 4.1 -pix_fmt yuv420p -b:v 30M -maxrate 35M -bufsize 30M -color_primaries bt709 -color_trc bt709 -colorspace bt709 -g 24 -keyint_min 1 -sc_threshold 0 -bf 3 -b_strategy 1 -coder 1 -x264opts "bluray-compat=1:vbv-maxrate=35000:vbv-bufsize=30000:keyint=24:slices=4" -c:a ac3 -b:a 640k -f mpegts output.ts

Key Parameter Explanations