This article introduces how to create natural-looking thumbnail images from 360-degree content (equirectangular format) captured with cameras like 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 surface, and the closer to the top and bottom edges, the more the image is stretched horizontally.

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

#ffSmipmepgle-ire3s6i0zveid(eroe.smupl4ts-sisn0a0:d0i0s:t0o5rtevdfrtahmuemsbn1ailv)f"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 images that look natural as seen by the human eye.

Tools Used

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

brewinstallffmpeg

Check that the v360 filter is included:

f#fmOpuetgpu-tf:il.tSeCrsv326>0/dVe-v>/VnuClolnv|ergtre3p60v3p6r0ojectionofvideo.

Basic Commands

Creating Thumbnails from Video

ffmtpvhefugm"b-vni3a6i30l6=.0ejv:pifgdlea-oty.:mhp_4fo-vs=s12000::v0_0f:o0v5=90v:fyraawm=e0s:p1it\ch=0,scale=640:-1"\

Creating Thumbnails from Photos

ffmtpvhefugm"b-vni3a6i30l6=.0ejp:phfgolta-oty.:jhp_gfo\v=120:v_fov=90:yaw=0:pitch=0,scale=640:-1"\

v360 Filter Parameter Explanation

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 the Field of View

The field of view can be adjusted depending on the use case.

###vvvWfSfTfited"a"l"evnvev3d3p3a6a6h6n0r0o0g=d=t=leeoee:(:-:f9flf(l0lil1a°aka2ttet0:x::°hh(h_6_6_xf0f0fo°o°o9v)vv0==x=°1-96)20400N:5:-:av°vvt_)_S_uffhfro-oooavvwvl=C=s=6l49a0o5a0p"s""pewe-iaudrpeanoacfreeaanarrowarea

Changing the Viewpoint

The direction of the extracted view can be changed using yaw and pitch.

#####vvvvvFfRfRfLfLfrieooo"g"a"o"o"nvhvrvkvkvt3t33i3i3666n6n6(0900g0g0d=0====eeeeuedef:d::p:o:afefffwfulglllnllaraaaattetttt):e::::hshhhh_____fffffooooovvvvv=====111112222200000:::::vvvvv_____fffffooooovvvvv=====9999900000:::::yyyyyaaaaawwwww=====09100:08::p:0ppip:iitipttcticchcthh=hc==0=h4-"0=54"0"5""

Batch Processing Multiple Files

Script for Video Files

#IOmfde!NUkooc/PTdrnhbUPieoiTUrfffen_Tifc"/D_-ilm"hDbIDpnepv$ooaRInefOns=R""agU"eh"=$$m"TC"/"OIe-vPrp/UN=i3UeapTP$6TataPU("0_thtUTb$=De/hT_afeIdt_Ds":R:tDIef/oIRn-l$$v/R"asa{{it"/mstffdh*e:iieu.0hllomm"0_eesbp$:fnn"n4f0oaaa;"0vmmi:=eeld.01}}som52__"p0tt4:hh)vvuuf_mmrfbbao..mvjje=pps9gg0""1:y-\ayw=0:pitch=0,scale=640:-1"\

Script for Image Files

#IOmfde!NUkooc/PTdrnhbUPieoiTUrfffen_Tifc"/D_-ilm"hDbIDpnepv$ooaRInefOns=R""agU"eh"=$$m"TC"/"OIe-vPrp/UN=i3UeapTP$6TataPU("0_thtUTb$=De/hT_afeIdt_Ds":R:tDIef//oIRn\l$$p/R"aa{{ht"/mtffoh*e:iitu.hllomj"_eesbp$fnn"ngfoaaa;"vmmi=eeld.1}}soj2__"p0ttg:hh)vuu_mmfbbo..vjj=pp9gg0"":y-ayw=0:pitch=0,scale=640:-1"\

Creating Thumbnails from 4 Directions

Here is a script for creating thumbnails from 4 directions to get an overview of the entire 360-degree content.

#IOBm#f#f#f#fe!NUAkffffc/PTSdFm"Rm"Rm"Lm"hbUPEirpv$ipv$epv$epv$oiTUNroefOgefOaefOfefOn=TAngUhgUrgUtgU"/"_M-t"Tt"T"T"TCb$DEp-vP-vP-vP-vPra1I=i3Ui3Ui3Ui3Ues"R$"6T6T6T6Tah=($"0_"0_"0_"0_t"bO$=D$=D$=D$=De$aUIeIIeIIeIIeId2sTN:RN:RN:RN:R"ePPf/Pf/Pf/Pf/tnUUl$Ul$Ul$Ul$haTTa{Ta{Ta{Ta{um_"tB"tB"tB"tBmeD:A:A:A:AbI-hS-hS-hS-hSn"Rs_Es_Es_Es_Ea$"sfNsfNsfNsfNiIoAoAoAoAlN0vM0vM0vM0vMsP0=E0=E0=E0=EU:9}:9}:9}:9}fT00_00_00_00_r"0:f0:r0:b0:lo:vr:vi:va:vem|0_o0_g0_c0_f5fn5fh5fk5ft4sototo.o.ev.v.vjvjddv=jv=jv=pv=pif6pf6pf6gf6gr'r0gr0gr0"r0"esa:"a:"a:a:c/mymymy-my-t\ea-ea-eayeayi.swyswyswswo[====n^1019111-s.:089"]\p\:\0\0*ip::$tipp/ctii/hctt'=hcc)0=hh,0==s,00cs,,acsslaccelaa=ell4=ee84==0844:088-:001-::"1--"11\""\\\

Usage example:

brewinstallffmpeg

0

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, natural thumbnails can be created
  • The field of view can be adjusted with h_fov/v_fov, and the viewpoint direction with yaw/pitch

References