FFmpeg v360: Equirectangular to Stereographic
This guide explains how to convert standard 360-degree
equirectangular video into a stereographic projection using FFmpeg's
native v360 video filter. By configuring the input and
output geometry, adjusting the field of view, and modifying orientation
parameters like pitch and roll, you can generate standard conformal
views or create dynamic "little planet" video effects directly from the
command line.
Basic Syntax
The v360 filter requires specifying the input format as
equirectangular and the output format as stereographic.
The minimal command is:
ffmpeg -i input.mp4 -vf "v360=in=equirect:out=stereographic" output.mp4Short aliases can also be used: e for
equirect and sg for
stereographic:
ffmpeg -i input.mp4 -vf "v360=e:sg" output.mp4Essential Parameters
To control how the stereographic image looks, use the following parameters inside the filter:
h_fov/v_fov/fov: Sets the horizontal, vertical, or diagonal field of view in degrees. Stereographic projections typically require a wide FOV (between 180° and 280°) to capture the intended curvature.pitch: Tilts the camera up or down (-90° to 90°). Settingpitch=-90looks directly at the ground, whilepitch=90looks directly at the sky.yaw: Rotates the camera horizontally (-180° to 180°).roll: Tilts the camera sideways (-180° to 180°).wandh: Explicitly defines the output width and height. A 1:1 square aspect ratio is standard for full stereographic spheres, though 16:9 can be used for landscape framing.interp: Sets the pixel interpolation algorithm. Values includelinear,cubic,spline, orlanczosfor higher image quality at the cost of processing time.
Creating the "Little Planet" Effect
The "little planet" (or tiny planet) effect is achieved by pointing the virtual camera straight down toward the ground and expanding the field of view:
ffmpeg -i input.mp4 -vf "v360=in=equirect:out=stereographic:pitch=-90:h_fov=280:v_fov=280:w=1920:h=1920:interp=lanczos" -c:v libx264 -crf 18 output_little_planet.mp4pitch=-90: Points the camera downward to place the ground at the center of the sphere.h_fov=280:v_fov=280: Broadens the view sufficiently to curve the horizon completely around the center.w=1920:h=1920: Enforces a square resolution to keep the sphere symmetrical.
Creating the "Rabbit Hole" (Sky) Effect
To create an inverted stereographic view where the sky is in the center and the ground forms the outer ring, invert the pitch to point directly upward:
ffmpeg -i input.mp4 -vf "v360=in=equirect:out=stereographic:pitch=90:h_fov=280:v_fov=280:w=1920:h=1920:interp=lanczos" -c:v libx264 -crf 18 output_sky_hole.mp4Standard Forward-Facing Stereographic View
To use stereographic projection as a wide-angle, non-planet camera view with reduced edge distortion compared to rectilinear projection:
ffmpeg -i input.mp4 -vf "v360=in=equirect:out=stereographic:yaw=0:pitch=0:h_fov=160:v_fov=90:w=1920:h=1080:interp=cubic" -c:v libx264 -crf 18 output_flat.mp4This configuration maintains a standard 16:9 widescreen frame while utilizing the conformal properties of stereographic projection to preserve shapes across a 160° horizontal perspective.