Converting projected video to Apple Projected Media Profile
Convert content with equirectangular or half-equirectangular projection to APMP.
Overview
Configure the sample code project
The app takes a path to a monoscopic or stereoscopic (frame-packed) side-by-side or over-under stereo input video file as a single command-line argument. To run the app in Xcode, click the Run button to convert the included side-by-side frame-packed stereoscopic 180 sample asset (Lighthouse_sbs.mp4), or choose Product > Scheme > Edit Scheme, and edit the path to your file on the Arguments tab of the Run build scheme action.
To add projected media metadata to an output file, pass one of the following two options:
--autoDetect(or-a)Examines the source file for spherical metadata compatible with APMP.
--projectionKind <projection_kind>(or-p)Specifies the projection type, which can be
equirectangularorhalfequirectangular.
Other options:
--viewPackingKind <view_packing_kind>(or-v)Manually specifies the frame-packing mode, which can be
sidebysideoroverunder. The app ignores this option if you specify the--autoDetectoption.--baseline(or-b)Specifies a baseline in millimeters (for example,
--baseline 64.0for a 64mm baseline).--fov(or-f)Specifies a horizontal field of view in degrees (for example,
--fov 80.0for an 80-degree field of view).
By default, the project’s scheme loads a side-by-side video from the Xcode project folder named Lighthouse_sbs.mp4.
See Also
Media writing
Converting side-by-side 3D video to multiview HEVC and spatial videoAdding a display mask rectangle metadata track to a movie fileWriting fragmented MPEG-4 files for HTTP Live StreamingCreating spatial photos and videos with spatial metadataTagging media with video color informationEvaluating an app’s video colorAVOutputSettingsAssistantAVAssetWriterAVAssetWriterInputAVAssetWriterInputPixelBufferAdaptorAVAssetWriterInputTaggedPixelBufferGroupAdaptorAVAssetWriterInputMetadataAdaptorAVAssetWriterInputGroup