Skip to content

Instantly share code, notes, and snippets.

@yuhanz
Created November 21, 2024 07:54
Show Gist options
  • Save yuhanz/4b207b662e6e9b45d0fa9f2fb5c3061a to your computer and use it in GitHub Desktop.
Save yuhanz/4b207b662e6e9b45d0fa9f2fb5c3061a to your computer and use it in GitHub Desktop.
python - get frame from a video file
import av
container = av.open('assets/example_data/videos/pose1.mp4')
frame = av.VideoFrame(640, 480, "rgb24")
frame.to_ndarray()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment