<!--
{
  "availability" : [
    "Xcode: 26.0.0 -",
    "macOS: 26.0.0 -"
  ],
  "documentType" : "article",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/converting-projected-video-to-apple-projected-media-profile",
  "metadataVersion" : "0.1.0",
  "role" : "sampleCode",
  "title" : "Converting projected video to Apple Projected Media Profile"
}
-->

# Converting projected video to Apple Projected Media Profile

Convert content with equirectangular or half-equirectangular projection to APMP.

## Overview

> Note: This sample code project is associated with WWDC25 session 297: [Learn about the Apple Projected Media Profile](https://developer.apple.com/videos/play/wwdc2025/297).

### 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 `equirectangular` or `halfequirectangular`.

Other options:

- `--viewPackingKind <view_packing_kind>` (or `-v`): Manually specifies the frame-packing mode, which can be `sidebyside` or `overunder`. The app ignores this option if you specify the `--autoDetect` option.
- `--baseline` (or `-b`): Specifies a baseline in millimeters (for example, `--baseline 64.0` for a 64mm baseline).
- `--fov` (or `-f`): Specifies a horizontal field of view in degrees (for example, `--fov 80.0` for 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`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)