gaggio
Posts: 22
Joined: Sat Jun 08, 2013 6:44 pm

Backend for OpenCV videocapture?

Tue Aug 25, 2015 12:07 pm

Hi,
I'm successfully using OpenCV from python to capture the frames of a video, previously recorded to disk with the pi camera board. In a previous installation acquiring roughly 170 frames and doing some quick processing took approx. 15s. Now I started from a clean raspbian installation, installed from apt-get the main packages: python-opencv and ffmpeg. The same function on a 128 frames video takes 60s!
How is it possible?
OpenCV should be using ffmpeg under the hood, and that is installed. It is possible that I was using another (quicker) backend in the previous installation? What might that be? Gstreamer?
Is there a way to check that OpenCV is using ffmpeg or maybe it is not connecting to that and falling back to some other slower library?

Thanks everyone,
Federico

Return to “Raspberry Pi OS”