CaptureMovieFileOutput class Null safety

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 of the first track segment must be kCMTimeZero, and the of each subsequent track segment must equal CMTimeRangeGetEnd, when passing in the previous CompositionTrackSegment's 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 preset for a photo output.

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


Creates a movie file output.


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


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.
isRecording() Future<bool>
Indicates whether recording is in progress.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
outputFileURL() Future<Uri>
The file URL of the file to which the receiver is currently recording incoming buffers.
setMaxRecordedFileSize(int fileSize) Future<void>
Specifies the maximum size, in bytes, of the data that should be recorded by the receiver.
startRecordingToOutputFileURL(String outputFileURL, CaptureFileOutputRecordingDelegate delegate) Future<void>
Starts recording media to the specified output URL.
stopRecording() Future<void>
Tells the receiver to stop recording to the current file.
toString() String
A string representation of this object.


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