---
title: AVVideoCodecKey
framework: avfoundation
role: symbol
role_heading: Global Variable
path: avfoundation/avvideocodeckey
---

# AVVideoCodecKey

A key to access the name of the codec for compressing video.

## Declaration

```swift
let AVVideoCodecKey: String
```

## Mentioned in

Recording movies in alternative formats

## Discussion

Discussion The value for this key is an instance of NSString, equivalent to CMVideoCodecType. Use this key to set the video compression format to H.264, HEVC, or JPEG, depending on the video codec types available in AVCaptureMovieFileOutput. Check available video codec types by consulting availableVideoCodecTypes.

## See Also

### Video codecs

- [AVVideoCodecType](avfoundation/avvideocodectype.md)
