<!--
{
  "documentType" : "article",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/recording-movies-in-alternative-formats",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Recording movies in alternative formats"
}
-->

# Recording movies in alternative formats

Change the default format for capturing movie files.

## Discussion

You use [`AVCaptureMovieFileOutput`](/documentation/AVFoundation/AVCaptureMovieFileOutput) to capture QuickTime movie files, and the framework chooses the HEVC format by default on most iPhone and iPad models. However, you can change the default format in advance if you know you need a different format.

If your app shares the captured video using a system share sheet, the system automatically converts the video to a format thatʼs compatible with the destination device. However, if your app saves or shares captured video internally, for applications outside the system share sheet, you need to use a video-capture format thatʼs compatible with all target devices. This article shows you how to change the capture format dynamically, so that videos captured in your app begin in the desired format.

### Change the default capture format

You can change the default format at capture time by specifying it in the output settings for capturing movie files. Each capture device has a dictionary of settings that you adjust to control properties of the output movie file. For example, to capture video in H.264/MPEG-4 AVC, set the output settings key [`AVVideoCodecKey`](/documentation/AVFoundation/AVVideoCodecKey) to [`h264`](/documentation/AVFoundation/AVVideoCodecType/h264), as the example below shows:

```objc
#import <AVFoundation/AVFoundation.h>

AVCaptureMovieFileOutput *movieFileOutput = // Your AVCaptureMovieFileOutput. //;
    
if ([movieFileOutput.availableVideoCodecTypes containsObject:AVVideoCodecTypeH264]) {
    AVCaptureConnection* connection = [movieFileOutput connectionWithMediaType:AVMediaTypeVideo];
    // Use the H.264 codec to encode the video.
    [movieFileOutput setOutputSettings:@{AVVideoCodecKey: AVVideoCodecTypeH264} forConnection:connection];
}
```

For a list of supported capture codecs, see [`AVVideoCodecType`](/documentation/AVFoundation/AVVideoCodecType).

### Convert previously captured movie files

In addition to saving or sharing captured video using a different default format, you can also convert existing movie file content by generating a new movie file based on the contents of the existing file. For details on how, see [Exporting video to alternative formats](/documentation/AVFoundation/exporting-video-to-alternative-formats).

## See Also

[`AVVideoCodecTypeH264`](/documentation/AVFoundation/AVVideoCodecType/h264)

The H.264 video codec.

[`AVVideoCodecTypeHEVC`](/documentation/AVFoundation/AVVideoCodecType/hevc)

The HEVC video codec.

[`AVVideoCodecTypeJPEG`](/documentation/AVFoundation/AVVideoCodecType/jpeg)

The JPEG video codec.

[`AVVideoCodecTypeAppleProRes422`](/documentation/AVFoundation/AVVideoCodecType/proRes422)

The Apple ProRes 422 video codec.

[`AVVideoCodecTypeAppleProRes4444`](/documentation/AVFoundation/AVVideoCodecType/proRes4444)

The Apple ProRes 4444 video codec.



---

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)