Convert Equirectangular to Stereographic in FFmpeg

This article provides a straightforward guide on how to use the FFmpeg v360 filter to convert 360-degree equirectangular video into a stereographic projection, commonly known as the “little planet” or “tiny planet” effect. You will learn the exact command-line syntax, the key parameters of the v360 filter, and how to customize the camera angle and field of view to achieve the perfect visual result.

The Basic Command

To project an equirectangular video to a stereographic projection, use the v360 video filter. Below is the standard FFmpeg command to perform this conversion:

ffmpeg -i input.mp4 -vf "v360=input=equirectangular:output=stereographic:yaw=0:pitch=-90:roll=0:fov=180:w=1080:h=1080" output.mp4

Parameter Breakdown

The v360 filter relies on specific parameters to define the input, output, camera orientation, and dimensions:

Customizing the Projection

You can adjust the parameters to change the appearance of your output video:

Changing the Planet Center

If you want to spin the “planet” horizontally to center a specific subject, adjust the yaw parameter:

ffmpeg -i input.mp4 -vf "v360=e:sg:yaw=120:pitch=-90:roll=0:fov=190:w=1080:h=1080" output.mp4

Adjusting the Planet Size

To make the central planet smaller and show more of the horizon, increase the fov value. To zoom in closer to the center, decrease the fov value: * Zoom Out (Smaller Planet): fov=220 * Zoom In (Larger Planet): fov=150