Video Settings Dictionaries

Define output image and video formats by using the key and value constants.

Topics

Video and Photo Codecs

AVVideoCodecKey

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

AVVideoCodecType

A set of constants used to describe codecs for video capture.

Compression

AVVideoCompressionPropertiesKey

A key to access the dictionary of compression properties for a video asset.

AVVideoAverageBitRateKey

A key to access the average bit rate—as bits per second—used in compressing video.

AVVideoQualityKey

A key to set the JPEG compression quality of the video.

AVVideoMaxKeyFrameIntervalKey

A key to access the maximum interval between keyframes.

AVVideoMaxKeyFrameIntervalDurationKey

A key to access the maximum interval duration between keyframes.

AVVideoAllowFrameReorderingKey

A key to access permission to reorder frames.

Size and Aspect Ratio

AVVideoWidthKey

A key to access the width of the video in pixels.

AVVideoHeightKey

A key to access the height of the video in pixels.

AVVideoPixelAspectRatioKey

A key to access the video's pixel aspect ratio.

AVVideoPixelAspectRatioVerticalSpacingKey

A key to access the pixel aspect ratio vertical spacing.

AVVideoPixelAspectRatioHorizontalSpacingKey

A key to access the pixel aspect ratio horizontal spacing.

Scaling Mode

AVVideoScalingModeFit

The string identifier for scaling a video to fit the surrounding view's dimensions.

AVVideoScalingModeKey

A key to retrieve the video scaling mode from a dictionary.

AVVideoScalingModeResize

The string identifier for resizing a video to fit the surrounding view's dimensions.

AVVideoScalingModeResizeAspect

The string identifier for resizing a video to its surrounding view's shorter dimension while preserving its aspect ratio.

AVVideoScalingModeResizeAspectFill

The string identifier for resizing a video to fit the surrounding view's longer dimension while preserving aspect ratio.

Clean Aperture

AVVideoCleanApertureKey

A key that defines the region within the video dimension displayed during playback.

AVVideoCleanApertureWidthKey

A key to access the width of video that's free from transition artifacts caused by signal encoding.

AVVideoCleanApertureHeightKey

A key to access the height of video that's free from transition artifacts caused by signal encoding.

AVVideoCleanApertureVerticalOffsetKey

A key to access the vertical offset of video that's free from transition artifacts caused by signal encoding.

AVVideoCleanApertureHorizontalOffsetKey

A key to access the horizontal offset of video that's free from transition artifacts caused by signal encoding.

Color Properties

Keys specify video properties, and corresponding keys and values specify the color primary, transfer function, and Y'CbCr matrix.

Setting Color Properties for a Specific Resolution

Choose the proper color property keys for the desired color range.

AVVideoAllowWideColorKey

The key for a dictionary that indicates whether the client can process wide color.

AVVideoColorPropertiesKey

The key for a dictionary that contains properties specifying video color.

AVVideoColorPrimariesKey

The key to identify color primaries in a color properties dictionary.

AVVideoColorPrimaries_P3_D65

The color primary uses the DCI-P3 D65 color space.

AVVideoColorPrimaries_SMPTE_C

The color primary uses the SMPTE C color space.

AVVideoColorPrimaries_EBU_3213

The color primary is in the EBU Tech. 3213 color space.

AVVideoColorPrimaries_ITU_R_709_2

The color primary is in the ITU_R BT.709 color space.

AVVideoColorPrimaries_ITU_R_2020

The color primary is in the ITU_R BT.2020 color space for ultra high definition television.

AVVideoTransferFunctionKey

The key to identify the transfer function in a color properties dictionary.

AVVideoTransferFunction_ITU_R_709_2

The transfer function for the ITU_R BT.709 color space.

AVVideoTransferFunction_SMPTE_240M_1995

The transfer function for the SMPTE 240M color space.

AVVideoTransferFunction_SMPTE_ST_2084_PQ

The transfer function for the SMPTE 2084 color space.

AVVideoYCbCrMatrixKey

The key to identify the Y'CbCr matrix in a color properties dictionary.

AVVideoYCbCrMatrix_ITU_R_601_4

The Y'CbCr color matrix for ITU-R BT.601 conversion.

AVVideoYCbCrMatrix_ITU_R_709_2

The Y'CbCr color matrix for ITU-R BT.709 conversion.

AVVideoYCbCrMatrix_SMPTE_240M_1995

The Y'CbCr color matrix for SMPTE 240M conversion.

AVVideoYCbCrMatrix_ITU_R_2020

The Y'CbCr color matrix for ITU-R BT.2020 conversion.

Profile Level

AVVideoProfileLevelKey

A key to access the video profile.

AVVideoProfileLevelH264High40

A high-level 4.0 profile.

AVVideoProfileLevelH264High41

A high-level 4.1 profile.

AVVideoProfileLevelH264Main30

A main-level 3.0 profile.

AVVideoProfileLevelH264Main31

A main-level 3.1 profile.

AVVideoProfileLevelH264Main32

A main-level 3.2 profile.

AVVideoProfileLevelH264Main41

A main-level 4.1 profile.

AVVideoProfileLevelH264Baseline30

A baseline-level 3.0 profile.

AVVideoProfileLevelH264Baseline31

A baseline-level 3.1 profile.

AVVideoProfileLevelH264Baseline41

A baseline-level 4.1 profile.

AVVideoProfileLevelH264HighAutoLevel

A high profile auto level profile.

AVVideoProfileLevelH264MainAutoLevel

A main profile auto level profile.

AVVideoProfileLevelH264BaselineAutoLevel

A baseline auto level profile.

Entropy Mode

AVVideoH264EntropyModeKey

The entropy encoding mode for H.264 compression.

AVVideoH264EntropyModeCABAC

The encoder uses Context-based Adaptive Binary Arithmetic Coding.

AVVideoH264EntropyModeCAVLC

The encoder uses Context-based Adaptive Variable Length Coding.

Frame Rate

AVVideoAverageNonDroppableFrameRateKey

The desired average number of non-droppable frames to be encoded for each second of video.

AVVideoExpectedSourceFrameRateKey

The expected source frame rate.

Video Toolbox Options

AVVideoEncoderSpecificationKey

The video encoder specification includes options for choosing a specific video encoder.

See Also

Supporting Types

Video Settings

Dictionary keys for configuring video compression and compression settings for video assets.

AVFileType

A uniform type identifier for various file formats.

AVMediaType

An identifier for various media types.

AVMediaCharacteristic

The options for specifying media type characteristics.