<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureMovieFileOutput",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureMovieFileOutput"
  },
  "title" : "AVCaptureMovieFileOutput"
}
-->

# AVCaptureMovieFileOutput

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

```
class AVCaptureMovieFileOutput
```

## Overview

A movie file output provides a complete file recording interface for writing media data to QuickTime movie files. It includes the ability to configure QuickTime-specific options, including writing metadata collections to each file, specify media encoding options for each track, and specify the interval at which it writes movie fragments.

## Topics

### Creating a movie file output

[`-  init`](/documentation/AVFoundation/AVCaptureMovieFileOutput/init())

Creates a new of movie file output.

[`+  new`](/documentation/AVFoundation/AVCaptureMovieFileOutput/new)

Returns a new movie file output object.

### Configuring movies

[`movieFragmentInterval`](/documentation/AVFoundation/AVCaptureMovieFileOutput/movieFragmentInterval)

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

[`metadata`](/documentation/AVFoundation/AVCaptureMovieFileOutput/metadata)

The metadata for the output file.

### Managing output settings

[`-  supportedOutputSettingsKeysForConnection:`](/documentation/AVFoundation/AVCaptureMovieFileOutput/supportedOutputSettingsKeys(for:))

Returns a list of supported keys to use in the output settings dictionary.

[`-  outputSettingsForConnection:`](/documentation/AVFoundation/AVCaptureMovieFileOutput/outputSettings(for:))

Returns the settings the output uses to encode media from the specified connection.

[`-  setOutputSettings:forConnection:`](/documentation/AVFoundation/AVCaptureMovieFileOutput/setOutputSettings(_:for:))

Sets the options the output uses to encode media from the given connection while recording.

[`availableVideoCodecTypes`](/documentation/AVFoundation/AVCaptureMovieFileOutput/availableVideoCodecTypes)

The video codecs types the output supports for recording movie files.

### Enabling spatial capture

[`spatialVideoCaptureSupported`](/documentation/AVFoundation/AVCaptureMovieFileOutput/isSpatialVideoCaptureSupported)

A Boolean value that indicates whether a movie file output supports capturing spatial videos.

[`spatialVideoCaptureEnabled`](/documentation/AVFoundation/AVCaptureMovieFileOutput/isSpatialVideoCaptureEnabled)

A Boolean value that indicates whether a movie file output captures spatial videos.

### Setting orientation

[`-  recordsVideoOrientationAndMirroringChangesAsMetadataTrackForConnection:`](/documentation/AVFoundation/AVCaptureMovieFileOutput/recordsVideoOrientationAndMirroringChangesAsMetadataTrack(for:))

A Boolean value that indicates whether the movie file output records video orientation and mirroring information as a metadata track.

[`-  setRecordsVideoOrientationAndMirroringChanges:asMetadataTrackForConnection:`](/documentation/AVFoundation/AVCaptureMovieFileOutput/setRecordsVideoOrientationAndMirroringChangesAsMetadataTrack(_:for:))

Sets whether the movie file output creates a timed metadata track to capture changes to the connection’s video orientation and mirroring.

### Restricting camera switching

[`primaryConstituentDeviceSwitchingBehaviorForRecordingEnabled`](/documentation/AVFoundation/AVCaptureMovieFileOutput/isPrimaryConstituentDeviceSwitchingBehaviorForRecordingEnabled)

A Boolean value that indicates whether to restrict constituent device switching behavior during recording.

[`-  setPrimaryConstituentDeviceSwitchingBehaviorForRecording:restrictedSwitchingBehaviorConditions:`](/documentation/AVFoundation/AVCaptureMovieFileOutput/setPrimaryConstituentDeviceSwitchingBehaviorForRecording(_:restrictedSwitchingBehaviorConditions:))

Sets the camera switching behavior to use during recording.

[`primaryConstituentDeviceSwitchingBehaviorForRecording`](/documentation/AVFoundation/AVCaptureMovieFileOutput/primaryConstituentDeviceSwitchingBehaviorForRecording)

The camera switching behavior to use for recording.

[`primaryConstituentDeviceRestrictedSwitchingBehaviorConditionsForRecording`](/documentation/AVFoundation/AVCaptureMovieFileOutput/primaryConstituentDeviceRestrictedSwitchingBehaviorConditionsForRecording)

The conditions during which camera switching may occur while recording.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`AVCaptureFileOutput`](/documentation/AVFoundation/AVCaptureFileOutput)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)