back

dual fisheye to mono HD

Here is a QooCam Kandao stereo 180 from 2019, video would be 3840x1920, 30fps, but here I used a photo. I simulate preparing a mono HD movie from it. I also copy the nonexistent audio track.



KD3D_20190808_172035_000001.jpg, 4320x2160.

I will keep the left fisheye, which is mirrored/horizontally flipped:

ffmpeg crop filter ffmpeg hflip filter(ffmpeg vflip filter not used here.)

ffmpeg -i KD3D_20190808_172035_000001.jpg -vf "crop=1984:1984:88:88,hflip" -c:a copy monoKD3D172035_crop_flipped.jpg

And combine the crop with an output of 110° into flat (normal video format):

ffmpeg v360 filter look for fisheye and flat.

ffmpeg -i KD3D_20190808_172035_000001.jpg -vf "crop=1984:1984:88:88,hflip,v360=input=fisheye:id_fov=216:d_fov=110:output=flat" -c:a copy monoKD3D172035_110.jpg



monoKD3D172035_110.jpg, 3968x1984.

and here 130°:

ffmpeg -i KD3D_20190808_172035_000001.jpg -vf "crop=1984:1984:88:88,hflip,v360=input=fisheye:id_fov=216:d_fov=130:output=flat" -c:a copy monoKD3D172035_130.jpg

And here is a script for the 130° into a square format (no image shown):

ffmpeg -i KD3D_20190808_172035_000001.jpg -vf "crop=1984:1984:88:88,hflip,v360=input=fisheye:id_fov=216:d_fov=130:output=flat:w=3968:h=3968" -c:a copy monoKD3D172035_130square.jpg



monoKD3D172035_130.jpg, 3968x1984.

Here I will scale and crop the 110° version to 1920x1080 for HD video:

ffmpeg -i monoKD3D172035_110.jpg -vf "scale=w=-1:h=1080,crop=w=1920:h=ih" -c:a copy crop_scale.jpg

ffmpeg scale filter

ffmpeg -i KD3D_20190808_172035_000001.jpg -vf "crop=1984:1984:88:88,hflip,v360=input=fisheye:id_fov=216:d_fov=110:yaw=3:output=flat,scale=w=-1:h=1080,crop=w=1920:h=ih" -c:a copy crop_scale3.jpg

With the final cropping the video needed a small yaw adjustment of 3°.



crop_scale3.jpg, 1920x1080.

So the final script would look something like this:

ffmpeg -i in.mov -vf "crop=1984:1984:88:88,hflip,v360=input=fisheye:id_fov=216:d_fov=110:yaw=3:output=flat,scale=w=-1:h=1080,crop=w=1920:h=ih" -c:a copy -pix_fmt yuv420p -c:v libx264 -color_primaries bt709 -colorspace bt709 -color_range tv -color_trc 709 -movflags +faststart -preset slow -crf 18 out.mp4

back