How can I livestream mv-hevc from an iPhone 15 pro
Asked on 07/31/2024
1 search
To livestream MV-HEVC from an iPhone 15 Pro, you can leverage the new spatial video recording capabilities introduced in the "Build compelling spatial photo and video experiences" session at WWDC 2024. Here are the steps to get started:
-
Set Up AV Capture Session:
- Create an
AVCaptureSession
. - Add an input from the built-in dual wide camera, which includes both the wide and ultra-wide cameras.
- Add a movie file output to manage the output and write it to disk.
- Create an
-
Enable Spatial Video Recording:
- Change the
AVCaptureDevice
to use the built-in dual wide camera. - Pick a video format that supports spatial video by iterating through the formats in the video device and checking if
isSpatialVideoCaptureSupported
is true. - Enable spatial video recording on the output by setting
isSpatialVideoCaptureEnabled
to true.
- Change the
-
Video Stabilization and Preview:
- Set the preferred video stabilization mode to
cinematicExtendedEnhanced
for smoother videos. - Use the
AVCaptureVideoPreviewLayer
API to get a video preview feed.
- Set the preferred video stabilization mode to
For more detailed code examples and explanations, you can refer to the session Build compelling spatial photo and video experiences (04:13).
Relevant Sessions
If you need more specific details or code snippets, please let me know!

Discover media performance metrics in AVFoundation
Discover how you can monitor, analyze, and improve user experience with the new media performance APIs. Explore how to monitor AVPlayer performance for HLS assets using different AVMetricEvents, and learn how to use these metrics to understand and triage player performance issues.

Introducing enterprise APIs for visionOS
Find out how you can use new enterprise APIs for visionOS to create spatial experiences that enhance employee and customer productivity on Apple Vision Pro.

Capture HDR content with ScreenCaptureKit
Learn how to capture high dynamic colors using ScreenCaptureKit, and explore new features like HDR support, microphone capture, and straight-to-file recording.