This article introduces how to programmatically check from the command line whether GPS information is contained in 360-degree video files (.insv) shot with Insta360.

Background

Videos shot with Insta360 cameras have location information embedded when the GPS function is enabled. However, depending on the shooting settings and GPS signal reception conditions, files with and without GPS information may be mixed.

When organizing a large number of files, there are cases where you want to classify files by the presence or absence of GPS information.

Tool Used

exiftool is used. On macOS, it can be installed with Homebrew.

brewinstallexiftool

Key Point: The -ee Option Is Required

Insta360’s .insv files embed GPS information not in standard EXIF tags but in a proprietary track within the MP4 container.

Therefore, GPS information cannot be read with the normal exiftool command.

#e#xTi(hfnitosooowluitl-plGuPtnS)oPtosfiitnidonGPvSidienof.oirnmsavtion

By using the -ee (extractEmbedded) option, GPS information can be extracted from the embedded metadata track.

#e#xTiGhfPitSsooPcloasn-ietreieoa-ndGP:GSPP2So6siidntefigoorn2m0av'tiid3oe7no..8i8n"svN,126deg49'43.32"E

Checking a Single File

exiftool-ee-GPSPositionfilename.insv

If GPS information is present, the location information is output; if absent, nothing is output.

Batch Checking Multiple Files

The following shell script checks the GPS presence for all .insv files in a folder.

#eefd!ccoo/hhrnbooeiffgiefn""ipfli/="ilssb=ne=[ea=n$eees/a(-ccchGpmenhhhPaexoooSt=i"h$f$"""I/(tgntbopfoaosG$Go/sl"PgPrfeSpSmon-]salae;p"atdmerbieetesor-hsen/"Geen*$PnntC.fSt:hi"P:en)o$css$fkvifi;til=ile=doen=onna"am"me$e"f""2>/dev/null|grep"GPSPosition"|head-1)

Execution Example

===GGGGGGGGPPPPPPPPGSSSSSSSSPSpPpPaapProrobbroIesesssesnsisieesifetetnnetoninittnirtoto::tom:n:n:naVVtVVIIViIIDDIoDD__Dn__22_22002C00220h22552e55115c11111k1122122442=44__4=__11_=111110011122023793041234418__6_:_:00_:000000202__02_6_600_6002202d2d672d0e1e..9e.g.gii.giinnin2n2ssn2s0s0vvs0v'v'v'323017...488268"""NNN,,,111222666dddeeeggg554239'''514323...773292"""EEE

Script to Automatically Classify Files

This script classifies files into separate folders based on the presence or absence of GPS information.

#SGNmfde!OPOkooc/US_drnhbR_GieoiCDPrffgiefnEISipfli"/_R_-ilssDbD=Dpne=[eoaI"In$ececnsR/R""a(-cpcpeh=p=$$menhh""a"GSexo"o"/t/PO=i"$$phpSU$f$"f"fa/a_R(tgG"G"tttDCbopPPhhIEaosS"S"//R_sl"$$twt"DepGaNoioIn-]rPbO/t/"Rae;eSs_shw$"mes_eGo_iN/eteDnPugtO*-hnItSrph_."GetR:_csoGi$Pn:/De"uPnfS"$I"tSs"P$fR__v)ofi/gD;sil"pIilesRdten""oinaoamnmee"$f"$$N2GO>P_/SGd_PeDSvI_/RDn"IuRl"l|grep"GPSPosition")

Getting More Detailed GPS Information

You can also retrieve information beyond latitude and longitude.

exiftool-ee-G3-GPS:allvideo.insv

Example output:

[[[[DDDDoooocccc33332222555522221111]]]]GGGGPPPPSSSSDLLSaaopttneeige/tidTutidumedee::::2216062.2635d6:ed31ge11g:22044'9'03274:.338.483:"24"6N.E999Z

Output in CSV Format

To output information for multiple files in CSV:

exiftool-ee-csv-GPSPosition-GPSDateTime.insv>gps_info.csv

Summary

  • GPS information in Insta360 .insv files is embedded in a proprietary format
  • Readable with the exiftool -ee option
  • Batch processing of large numbers of files is possible with shell scripts

References