Converting Quad Lightfield images and videos to SBS using FFMPEG

Hey everyone,

We wanted to share with you some FFMPEG scripts that allow you to convert Quad Lightfield format files to SBS files for use on Leia devices, 3D TVs, and VR headsets.

These scripts are for FFMPEG and convert a Quad Lightfield file to an equivalent SBS using the inner or outer two views. Users can change from video to photo by changing the file extensions from .mp4 to the desired format (e.g. .jpeg or .png). These should work with any format supported by FFMPEG.

Convert Quad Lightfield to SBS using inner views (View 2 and View 3)

ffmpeg -i input_2x2.mp4 -filter_complex "[0:v]crop=iw/2:ih/2:iw/2:0[left];[0:v]crop=iw/2:ih/2:0:ih/2[right];[left][right]hstack" output_view2and3_2x1.mp4

Convert Quad Lightfield to SBS using outer views (View 1 and View 4)

ffmpeg -i input_2x2.mp4 -filter_complex "[0:v]crop=iw/2:ih/2:0:0[left];[0:v]crop=iw/2:ih/2:iw/2:ih/2[right];[left][right]hstack" output_14_2x1.mp4

Hopefully these are useful to you! Let us know if you have any questions.

2 Likes

Thank you very much, this is very handy

1 Like
  1. So will the 2x2 format be eliminated?
  2. I currently use the LEIA plugin for Maya and it exports quad format I then use FFmpeg to create a quad video. Should I then funnel the completed video that’s in 2x2 into this updated SBS 2x1 format?

Thanks for the heads up.

Hey @Oscar54,

You can learn more at this link: Sunsetting the Quad Lightfield File Format

As for your second question, the recommendation from now on is to render purely in stereo SBS instead of using our plugin to render Quad Lightfield. That plugin should be considered deprecated.

1 Like

Thank you! , that clears it up appreciate it.