v360 ball 3: animate yaw and pitch +
extreme fisheye, stereographic (little planet) projections

Equirectangular input, the garden of University Dacapo Mariestad, Sweden (, 2002.

To make a batch, use bash or zsh as follows:

First set of 180 images:
yaw=-180# degrees, range -180 to 180, start from -180.
frame=1# start from 1, number of images.
while [ $frame -lt 181 ]# (-lt = less than) loop from 0 to 180 frames, then stop.
ffmpeg -i input.jpg -hide_banner -vf v360=input=e:output=e:pitch="$pitch":yaw="$yaw" b/"$frame".jpg
pitch=$((pitch + 1))
yaw=$((yaw + 1))# increase yaw by one (integer).
frame=$((frame + 1))# increase image number.

Second set of 180 images:
&while [ $frame -lt 181 ]
ffmpeg -i 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))

Add 00 to image 1-9 of the first set, add 0 to 10-99 for the next step (use a file renamer, on Mac I use NameChanger:
Change file numbers of the second set, to 181-360, add them to the first set.

Make a high quality intermediate movie from the jpeg files in .mov or .mkv format:
(and with that movie you can make more experiments. See below.

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

ffmpeg -i -hide_banner -pix_fmt yuv420p dacapo_pan.mp4

"interp=cubic" Note: more complex interpolation methods require much more memory to run. Default value is 'line'.

panning movie, from the

And to make the ball format with alpha mask use:

ffmpeg -i -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 -pix_fmt yuva444p10le

If I make a straight .mp4, the background flickers, so to composit it on a black background I first make the background:
ffmpeg -f lavfi -i "color=0x000000:s=2048x2048" -r 30 -c:v libx264 -t 12 -pix_fmt yuv420p d/

And then composite them together:
ffmpeg -i -i -hide_banner -filter_complex "overlay=x=W=2048:y=H=2048:x=w=2048:y=h=2048:x=0:y=0" -pix_fmt yuv420p -color_primaries bt709 -colorspace bt709 -color_range tv -color_trc 709 -movflags +faststart -preset slow -crf 18 dacapo_ball.mp4

Output "dacapo_ball.mp4", 12s at 30fps.
pitch=90 places zenith in the center (rotates CW), pitch=-90 places nadir in the center (rotates CCW).


	 90  68  45
	 22   0 -22
	-45 -68 -90
Perhaps make an extreme fisheye projection:
ffmpeg -i -vf v360=input=equirect:output=fisheye:h_fov=360:v_fov=360 -y

ex_fish.mp4, h_fov=360:v_fov=360

If I change the script to "fisheye:h_fov=300:v_fov=300" it comes close to the "ball" format.

Go here to see a version in "stereographic, 'little planet' projection".