<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMFormatDescriptionGetMediaSubType(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@F@CMFormatDescriptionGetMediaSubType"
  },
  "title" : "CMFormatDescriptionGetMediaSubType(_:)"
}
-->

# CMFormatDescriptionGetMediaSubType(_:)

Returns the media subtype of a format description.

```
func CMFormatDescriptionGetMediaSubType(_ desc: CMFormatDescription) -> FourCharCode
```

## Parameters

`desc`

The `CMFormatDescription` to examine.

## Return Value

A media type that identifies the subtype of the `CMFormatDescription`.

## Discussion

For audio streams, the media subtype is the `asbd.mFormatID`. For video streams, the media subtype is the video codec type. For muxed streams, it’s the format of the muxed stream.

For example, the function returns `aac` for a description of an AAC audio stream, `avc1` for a description of an H.264 video stream, and `mp2t` for a description of an MPEG-2 transport (muxed) stream.  If a media stream doesn’t have subtypes, this API may return `0`.

---

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)