Sample Code

AVMultiCamPiP: Capturing from Multiple Cameras

Simultaneously record the output from the front and back cameras into a single movie file by using a multi-camera capture session.

Download

Overview

Configure the Sample Code Project

You must run this sample code on one of these devices:

  • An iPhone with an A12 or later processor

  • An iPad Pro with an A12X or later processor

See Also

Capture Sessions

Setting Up a Capture Session

Configure input devices, output media, preview views, and basic settings before capturing photos or video.

AVCam: Building a Camera App

Capture photos with depth data and record video using the front and rear iPhone and iPad cameras.

class AVCaptureSession

An object that manages capture activity and coordinates the flow of data from input devices to capture outputs.

class AVCaptureMultiCamSession

A subclass of AVCaptureSession that supports simultaneous capture from multiple inputs of the same media type.