---
title: "copyFrame(_:)"
framework: Professional Video Applications
role: symbol
role_heading: Instance Method
platforms: [provideo encoder extensions 1.0+]
path: "professional_video_applications/compressormediadecoder/copyframe(_:)"
---

# copyFrame(_:)

Returns the decoded video frame indicated by the frame number.

## Declaration

```swift
func copyFrame(_ frameNumber: Int64) -> IOSurface!
```

## Parameters

- `frameNumber`: The video frame to retrieve.

## Return Value

Return Value IOSurface-based video frame buffers.

## Discussion

Discussion Use the values in the decodingAttributes() dictionary to find the video attributes, such as height and pixel ratio, of the decoded frame.

## See Also

### Getting Decoded Frames and Samples

- [copyAudio(atStart:count:)](professional_video_applications/compressormediadecoder/copyaudio(atstart:count:).md)
- [copyCloseCaptionData(_:frameCount:)](professional_video_applications/compressormediadecoder/copyclosecaptiondata(_:framecount:).md)
- [releaseFrame(_:)](professional_video_applications/compressormediadecoder/releaseframe(_:).md)
- [CompressorMediaDecoderPtr](professional_video_applications/compressormediadecoderptr.md)
