How do you record stereoscopic video?

Generated on 12/12/2024

1 search

To record stereoscopic video, particularly spatial video, you can follow these steps as outlined in the session "Build compelling spatial photo and video experiences" from WWDC 2024:

  1. Change the AV Capture Device: Use the built-in dual wide camera, as spatial video requires both the wide and ultra-wide cameras to be streaming simultaneously.

  2. Select a Supported Video Format: Iterate through the video formats available on the device and check if spatial video capture is supported. Once you find a suitable format, set it as the active format on the video device.

  3. Enable Spatial Video Recording: Check if spatial video capture is supported and, if so, set isSpatialVideoCaptureEnabled to true. Note that this feature is only available on the iPhone 15 Pro.

These steps abstract away the complexity of synchronization, camera calibration, encoding, and metadata writing, providing you with a fully formed spatial video file on disk. For improved quality, you can also set the preferred video stabilization mode to "cinematic extended enhanced" for smoother videos.

For more details, you can refer to the session Build compelling spatial photo and video experiences (06:12).