Page 1 of 1

Splitting stereo video into two videos?

Posted: Thu May 12, 2022 8:58 pm
by atrunyan
Hi, I'm hoping to be able to split my recorded split screen video into a left and right video so that I can make a disparity map video from them. Is this possible? How would I go about doing this?

Re: Splitting stereo video into two videos?

Posted: Fri May 13, 2022 4:56 am
by stereomaton
For offline conversion (after the half-sbs file is created), here is a ffmpeg command to split your video input.mp4 into two files output_l.mp4 and output_r.mp4:

Code: Select all

ffmpeg -i input.mp4 -filter_complex 'split[a][b],[a]stereo3d=sbs2l:ml[l],[b]stereo3d=sbs2l:mr[r]' -map '[l]' output_l.mp4 -map '[r]' output_r.mp4
If you want to do it live, see https://github.com/realizator/stereopi-fisheye-robot (and in particular 6_dm_video.py for live disparity map after the calibration is done ; you can also find a code to split the frame in two images in this file if you are interested in this specific part only)

Re: Splitting stereo video into two videos?

Posted: Fri May 13, 2022 7:16 am
by Realizator
Stereomaton, thank you for your answer!

atrunyan, I'm curious why do you need two independent video files to get the disparity map, but not the single side-by-side file. What's the aim of the project?