Convert Side-by-Side 3D to Anaglyph with FFmpeg

This guide explains how to convert a side-by-side (SBS) 3D video into a red-cyan anaglyph video using FFmpeg’s powerful stereo3d video filter. You will learn the exact command-line syntax, understand the input and output parameters, and explore different anaglyph rendering styles, such as color, grayscale, and Dubois.

The Basic FFmpeg Command

To convert a standard side-by-side 3D video to a red-cyan anaglyph video, use the following FFmpeg command:

ffmpeg -i input_sbs.mp4 -vf "stereo3d=in=sbsl:out=arcd" -c:a copy output_anaglyph.mp4

Parameter Breakdown:


Choosing Your Input Format (in)

You must match the in parameter to your source video’s specific layout:

Value Description
sbsl Side-by-side full width, left eye first.
sbsr Side-by-side full width, right eye first.
sbs2l Side-by-side half width (half resolution), left eye first.
sbs2r Side-by-side half width (half resolution), right eye first.

For most downloaded 3D MKV or MP4 files, sbs2l is the correct choice.


Choosing Your Output Format (out)

FFmpeg supports several styles of red-cyan anaglyph. Choose the one that best fits your viewing preference:

This method uses a color-matching matrix to minimize eye strain and visual “ghosting.”

ffmpeg -i input.mp4 -vf "stereo3d=in=sbs2l:out=arcd" output.mp4

2. Full Color Red/Cyan

This preserves the original colors as much as possible, though it can cause more ghosting/crosstalk.

ffmpeg -i input.mp4 -vf "stereo3d=in=sbs2l:out=arcc" output.mp4

3. Grayscale (Monochrome) Red/Cyan

This removes all color, resulting in a black-and-white image that provides a very clean, high-contrast 3D depth effect with almost zero ghosting.

ffmpeg -i input.mp4 -vf "stereo3d=in=sbs2l:out=arbg" output.mp4

Advanced Example with Video Encoding

If you want to compress the final output and ensure compatibility with most media players, encode the video using the H.264 codec:

ffmpeg -i input_sbs.mp4 -vf "stereo3d=in=sbs2l:out=arcd" -c:v libx264 -crf 20 -preset fast -c:a aac -b:a 192k output_anaglyph.mp4