back

v360 ball 2 - animate yaw and pitch

As pitch has a range of -90 to 90, and yaw -180 to 180, I need two 180 image sets added together.

First:
#!/bin/bash
pitch=-90
yaw=-180
frame=1
while [ $frame -lt 181 ]
do
ffmpeg -i a/input.tif -hide_banner -vf v360=input=e:output=e:pitch="$pitch":yaw="$yaw" b/"$frame".jpg
pitch=$((pitch + 1))
yaw=$((yaw + 1))
frame=$((frame + 1))
done

Second:
#!/bin/bash
pitch=90
yaw=0
frame=1
&while [ $frame -lt 181 ]
do
ffmpeg -i a/input.tif -hide_banner -vf v360=input=e:output=e:pitch="$pitch":yaw="$yaw" c/"$frame".jpg
pitch=$((pitch - 1))
yaw=$((yaw + 1))
frame=$((frame + 1))
done

Add 00 to image 1-9 of the first set, add 0 to 10-99 for the next step (or use a file renamer)
Change file numbers of the second set, to 181-360, add them to the first set.
On Mac I use NameChanger: https://mrrsoftware.com/namechanger/

ffmpeg -r 30 -i b/%03d.jpg -c:v prores_ks -profile:v 3 -vendor apl0 -bits_per_mb 8000 -r 30 -pix_fmt yuv422p10le c/yawpitch.mov



yawpitch.mp4

ffmpeg -i c/yawpitch.mov -hide_banner -vf "v360=input=e:output=ball:interp=cubic:w=2048:h=2048:alpha_mask=1" -c:v prores_ks -profile:v 4444 -alpha_bits 8 -bits_per_mb 8000 -r 30 -pix_fmt yuva444p10le c/ball_y_p_a.mov

Here I''m compositing the alpha masked video over the panning movie background (first version, only yaw animation):

ffmpeg -i proRes422.mov -i ball_y_p_a.mov -hide_banner -filter_complex "overlay=x=W=4096:y=H=2048:x=w=2048:y=h=2048:x=1024:y=0",zscale=1080:540 -pix_fmt yuv420p -c:v libx264 -color_primaries bt709 -colorspace bt709 -color_range tv -color_trc 709 -movflags +faststart -preset slow -crf 18 ball_overlay_ypa.mp4




ball_overlayypa2.mp4

back