LVF (Leia Video Format) is an MP4 container that contains two video streams: video stream “abl” is the left eye, while “abr” is the right eye. The reason we created this format is that it’s 3D on Leia devices but fully backwards compatible in 2D on all other devices with no modification needed. We have a lot of plans for it in the future, including adding depth map tracks and convergence value tracks as well.
We also plan on releasing consumer tools for converting LVF to SBS, most likely in LeiaPlayer so the conversion to SBS mirrors how it works for images from LIF to SBS.
But I think it makes sense to provide you solutions for converting from LVF to SBS or to split an LVF into a left and right video today so you don’t have to wait for us if you’re itching to export from Lume Pad 2 to a 3D TV or VR headset ASAP, or simply if you want to edit the 3D video in an NLE (video editing program).
These scripts are for FFMPEG. The scripts attached to this post assume you have FFMPEG installed on your computer. The instructions below are for MacOS in zsh (ZShell), but shouldn’t be materially different in other terminals or on Windows or Linux.
The example command for MacOS is as follows:
sudo sh /filepathOfScript/lvf2sbs.sh /filepathOfLeiaCamVideo/nameOfVideo.mp4
Sudo isn’t required but is probably a good idea. You may need to add the script to your PATH variable if you have any issues. You should also be in the directory you want the constructed file to end up in. To make it easy, you should probably have the script and original LVF in the same folder as you want the output files to be. The instructions for lvf2sbs and lvf2lr are the same, with the only difference being one gives you a constructed SBS, the other gives you the left video, right video, and audio all as separate files.
With that, you’re off to the races! Let us know how it goes for you.
I’m attempting to do this on Windows and having a hard time getting it to work. I keep getting a “error opening input, no such file or directory exists” error. I put the script file and the video file I want converted in the same folder and I am in that directory when making the command. In this situation, on windows do I need to type ffmpeg -i sudo sh /filepathOfScript/lvf2sbs.sh /filepathOfLeiaCamVideo/nameOfVideo.mp4?
If anyone could provide some guidance on this that would be extremely appreciated. I’m planning to start filming and editing in SBS, but I just can’t figure out how to convert my videos taken on the Lume Pad 2.
@Josh_G In case this was confusing, you don’t literally write “/filepathOfScript/”, you write the actual file path of the script.
For example, C:/User/Josh/Documents/LVFScript/lvf2sbs.sh
You also don’t need to write ffmpeg -i as far as I can tell, as long as ffmpeg is installed the provided script will call it as needed.
An easy way to solve this is just write “sudo sh” and then drag and drop the script onto your command line, and then drag and drop the video you want to convert onto the command line. It should automatically add the file paths for you.
Thanks for the quick response. I did use the actual file paths, but I also have the slashes included. Does it work without the / in between? So I just need the script followed by a space, and then the file name?
There needs to be a space in between each argument in the command.
For example, “sudo”, “sh”, “C:/User/Josh/lvf2sbs.sh” all need a single space between them. Filepaths MUST have slashes within them. Depending on your command line, having spaces within the file path itself will not work and will require alternate symbols to replace them. That’s why dragging and dropping the file into the command line (if supported) is better, as it will automatically fill it out for you.
The drag and drop worked, and I tried that instead following the above instructions, but I am getting a “not recognized as an internal or external command” error. I’ve confirmed that ffmpeg is installed properly. Not sure what is causing the problem
After a bit more research, maybe it is because the command terminal on windows can not run shell commands. I’lll see if I can get ffmpeg on my mac instead. May be easier that way.
Here is what worked for me on windows. In the terminal, from the directory that the file to be converted and generated is located I directly used: ffmpeg -i “filepathOfLeiaCamVideo” -filter_complex “[0:v:m:language:abl]fps=30[l];[0:v:m:language:abr]fps=30[r];[l][r]hstack” -c:a copy “filepathOfLeiaCamVideo_2x1.mp4”
For the last part “filepathOfLeiaCamVideo_2x1.mp4” I just added “_2x 1.mp4” to the ending of the file that originally just ended in “.mp4”
I just released a video demonstrating how to convert LVF videos to SBS. Give it a watch if you are trying to get your videos converted over for viewing on other 3D compatible devices! https://www.youtube.com/watch?v=DDNoq0f4QdA