2d to 3d video conversion

I'm looking for a method to convert a normal movie format like m4v or mkv and creating a file with side by side images that would be viewable in Vic for Android in a Google cardboard.

I have an old Android phone and the tilt and gyro sensors don't work with 3d video players. You can't control anything.

What I would like to do is create the side by side video image from a normal mkv or m4v. Then I would start the video and place it in the Google cardboard. I don't care about the control aspect.

I didn't find anything in other questions. Googling gives a few windows centric solutions, but I don't have the darkside in my house.


Converting from 2D to 3D is impossible...

Why? Because of the entropy of the universe of course!  :-)
(Meaning: You cannot add what's not there; 3D movies are filmed with 2 cameras, one of each eye; 2D movies are filmed with 1 camera)¹

Converting from 2D to Side-by-Syde (SBS) 2D is possible however:

ffmpeg -i 2D.mp4 -filter_complex \
       "[0]scale=iw*sar:ih,setsar=1,scale=-1:$720,\
        crop=$720:$720,split[left][right]; \
        [left][right]hstack[sbs]" -map "[sbs]" -map 0:a? SBS.mp4

which will give you a movie that you can still watch using cardboard, but it'll be 2D, not 3D.

in the above command, you can change the following options:

  • 720 to the resolution you want (SD=540, HD=720,FHD=1080, but any value can be taken)
  • 2D.mp4 is the input file
  • SBS.mp4 is the output file

¹Yes, it's more complex than that, but let's keep it simple... ;-)