Add metadata to 360° mp4 videos for VLC

raw

README.rst

VLC 3.0 supports 360° videos. How can I mark up a mp4 file so that VLC recognizes it as 360 degree video?

It's not possible with exiftool. You have to use the spatial media metadata injector from https://github.com/google/spatial-media/tree/master/spatialmedia

My findings:

Spherical Video RFC

https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md

Git commit:

VLC only tries to find the string "GSpherical:Spherical" in the meta data to activate the mode.

exiftool:

$ exiftool -XMP-GSpherical:Spherical="true" file.mp4

Unfortunately, exiftool writes this in normal XMP data, but the spec v1 wants it in an atom with uuid ffcc8263-f855-4a93-8814-587a02521fdd. exiftool does not support this.

You can check this with AtomicParsley (apt install atomicparsley):

AtomicParsley file.mp4 -T 1

This special uuid is missing.


The following command will make it look as if the correct metadata is in your video file, but it actually will not work with VLC because of the missing uuid:

$ exiftool -XMP-GSpherical:Spherical="true" -XMP-GSpherical:Stitched="true" -XMP-GSpherical:StitchingSoftware=dummy -XMP-GSpherical:ProjectionType=equirectangular file.mp4

Adding XMP-GPano:ProjectionType=equirectangular does also not help:

$ exiftool -ProjectionType="equirectangular" file.mp4
Christian Weiske Christian Weiske
owner

History