3D Blu-ray Mastering Guide
This is the foundational step of your 3D Blu-ray project. Because 3D Blu-rays use a specific "Multiview Video Coding" (MVC) extension of the H.264 codec, you cannot simply throw a Side-by-Side (SBS) file onto a disc. You must first separate the eyes into two distinct, standards-compliant video streams.
Step 1: Splitting and Standardizing the Video
The Concept
We are taking a single "Full SBS" file (which contains both eyes side-by-side in one wide frame) and slicing it down the middle. Because your source might be a cinema-style "Ultrawide" format (like 3840x800), we must also add black bars (padding) to the top and bottom to reach the mandatory Blu-ray height of 1080 pixels.
The Command
Run this in your terminal:
ffmpeg -i input.mkv -filter_complex "[0:v]split=2[l_raw][r_raw]; \ [l_raw]crop=1920:ih:0:0,pad=1920:1080:0:(1080-ih)/2:black[leftout]; \ [r_raw]crop=1920:ih:1920:0,pad=1920:1080:0:(1080-ih)/2:black[rightout]" \ -map "[leftout]" -c:v libx264 -crf 16 -preset slow -r 23.976 -pix_fmt yuv420p left_eye.mkv \ -map "[rightout]" -c:v libx264 -crf 16 -preset slow -r 23.976 -pix_fmt yuv420p right_eye.mkv
You want to use the command in 1 line when using command prompt instead:
ffmpeg -i input.mkv -filter_complex "[0:v]split=2[l_raw][r_raw];[l_raw]crop=1920:ih:0:0,pad=1920:1080:0:(1080-ih)/2:black[leftout];[r_raw]crop=1920:ih:1920:0,pad=1920:1080:0:(1080-ih)/2:black[rightout]" -map "[leftout]" -c:v libx264 -crf 16 -preset slow -r 23.976 -vsync cfr -pix_fmt yuv420p left_eye.mkv -map "[rightout]" -c:v libx264 -crf 16 -preset slow -r 23.976 -vsync cfr -pix_fmt yuv420p right_eye.mkv
Command Breakdown: What is happening?
| Parameter | What it does | Why it's important |
|---|---|---|
split=2 |
Creates two identical copies of the input in memory. | Guarantees the left and right eyes start on the exact same frame. |
crop=1920:ih:x:y |
Cuts a 1920-pixel wide box out of the source. | Separates the left half from the right half accurately. |
pad=1920:1080... |
Adds black bars to make the file exactly 1080 pixels high. | Mandatory. Blu-ray players will reject any file that isn't exactly 1080p. |
-crf 16 |
Sets the quality level (Lower is higher quality). | Balances "Master Quality" with smaller file sizes to save disk space. |
-preset slow |
Tells the encoder to take its time compressing. | Essential for 3D; it prevents "macroblocking" which ruins depth. |
-r 23.976 |
Forces the frame rate to the NTSC standard. | Prevents audio desync and ensures correct shuttering timing. |
-pix_fmt yuv420p |
Sets the color space to 4:2:0. | Mandatory. Hardware players cannot decode 4:4:4 or 10-bit color. |
Verification: The "Perfect Sync" Check
Before you move to the authoring software, you must ensure both files have the exact same number of frames. Even a one-frame difference can cause the 3D effect to fail or the player to crash.
Run these two commands:
ffprobe -v error -select_streams v:0 -show_entries stream=nb_frames -of default=nokey=1:noprint_wrappers=1 left_eye.mkv ffprobe -v error -select_streams v:0 -show_entries stream=nb_frames -of default=nokey=1:noprint_wrappers=1 right_eye.mkv
The result must be identical. If the left is 144,000 frames, the right must be 144,000 frames.
Why this ensures 100% Compatibility
- Resolution: By padding to 1080p, you satisfy the "BD-ROM" physical specification.
- Timing: By using a single command to split, you eliminate "drift" between eyes.
- Bitstream: Creating
x264video inside anmkvcontainer is what our Cinevision encoder program wants as input.