Is there a fisheye or dual fisheye to equirectangular filter for ffmpeg?

为君一笑 提交于 2020-01-01 02:50:13

问题


Or a way to do it with an existing filter? So that you could take in video from a fisheye or dual fisheye camera (such as the Ricoh Theta) and directly output equirectangular, in real-time, to something like RTMP?


回答1:


The Remap filter does just this:

This filter copies pixel by pixel a source frame to a target frame. It remaps the pixels to a new x,y destination based on two files ymap/xmap.

Basic command syntax is

ffmpeg -i fisheye_grid_input.jpg -i fisheye_grid_xmap.pgm -i fisheye_grid_ymap.pgm -filter_complex remap out.png 

Also included at that link are the mapping files for

Ricoh Theta S camera: input files for resolution 1920x960(1080)




回答2:


In the latest ffmpeg, you can do this to convert fisheye video to equirectangular now

ffmpeg -y -i in.mp4 -vf v360=dfisheye:e:yaw=-90 -c:v libx265 -b:v 40000k -bufsize 5000k -preset ultrafast -c:a copy out.mp4

Docs: https://ffmpeg.org/ffmpeg-filters.html#v360



来源:https://stackoverflow.com/questions/37796911/is-there-a-fisheye-or-dual-fisheye-to-equirectangular-filter-for-ffmpeg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!