<!--
{
  "availability" : [
    "iOS: 7.0.0 - 27.0.0",
    "iPadOS: 7.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.9.0 - 27.0.0",
    "tvOS: 9.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAsynchronousVideoCompositionRequest/sourceFrame(byTrackID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAsynchronousVideoCompositionRequest(im)sourceFrameByTrackID:"
  },
  "title" : "sourceFrame(byTrackID:)"
}
-->

# sourceFrame(byTrackID:)

Returns a source pixel buffer for the track that contains the specified identifier.

```
func sourceFrame(byTrackID trackID: CMPersistentTrackID) -> CVPixelBuffer?
```

## Parameters

`trackID`

The identifier of the track that contains the source frame.

## Return Value

A pixel buffer, or `nil` if not found.

## Discussion

---

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)