Class

AVCaptureMovieFileOutput

A capture output that records video and audio to a QuickTime movie file.

Declaration

@interface AVCaptureMovieFileOutput : AVCaptureFileOutput

Overview

This class is the movie file equivalent of AVCapturePhotoOutput. Use it to export or save movie files from capture session content.

The timeMapping.target.start of the first track segment must be kCMTimeZero, and the timeMapping.target.start of each subsequent track segment must equal CMTimeRangeGetEnd, when passing in the previous AVCompositionTrackSegment's timeMapping.target. You can use validateTrackSegments:error: to ensure that an array of track segments conforms to this rule.

Starting in iOS 12, photo formats no longer list the AVCaptureMovieFileOutput.class as being unsupported. If you construct a session with a photo format as input and a movie file output, you can record movies. The resolution of the video track in the movie follows the conventions established by the AVCaptureVideoDataOutput; namely, when using the photo preset, you receive video buffers with size approximating the screen size. Video outputs are a proxy for photo preview in this configuration.

If you set the AVCaptureDevice format to a high-resolution photo format, you receive full-resolution (5, 8, or 12 MP depending on the device) video buffers into your movie. If the capture session’s automaticallyConfiguresCaptureDeviceForWideColor property is YES, the session selects sRGB as the video colorspace in your movie. You can override this behavior by adding an AVCapturePhotoOutput to your session and configuring its photo format or AVCaptureSessionPresetPhoto preset for a photo output.

Topics

Initializing Movies

Configuring Movies

movieFragmentInterval

The number of seconds of output that are written per fragment.

metadata

The metadata for the output file.

Preparing Movie Capture for Open GOP

Generate independently decodable frames in the HEVC format, or opt out for older devices.

Managing Output Settings

- supportedOutputSettingsKeysForConnection:

The list of supported keys for the output settings dictionary.

- outputSettingsForConnection:

Returns the options used to reencode media from a given connection as it's being recorded.

- setOutputSettings:forConnection:

Sets the options dictionary used to reencode media from the given connection as it's being recorded.

availableVideoCodecTypes

The video codec types currently supported for recording movie files.

Video Settings Dictionaries

Define output image and video formats by using the key and value constants.

AVVideoCodecType

A set of constants used to describe codecs for video capture.

Setting Orientation

- recordsVideoOrientationAndMirroringChangesAsMetadataTrackForConnection:

A Boolean indicating whether the capture device records video orientation.

- setRecordsVideoOrientationAndMirroringChanges:asMetadataTrackForConnection:

A Boolean indicating whether the capture device sets video orientation.

Type Methods

Relationships

Inherits From

See Also

Movie and Video Capture

Capturing Video in Alternative Formats

Change the format used for capturing movie files.

AVCaptureVideoDataOutput

A capture output that records video and provides access to video frames for processing.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software