Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can I get one single frame from a video file?

I would like to use Python and the OpenCV wrapper to display a video that is just being recorded to the hard drive in a Python program. To achieve this I have to get the last single frame from the video that is just being written to. Is there a way to get only the last frame (or any other single frame for that matter) from the video file without loading all the frames into memory first? The video is saved as single frame bitmaps, so decoding should not be a problem.

Alternatively I could also use Python and OpenCV itself for recording the video, however I need to be able to set a fixed recording frame rate and I could not find any way to achieve that with OpenCV.

Thanks for your help!