'FFmpeg parameters for Fisheye image correction

I am trying to achieve two things (any of them will work for my solution):

  1. Fisheye video to equirectangular (and view it in 360 view)
  2. Fisheye video to flat (if I understood correctly, it will be just like the fisheye image (maybe I will lose some FoV?) but without distortions. Of course in this case I will not use 360 view).

Camera specs: https://documentation.meraki.com/MV/Viewing_Video/Understanding_Image_Quality_on_the_MV32

For test purposes I am using an image as input:

For 1), I am using ffmpeg -i input_file -vf v360=fisheye:e:ih_fov=180:iv_fov=180:pitch=90 output_file. This command gives me a rectangular image where the half upper is black, and when testing in https://renderstuff.com/tools/360-panorama-web-viewer/ the user can navigate through this black space (I would like to limit user view, so he could not get to the black part). If I crop and remove the black part, the image in the 360 view becomes distorted (loses the aspect ratio).

For 2), I tried ffmpeg -i input_file -vf v360=fisheye:flat:ih_fov=180:iv_fov=180 output_file but it doesn't seem to correct the distortions properly.

FYI this video will be published in AntMedia server to be used as an iframe in web applications. I'll try to use 1) in AntMedia since it supports 360 view (https://antmedia.io/play-live-360-degree-video/).

Since I am new to this, please ask for more information if needed.
Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source