What are the metadata tags for 360 video, how do I set them from Blender / ffmpeg / script?

I want to start making more 180* / 360* animations with Blender. I recently read that VLC is among the first video players to properly support panoramic video, it’s one I use so that’s great news on the matter.

Only problem is I was told such videos must be encoded with special metadata baked into them, indicating it’s a sphere mapped video and what sort. It was suggested using special software to set this data, which is an extra dependency I’d like to avoid as I prefer using just Blender to produce the frames then ffmpeg to compile them. I understand I need to include specific properties like the FOV of the video, something I assume I can fetch from the settings of my camera in Blender and pipe into the appropriate video tags.

Can anyone list the metadata tags I need to set on panoramic and / or stereoscopic clips for video players to recognize them accordingly? Then how do I set them either in ffmpeg, from Blender if they can be baked into exr images at render time, VLC if it allows writing that information to a video, or at least a shell script for Linux which I’m familiar with and could easily use? I alternate between mp4 and ogv for video format if they’re relevant.

I managed to find this blessed article providing me with an answer. I’m not sure if this is a stable solution long term and the format may change in the future, but for now it appears to work:

http://p.cweiske.de/621

You can install exiftool which is available in most Linux distributions. Then you only need to run this one command to add the proper tag:

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

After that VLC recognizes the video as 360 and you can look around with the mouse. Simply naming the video “file_360.mp4” won’t work, I wish they supported this simpler option as well. Better than having to use Google’s highly specific tool none the less.

Would like some feedback on this. Also it doesn’t explain what to do when the video is stereoscopic, to recognize side-by-side separation and the anaglyph filter for merging them into red-cyan format.