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

This article explains how to convert a top-and-bottom (above-below) 3D video into a side-by-side (SBS) 3D format using FFmpeg. By utilizing FFmpeg's built-in stereo3d video filter, you can quickly convert your 3D video files via the command line to ensure compatibility with different VR headsets, 3D TVs, and media players.

The FFmpeg Command

To perform the conversion, use the stereo3d video filter in your FFmpeg command. Open your terminal or command prompt and run the following command:

ffmpeg -i input.mp4 -vf "stereo3d=in=abl:out=sbsl" output.mp4

Command Breakdown

  • -i input.mp4: Specifies the path to your source top-and-bottom 3D video.
  • -vf: Flags the start of the video filter chain.
  • stereo3d=...: Calls the 3D conversion filter.
    • in=abl: Defines the input format as Above-Below (top-and-bottom) with the Left eye on top. If your source video has the right eye on top, use abr instead.
    • out=sbsl: Defines the output format as Side-by-Side with the Left eye on the left. If you need the right eye on the left, use sbsr.
  • output.mp4: The name of your converted side-by-side 3D video file.

Handling Full-Resolution (Full-HD) 3D Videos

The standard abl and sbsl formats assume half-resolution inputs and outputs (where the image is squished to fit standard 16:9 frames). If your source file contains full-resolution frames (where each eye is at full 1080p or 4K resolution without vertical squeezing), you should use the full-resolution identifiers:

ffmpeg -i input.mp4 -vf "stereo3d=in=ab2l:out=sbs2l" output.mp4
  • in=ab2l: Input is full-resolution Above-Below, Left eye top.
  • out=sbs2l: Output is full-resolution Side-by-Side, Left eye left.