Skip to main content
Encoding

360 and 180 Metadata

How to add the metadata that makes headsets, YouTube and other players play your video as 360 or 180, with the stereo eyes the right way round.

Last updated About 4 hours ago

A 360 or 180 video needs metadata in the file that tells players what it is, and for stereo, which eye is where. This article covers why players need it, adding it after an ffmpeg encode, setting it in Premiere Pro, and matching the stereo layout to your render.

Why Players Need Metadata

  • Without 360 or 180 metadata, YouTube and VR players play the video as a flat video. YouTube plays 360 and VR 180 video only once the file carries it, and headset players use it to detect the format without manual settings.

  • A stereo video also needs metadata that says it is stereo and which eye is where, or players show both eyes at once.

  • ffmpeg doesn't add this metadata, so add it afterwards (see below). Premiere Pro adds it on export.

Add Metadata after ffmpeg

  • Add the metadata with Google's Spatial Media Metadata Injector.

  • The commands below use its current code: on its GitHub page, use Code> Download ZIP.

  • Unzip it, open a terminal in the spatial-media-master folder and run the line for your video with Python 3. The input and output must be different files.

360 mono:

python spatialmedia -i -2 "DrivingPlate360.mp4" "DrivingPlate360_VR.mp4"

360 stereo (top-bottom):

python spatialmedia -i -2 --stereo=top-bottom "DrivingPlate360.mp4" "DrivingPlate360_VR.mp4"

VR180 (side-by-side):

python spatialmedia -i -2 --stereo=left-right --bounds=0:0:1073741824:1073741824 "DrivingPlate180.mp4" "DrivingPlate180_VR.mp4"
  • -2 writes the newer metadata YouTube asks for, and --bounds marks a VR180 video as 180 degrees wide.

Set Metadata in Premiere Pro

  • Set VR Metadata in the export settings: Stereoscopic Over/Under with 360 by 180 for Equirectangular ODS (VR 360), and Stereoscopic Side by Side with a 180 horizontal and vertical field of view for VR 180.

  • The full export steps, with screenshots, are in Export from Premiere Pro in Encode Your Frames to Video.

Match the Stereo Layout

  • Online players such as YouTube expect Top-Bottom for stereo 360 and Side-by-Side for VR 180. Keep both eyes in one file: players play both eyes from one file (see Keep Both Eyes in One File in Headset Delivery Settings).

  • Match the eye order in the metadata to the camera's Layout: VR 180 defaults to Side-by-Side (Left Eye on Left), and Equirectangular ODS (VR 360) to Top-Bottom (Left Eye on Top). The other layouts are in Layout in Projection.

  • If depth looks inverted in a player, with near things pushed away and far things pulled forward, the metadata's eye order doesn't match the camera's Layout: fix the metadata.