<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVMutableMovieTrack/replaceFormatDescription(_:with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVMutableMovieTrack(im)replaceFormatDescription:withFormatDescription:"
  },
  "title" : "replaceFormatDescription(_:with:)"
}
-->

# replaceFormatDescription(_:with:)

Replaces the track’s format description with a new format description.

```
func replaceFormatDescription(_ formatDescription: CMFormatDescription, with newFormatDescription: CMFormatDescription)
```

## Parameters

`formatDescription`

The <doc://com.apple.documentation/documentation/CoreMedia/CMFormatDescription> object to be replaced.

`newFormatDescription`

The <doc://com.apple.documentation/documentation/CoreMedia/CMFormatDescription> object to replacing the specified format description.

## Discussion

Use this method to change a track’s format descriptions, such as adding format description extensions to a format description or changing the audio channel layout of an audio track. Format description can have extensions of type <doc://com.apple.documentation/documentation/CoreMedia/kCMFormatDescriptionExtension_VerbatimSampleDescription> and <doc://com.apple.documentation/documentation/CoreMedia/kCMFormatDescriptionExtension_VerbatimISOSampleEntry>. If you modify a copy of a format description, delete those extensions from the copy or your changes might be ignored.

---

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)