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

cmd.txt contains this:
0.0 [expr] v360 yaw '-1*(mod(T/72*360+180,360)-180)'

The cmd.txt basically sets the yaw for v360 video filter based on the time of 
the frame (T)
(I don't remember why I did it this complicated, I think it had something to do 
with the fact that
yaw needs to be between -180 and +180 and I wanted to start at 0.)

Some more info can be found here:
https://ffmpeg.org/ffmpeg-filters.html#v360
https://ffmpeg.org/ffmpeg-filters.html#sendcmd_002c-asendcmd

Am Samstag, 8. Juni 2024, 18:04:14 MESZ schrieb 'kfj' via hugin and other free 
panoramic software:
> On Saturday, June 8, 2024 at 8:56:53 AM UTC+2 kfj wrote:
> 
> 
> I just uploaded a debian package
> <https://bitbucket.org/kfj/pv/downloads/envutil-0.1.1-Linux.deb> of version
> 0.1.1 of 'envutil'.
> 
> 
> ... how embarrassing - there was a bug in the package, which I've fixed
> ('early adopters', please download again if you want correct video output
> with --itp -2) .
> 
> So, just to what your appetite: let's suppose you have a full spherical
> 'pano.jpg', try this:
> 
>     for (( x=0 ; x<360 ; x=x+1 )) ; do echo 90 $x 0 0 ; done > xx.seq
> 
> This creates a 'sequence file' - in this case, the only thing that varies
> from line to line is the second number, the 'yaw' parameter - and it will
> take values from zero to360, so one full pan around. Then this:
> 
>     envutil -v --input pano.jpg --seqfile xx.seq --output pan360.mp4
> --width 1920 --height 1080 --itp -2
> 
> This will create the video output 'pan360.mp4' - a fullHD H265-encoded 360
> degree pan of your panorama with rectilinear output set to 90 degrees hfov.
> The video won't play everywhere - my Linux box plays it, but VLC doesn't.
> I'm new to video output, maybe there's someone out there in the community
> who has programmed with ffmpeg and wants to help? Anyway, you can instead
> produce 360 separate images like this:
> 
>     envutil -v --input Cauri*.jpg --seqfile xx.seq --output pan%03d.jpg
> --width 1920 --height 1080 --itp -2
> 
> (note the changed output parameter) - and then combine the images with
> ffmpeg on the command line, like this:
> 
>     ffmpeg -f image2 -pattern_type glob -framerate 60 -i 'pan*.jpg' -s
> 1920X1080 -c:v libx265 pan2.mp4
> 
> That video plays with VLC. Programming with ffmpeg is quite tricky - it's
> old C code and I grabbed an example file which was 20 years old and 'bent'
> it to C++ - going via the single images is the safer option, but of course
> it takes lots of disk space (you want an SSD for that). But I think this is
> a cool idea - it could be used to create very high quality artificial
> tracking shots (if that's the correct term) or zoom sequences from a 360
> degree panorama with little programming effort. Of course one would want a
> companion program to generate the sequence files...




-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/4899286.GXAFRqVoOG%40chaos-home.
  • [hugin-ptx] ne... 'kfj' via hugin and other free panoramic software
    • [hugin-pt... 'kfj' via hugin and other free panoramic software
      • [hugi... 'kfj' via hugin and other free panoramic software
        • [... 'kfj' via hugin and other free panoramic software
          • ... 'kfj' via hugin and other free panoramic software
            • ... 'chaosjug' via hugin and other free panoramic software
              • ... 'Kay F. Jahnke' via hugin and other free panoramic software
              • ... 'Kay F. Jahnke' via hugin and other free panoramic software
                • ... 'kfj' via hugin and other free panoramic software
                • ... 'kfj' via hugin and other free panoramic software

Reply via email to