CaptureMovieFileOutput class

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

This class is the movie file equivalent of CapturePhotoOutput. 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 CompositionTrackSegment'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 CaptureMovieFileOutput 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 CaptureVideoDataOutput; 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 CaptureDevice 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 true, the session selects sRGB as the video colorspace in your movie. You can override this behavior by adding an CapturePhotoOutput to your session and configuring its photo format or CaptureSessionPreset.photo preset for a photo output.

Inheritance
Mixed in types
Annotations
  • @Reference('av_foundation/av_foundation/CaptureMovieFileOutput')

Constructors

CaptureMovieFileOutput()
Creates a movie file output.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

availableVideoCodecTypes() Future<List<String>>
The video codec types currently supported for recording movie files.
connectionWithMediaType(String mediaType) Future<CaptureConnection?>
Returns the first connection in the connections array with an input port of a specified media type.
inherited
isRecording() Future<bool>
Indicates whether recording is in progress.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
outputFileURL() Future<Uri>
The file URL of the file to which the receiver is currently recording incoming buffers.
inherited
setMaxRecordedFileSize(int fileSize) Future<void>
Specifies the maximum size, in bytes, of the data that should be recorded by the receiver.
inherited
startRecordingToOutputFileURL(String outputFileURL, CaptureFileOutputRecordingDelegate delegate) Future<void>
Starts recording media to the specified output URL.
inherited
stopRecording() Future<void>
Tells the receiver to stop recording to the current file.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited