On 08.06.24 22:51, 'chaosjug' via hugin and other free panoramic
software wrote:
> Hi,
>
> ffmpg is capable to do this in one go. It's been a while since I did this so I must admit that I don't
> completely understand what I did, but this should create a 360° rotation pan of a panorama image:
>
> ffmpeg -loop 1 -i panorama_image.jpg -vf "sendcmd=f=cmd.txt,v360=input=e:output=flat:ih_fov=360:iv_fov=180:h_fov=120:v_fov=88.5:w=1920:h=1080:pitch=-10:reset_rot=true:interp=cube" -t 72 -vcodec libx264 -crf 25 -r 50 -pix_fmt yuv420p output.mov
Hey, cool, I'm always impressed by just how versatile ffmpeg is!
Let me make two points:
- The method to use a sequence file is perfectly general, it can process
any sequence of images taken from the same virtual camera location.
envutil also reprojects to six different projections, so I think it's
got a wider range of applications. The 360 degree pan I suggest is
merely a simple example which is easy to generate with a loop in bash.
- My problem just now is how to pump frames into a video in C++, to
avoid the single-image route. The ffmpeg code I use is twenty years old,
can you maybe suggest something else? It should really be quite simple.
I looked around some, and was quite disappointed not to find a
ready-made piece of code which simply 'eats' C arrays of image data and
combines them into a video. It doesn't have to be ffmpeg - I use that
code because OIIO 'pulls it in' anyway, so I don't have to add another
dependency, but I wouldn' mind that, either. Ultimately, of course, I
hope that OIIO improves their ffmpeg plugin to not only read from but
also write to videos. That would be my favourite outcome.
Currently, the video output from envutil doesn't seem to be good for
many video players, so I suggest using the single-image path if the
video doesn't work. That's to be able to compare the different
anti-aliasing filters in a moving image - I hope that my new approach of
'twining' compares quite well!