2

Quite a while back, I used a now-discontinued 360-degree camera called the YI 360 camera to record some videos.

The software that came with the camera is no longer available, and to my knowledge, it didn't work very well anyway.

I need to find a way, using FFmpeg's v360 filter, to convert this footage into an equirectangular format.

Since I am not very well versed in FFmpeg's filter usage, there are a couple of challenges.

Firstly, the video is split into two 220-degree (not 180, at least according to the camera's website) fisheye views that overlap slightly.

Secondly, the camera itself is visible within the overlapping region, which must be removed.

How can I use FFmpeg to accomplish the equirectangular projection I want?

220 degree fisheye vr video recorded with yi 360 camera

1 Answer 1

1

Rectifying single photo:

ffmpeg -i input.jpg -vf v360=fisheye:e:ih_fov=200:iv_fov=200 -y output.jpg

Rectifying horizontal double fisheye:

ffmpeg -i input.jpg -i dftest.gif -filter_complex "[1:v]v360=input=dfisheye:output=equirect:ih_fov=200:iv_fov=200[out_v]" -map "[out_v]"  output.jpg

You have a vertically stacked double fisheye, so you have to convert it in advance:

  • crop the 2 parts (540x540, one at 0,0, the other at 0,540):
    • crop=out_w=540:out_h=540:x=0:y=540
    • crop=out_w=540:out_h=540:x=0:y=0
  • stack them horizontally: hstack
  • send to v360 filter as above; v360=input=dfisheye:output=equirect:ih_fov=200:iv_fov=200

Final result:

ffmpeg -y -i input.jpg -filter_complex "[0:v]crop=out_w=540:out_h=540:x=0:y=540[3];[0:v]crop=out_w=540:out_h=540:x=0:y=0[1];[1][3]hstack,v360=input=dfisheye:output=equirect:ih_fov=200:iv_fov=200[out_v]" -map "[out_v]" output.jpg

enter image description here

I used FOV=200 rather than FOV to remove overlapping.

You can add parameter yaw to turn camera around:

ffmpeg -y -i input.jpg -filter_complex "[0:v]crop=out_w=540:out_h=540:x=0:y=540[3];[0:v]crop=out_w=540:out_h=540:x=0:y=0[1];[1][3]hstack,v360=input=dfisheye:output=equirect:ih_fov=200:iv_fov=200:yaw=45[out_v]" -map "[out_v]" output.jpg

yaw=0:

yaw 0

yaw=45:

yaw 45

Test result here: https://renderstuff.com/tools/360-panorama-web-viewer/

Used this amazing tool to experiment: https://ffmpeg.lav.io/

You can also experiment with windows software I wrote to replace XDV360 software which came with my panocam with single 220° fisheye lens:

https://github.com/jumpjack/fishconLC

2
  • Any idea what I would need to do if I have four to six partially overlapping <180 deg fisheyes? I have been struggling for days to find some explanation to that. Not clear to me how to map all fisheye frames into a single equirectangular.
    – Valeria
    Commented Jul 31 at 22:41
  • this is nt a comment, it's a question with a very complex answer
    – jumpjack
    Commented Aug 3 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.