[FFmpeg-user] V360 filter

Michael Koch astroelectronic at t-online.de
Tue Sep 10 20:54:35 EEST 2019


Paul,

> Stereographic projection aka little planet added as both input and output.
> Single fisheye is little different.

v_fov is limited to 90°, that's not enough for little planet.

>
>> -- I think the d_flip parameter needs some more documentation. What's an
>> "in-depth" flip?
> It swaps back with front.

Please add it to the documentation, "in-depth" flip isn't self-explaining.


I have a workaround for converting an equirectangular video to a little 
planet video, but I use a fisheye projection (vertical coordinate in 
equirectangular image is proportional to distance from image center in 
little planet image):

set "IN=test3.mp4"          :: Equirectangular input video
set "H=960"               :: Height of input video (width = 2 * height)
set "S=1080"                :: Size of quadratic little planet output video
set "OUT=out.mp4"           :: Output video

rem Create the xmap file
ffmpeg -f lavfi -i nullsrc=size=%S%x%S% -vf format=pix_fmts=gray16le,^
geq='%H%*(0.9999+atan2(Y-%S%/2,X-%S%/2)/PI)' -frames 1 -y xmap.pgm

rem Create the ymap file
ffmpeg -f lavfi -i nullsrc=size=%S%x%S% -vf format=pix_fmts=gray16le,^
geq='%H%*(1-hypot((2*X/%S%)-1,(2*Y/%S%)-1))' -frames 1 -y ymap.pgm

rem Apply the remap filter to the video
ffmpeg -i %IN% -i xmap.pgm -i ymap.pgm -lavfi 
"format=pix_fmts=rgb24,remap" -y %OUT%


Michael



More information about the ffmpeg-user mailing list