Convert Top-and-Bottom 3D to Side-by-Side in FFmpeg

This guide explains how to convert a 3D video from a top-and-bottom (above-below) format to a side-by-side (SBS) format using FFmpeg's built-in stereo3d video filter. You will learn the standard command-line syntax, understand how the filter flags correspond to eye-order layouts, and see how to preserve audio and video quality during the conversion process for 3D TVs and VR headsets.

Basic Conversion Command

To convert an above-below 3D video where the left-eye view is on top to a standard side-by-side video where the left-eye view is on the left, use the following command:

ffmpeg -i input.mp4 -vf "stereo3d=abl:sbsl" -c:v libx264 -crf 18 -c:a copy output.mp4

Understanding the Parameters

  • -vf "stereo3d=abl:sbsl": Invokes the stereo3d filter. The first value defines the input format, and the second defines the output format.
    • abl: Above-below format with the left eye on top. If your source video has the right eye on top, use abr instead.
    • sbsl: Side-by-side format with the left eye on the left side (standard parallel view). If you require cross-eyed 3D, use sbsr.
  • -c:v libx264: Re-encodes the video using the H.264 codec to apply the filter changes.
  • -crf 18: Sets the Constant Rate Factor for high visual fidelity (lower values mean higher quality; standard visually lossless values range between 17 and 23).
  • -c:a copy: Copies the audio stream directly without re-encoding to save time and prevent quality loss.

Handling Half-Resolution Formats

If your playback hardware requires a specific half-width side-by-side (Half-SBS) output with standard 16:9 frame dimensions (such as 1920x1080), chain the scale filter after stereo3d:

ffmpeg -i input.mp4 -vf "stereo3d=abl:sbsl,scale=1920:1080" -c:v libx264 -crf 18 -c:a copy output.mp4

This step ensures that the final side-by-side image is downsampled into standard widescreen dimensions if the default conversion doubles the width of the display frame.