This article explains how to create natural-looking thumbnail images from 360-degree content (equirectangular format) captured with cameras like the Insta360.

The Problem: Simple Resizing Causes Distortion

360-degree videos and photos are stored in equirectangular (equidistant cylindrical projection) format. This format unfolds a sphere onto a flat plane, causing horizontal stretching that increases toward the top and bottom edges.

Simply resizing this to create a thumbnail results in a distorted, unnatural image.

# Simple resize (produces a distorted thumbnail)
ffmpeg -i 360video.mp4 -ss 00:00:05 -vframes 1 -vf "scale=640:-1" thumb.jpg

Solution: Convert to Flat Projection Using the v360 Filter

By using ffmpeg’s v360 filter to convert from equirectangular format to flat (rectilinear/perspective projection) format, you can extract a natural-looking image as seen by the human eye.

Tools

ffmpeg is used. On macOS, it can be installed via Homebrew.

brew install ffmpeg

Verify that the v360 filter is included:

ffmpeg -filters 2>/dev/null | grep v360
# Output: .SC v360 V->V Convert 360 projection of video.

Basic Commands

Creating a Thumbnail from a Video

ffmpeg -i 360video.mp4 -ss 00:00:05 -vframes 1 \
  -vf "v360=e:flat:h_fov=120:v_fov=90:yaw=0:pitch=0,scale=640:-1" \
  thumbnail.jpg -y

Creating a Thumbnail from a Photo

ffmpeg -i 360photo.jpg \
  -vf "v360=e:flat:h_fov=120:v_fov=90:yaw=0:pitch=0,scale=640:-1" \
  thumbnail.jpg -y

v360 Filter Parameter Reference

ParameterDescription
eInput format: equirectangular
flatOutput format: flat (perspective projection)
h_fov=120Horizontal field of view (degrees)
v_fov=90Vertical field of view (degrees)
yaw=0Horizontal rotation (-180 to 180)
pitch=0Vertical rotation (-90 to 90)

Adjusting Field of View

You can adjust the field of view depending on the use case.

# Wide angle (120 x 90) - shows a broad area
-vf "v360=e:flat:h_fov=120:v_fov=90"

# Standard (90 x 60) - natural appearance
-vf "v360=e:flat:h_fov=90:v_fov=60"

# Telephoto-like (60 x 45) - close-up of a narrow area
-vf "v360=e:flat:h_fov=60:v_fov=45"

Changing the Viewpoint

Use yaw and pitch to change the extraction direction.

# Front (default)
-vf "v360=e:flat:h_fov=120:v_fov=90:yaw=0:pitch=0"

# Right 90 degrees
-vf "v360=e:flat:h_fov=120:v_fov=90:yaw=90:pitch=0"

# Rear
-vf "v360=e:flat:h_fov=120:v_fov=90:yaw=180:pitch=0"

# Upward
-vf "v360=e:flat:h_fov=120:v_fov=90:yaw=0:pitch=45"

# Downward
-vf "v360=e:flat:h_fov=120:v_fov=90:yaw=0:pitch=-45"

Batch Processing Multiple Files

Script for Video Files

#!/bin/bash

INPUT_DIR="/path/to/videos"
OUTPUT_DIR="/path/to/thumbnails"

mkdir -p "$OUTPUT_DIR"

for f in "$INPUT_DIR"/*.mp4; do
    filename=$(basename "$f" .mp4)
    ffmpeg -i "$f" -ss 00:00:05 -vframes 1 \
      -vf "v360=e:flat:h_fov=120:v_fov=90:yaw=0:pitch=0,scale=640:-1" \
      "$OUTPUT_DIR/${filename}_thumb.jpg" -y
    echo "Created: ${filename}_thumb.jpg"
done

echo "Done"

Script for Image Files

#!/bin/bash

INPUT_DIR="/path/to/photos"
OUTPUT_DIR="/path/to/thumbnails"

mkdir -p "$OUTPUT_DIR"

for f in "$INPUT_DIR"/*.jpg; do
    filename=$(basename "$f" .jpg)
    ffmpeg -i "$f" \
      -vf "v360=e:flat:h_fov=120:v_fov=90:yaw=0:pitch=0,scale=640:-1" \
      "$OUTPUT_DIR/${filename}_thumb.jpg" -y
    echo "Created: ${filename}_thumb.jpg"
done

echo "Done"

Creating Thumbnails from 4 Directions

This script creates thumbnails from 4 directions to get an overview of the 360-degree content.

#!/bin/bash

INPUT="$1"
OUTPUT_DIR="$2"
BASENAME=$(basename "$INPUT" | sed 's/\.[^.]*$//')

mkdir -p "$OUTPUT_DIR"

# Front
ffmpeg -i "$INPUT" -ss 00:00:05 -vframes 1 \
  -vf "v360=e:flat:h_fov=90:v_fov=60:yaw=0:pitch=0,scale=480:-1" \
  "$OUTPUT_DIR/${BASENAME}_front.jpg" -y

# Right
ffmpeg -i "$INPUT" -ss 00:00:05 -vframes 1 \
  -vf "v360=e:flat:h_fov=90:v_fov=60:yaw=90:pitch=0,scale=480:-1" \
  "$OUTPUT_DIR/${BASENAME}_right.jpg" -y

# Rear
ffmpeg -i "$INPUT" -ss 00:00:05 -vframes 1 \
  -vf "v360=e:flat:h_fov=90:v_fov=60:yaw=180:pitch=0,scale=480:-1" \
  "$OUTPUT_DIR/${BASENAME}_back.jpg" -y

# Left
ffmpeg -i "$INPUT" -ss 00:00:05 -vframes 1 \
  -vf "v360=e:flat:h_fov=90:v_fov=60:yaw=-90:pitch=0,scale=480:-1" \
  "$OUTPUT_DIR/${BASENAME}_left.jpg" -y

echo "Created thumbnails from 4 directions"

Usage example:

./create_4dir_thumbs.sh video.mp4 ./thumbnails

Summary

  • 360-degree content is stored in equirectangular format, and simple resizing causes distortion
  • By converting to flat (perspective projection) using ffmpeg’s v360 filter, you can create natural thumbnails
  • Adjust the field of view with h_fov/v_fov and the viewpoint direction with yaw/pitch

References