{"type":"rich","version":"1.0","provider_name":"phorkie","provider_url":"https:\/\/p.cweiske.de\/","title":"Add metadata to 360\u00b0 mp4 videos for VLC","author_name":"Christian Weiske","cache_age":86400,"width":900,"height":900,"html":"<!-- embedding all files of https:\/\/p.cweiske.de\/621 -->\n<link rel=\"stylesheet\" href=\"https:\/\/p.cweiske.de\/css\/embed.css\"\/>\n<div class=\"phork\" id=\"621\">\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  \n<div class=\"document\">\n\n\n<p>VLC 3.0 supports 360\u00b0 videos. How can I mark up a mp4 file so that VLC recognizes it as 360 degree video?<\/p>\n<p>It's not possible with exiftool.\nYou have to use the spatial media metadata injector from <a class=\"reference external\" href=\"https:\/\/github.com\/google\/spatial-media\/tree\/master\/spatialmedia\">https:\/\/github.com\/google\/spatial-media\/tree\/master\/spatialmedia<\/a><\/p>\n<p>My findings:<\/p>\n<div class=\"section\" id=\"spherical-video-rfc\">\n<h1>Spherical Video RFC<\/h1>\n<p><a class=\"reference external\" href=\"https:\/\/github.com\/google\/spatial-media\/blob\/master\/docs\/spherical-video-rfc.md\">https:\/\/github.com\/google\/spatial-media\/blob\/master\/docs\/spherical-video-rfc.md<\/a><\/p>\n<p>Git commit:<\/p>\n<ul class=\"simple\">\n<li>c3d173385bf0e5ad915328e4b91939c1ae367106<\/li>\n<li>demux: mp4: support the 360 spherical video box<\/li>\n<li><a class=\"reference external\" href=\"http:\/\/git.videolan.org\/?p=vlc.git;a=commitdiff;h=c3d173385bf0e5ad915328e4b91939c1ae367106;hp=08d26ea02f5c6c1e1169fd9f315a00e88241f03e\">http:\/\/git.videolan.org\/?p=vlc.git;a=commitdiff;h=c3d173385bf0e5ad915328e4b91939c1ae367106;hp=08d26ea02f5c6c1e1169fd9f315a00e88241f03e<\/a><\/li>\n<\/ul>\n<p>VLC only tries to find the string &quot;GSpherical:Spherical&quot; in the meta data to activate the mode.<\/p>\n<p>exiftool:<\/p>\n<pre class=\"literal-block\">\n$ exiftool -XMP-GSpherical:Spherical=&quot;true&quot; file.mp4\n<\/pre>\n<p>Unfortunately, exiftool writes this in normal XMP data, but the spec v1 wants it in an atom with uuid <tt class=\"docutils literal\"><span class=\"pre\">ffcc8263-f855-4a93-8814-587a02521fdd<\/span><\/tt>. exiftool does not support this.<\/p>\n<p>You can check this with AtomicParsley (<tt class=\"docutils literal\">apt install atomicparsley<\/tt>):<\/p>\n<pre class=\"literal-block\">\nAtomicParsley file.mp4 -T 1\n<\/pre>\n<p>This special uuid is missing.<\/p>\n<hr class=\"docutils\" \/>\n<p>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:<\/p>\n<pre class=\"literal-block\">\n$ exiftool -XMP-GSpherical:Spherical=&quot;true&quot; -XMP-GSpherical:Stitched=&quot;true&quot; -XMP-GSpherical:StitchingSoftware=dummy -XMP-GSpherical:ProjectionType=equirectangular file.mp4\n<\/pre>\n<hr class=\"docutils\" \/>\n<p>Adding <tt class=\"docutils literal\"><span class=\"pre\">XMP-GPano:ProjectionType=equirectangular<\/span><\/tt> does also not help:<\/p>\n<pre class=\"literal-block\">\n$ exiftool -ProjectionType=&quot;equirectangular&quot; file.mp4\n<\/pre>\n<\/div>\n<div class=\"section\" id=\"spherical-video-v2\">\n<h1>Spherical Video V2<\/h1>\n<p><a class=\"reference external\" href=\"https:\/\/github.com\/google\/spatial-media\/blob\/master\/docs\/spherical-video-v2-rfc.md\">https:\/\/github.com\/google\/spatial-media\/blob\/master\/docs\/spherical-video-v2-rfc.md<\/a><\/p>\n<p>git commit in vlc:<\/p>\n<ul class=\"simple\">\n<li>cf8b24f05438d6bc451e0d17bf2bf3d006a5cbe3<\/li>\n<li>demux: mp4: support 360\u00b0 v2 spatial metadata<\/li>\n<li><a class=\"reference external\" href=\"http:\/\/git.videolan.org\/?p=vlc.git;a=commitdiff;h=cf8b24f05438d6bc451e0d17bf2bf3d006a5cbe3;hp=1afd117faf50e266998ace5f08f06e52b2260958\">http:\/\/git.videolan.org\/?p=vlc.git;a=commitdiff;h=cf8b24f05438d6bc451e0d17bf2bf3d006a5cbe3;hp=1afd117faf50e266998ace5f08f06e52b2260958<\/a><\/li>\n<\/ul>\n<p>v2 of the spec wants special mp4 atoms\/boxes that exiftool is not able to write :\/<\/p>\n<ul class=\"simple\">\n<li><a class=\"reference external\" href=\"https:\/\/sno.phy.queensu.ca\/~phil\/exiftool\/TagNames\/QuickTime.html#sv3d\">https:\/\/sno.phy.queensu.ca\/~phil\/exiftool\/TagNames\/QuickTime.html#sv3d<\/a><\/li>\n<li><a class=\"reference external\" href=\"https:\/\/sno.phy.queensu.ca\/~phil\/exiftool\/TagNames\/QuickTime.html#equi\">https:\/\/sno.phy.queensu.ca\/~phil\/exiftool\/TagNames\/QuickTime.html#equi<\/a><\/li>\n<\/ul>\n<\/div>\n<div class=\"section\" id=\"also\">\n<h1>Also<\/h1>\n<ul class=\"simple\">\n<li><a class=\"reference external\" href=\"https:\/\/trac.videolan.org\/vlc\/ticket\/21752\">https:\/\/trac.videolan.org\/vlc\/ticket\/21752<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/621\/rev-raw\/ac6dc8000b836d8e92dd52c0ce7c05b084a75299\/README.rst\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/621#README.rst\">README.rst<\/a>\n <\/div>\n<\/div>\n<\/div>\n"}
