<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed><type>rich</type><version>1.0</version><provider_name>phorkie</provider_name><provider_url>https://p.cweiske.de/</provider_url><title>Add metadata to 360° mp4 videos for VLC</title><author_name>Christian Weiske</author_name><cache_age>86400</cache_age><width>900</width><height>900</height><html>&lt;!-- embedding all files of https://p.cweiske.de/621 --&gt;
&lt;link rel="stylesheet" href="https://p.cweiske.de/css/embed.css"/&gt;
&lt;div class="phork" id="621"&gt;
    &lt;div class="phork-file"&gt;
 &lt;div class="phork-content"&gt;
  
&lt;div class="document"&gt;


&lt;p&gt;VLC 3.0 supports 360° videos. How can I mark up a mp4 file so that VLC recognizes it as 360 degree video?&lt;/p&gt;
&lt;p&gt;It's not possible with exiftool.
You have to use the spatial media metadata injector from &lt;a class="reference external" href="https://github.com/google/spatial-media/tree/master/spatialmedia"&gt;https://github.com/google/spatial-media/tree/master/spatialmedia&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My findings:&lt;/p&gt;
&lt;div class="section" id="spherical-video-rfc"&gt;
&lt;h1&gt;Spherical Video RFC&lt;/h1&gt;
&lt;p&gt;&lt;a class="reference external" href="https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md"&gt;https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Git commit:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;c3d173385bf0e5ad915328e4b91939c1ae367106&lt;/li&gt;
&lt;li&gt;demux: mp4: support the 360 spherical video box&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://git.videolan.org/?p=vlc.git;a=commitdiff;h=c3d173385bf0e5ad915328e4b91939c1ae367106;hp=08d26ea02f5c6c1e1169fd9f315a00e88241f03e"&gt;http://git.videolan.org/?p=vlc.git;a=commitdiff;h=c3d173385bf0e5ad915328e4b91939c1ae367106;hp=08d26ea02f5c6c1e1169fd9f315a00e88241f03e&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;VLC only tries to find the string &amp;quot;GSpherical:Spherical&amp;quot; in the meta data to activate the mode.&lt;/p&gt;
&lt;p&gt;exiftool:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
$ exiftool -XMP-GSpherical:Spherical=&amp;quot;true&amp;quot; file.mp4
&lt;/pre&gt;
&lt;p&gt;Unfortunately, exiftool writes this in normal XMP data, but the spec v1 wants it in an atom with uuid &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;ffcc8263-f855-4a93-8814-587a02521fdd&lt;/span&gt;&lt;/tt&gt;. exiftool does not support this.&lt;/p&gt;
&lt;p&gt;You can check this with AtomicParsley (&lt;tt class="docutils literal"&gt;apt install atomicparsley&lt;/tt&gt;):&lt;/p&gt;
&lt;pre class="literal-block"&gt;
AtomicParsley file.mp4 -T 1
&lt;/pre&gt;
&lt;p&gt;This special uuid is missing.&lt;/p&gt;
&lt;hr class="docutils" /&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
$ exiftool -XMP-GSpherical:Spherical=&amp;quot;true&amp;quot; -XMP-GSpherical:Stitched=&amp;quot;true&amp;quot; -XMP-GSpherical:StitchingSoftware=dummy -XMP-GSpherical:ProjectionType=equirectangular file.mp4
&lt;/pre&gt;
&lt;hr class="docutils" /&gt;
&lt;p&gt;Adding &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;XMP-GPano:ProjectionType=equirectangular&lt;/span&gt;&lt;/tt&gt; does also not help:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
$ exiftool -ProjectionType=&amp;quot;equirectangular&amp;quot; file.mp4
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="section" id="spherical-video-v2"&gt;
&lt;h1&gt;Spherical Video V2&lt;/h1&gt;
&lt;p&gt;&lt;a class="reference external" href="https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md"&gt;https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;git commit in vlc:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;cf8b24f05438d6bc451e0d17bf2bf3d006a5cbe3&lt;/li&gt;
&lt;li&gt;demux: mp4: support 360° v2 spatial metadata&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://git.videolan.org/?p=vlc.git;a=commitdiff;h=cf8b24f05438d6bc451e0d17bf2bf3d006a5cbe3;hp=1afd117faf50e266998ace5f08f06e52b2260958"&gt;http://git.videolan.org/?p=vlc.git;a=commitdiff;h=cf8b24f05438d6bc451e0d17bf2bf3d006a5cbe3;hp=1afd117faf50e266998ace5f08f06e52b2260958&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;v2 of the spec wants special mp4 atoms/boxes that exiftool is not able to write :/&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://sno.phy.queensu.ca/~phil/exiftool/TagNames/QuickTime.html#sv3d"&gt;https://sno.phy.queensu.ca/~phil/exiftool/TagNames/QuickTime.html#sv3d&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://sno.phy.queensu.ca/~phil/exiftool/TagNames/QuickTime.html#equi"&gt;https://sno.phy.queensu.ca/~phil/exiftool/TagNames/QuickTime.html#equi&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="also"&gt;
&lt;h1&gt;Also&lt;/h1&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://trac.videolan.org/vlc/ticket/21752"&gt;https://trac.videolan.org/vlc/ticket/21752&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;

 &lt;/div&gt;
 &lt;div class="phork-meta"&gt;
  &lt;a href="https://p.cweiske.de/621/rev-raw/ac6dc8000b836d8e92dd52c0ce7c05b084a75299/README.rst" style="float: right"&gt;view raw source&lt;/a&gt;
  &lt;a href="https://p.cweiske.de/621#README.rst"&gt;README.rst&lt;/a&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</html></oembed>
