

OpenCV reads videos essentially as a wrapper of ffmpeg but if you want to have control over the underlying ffmpeg commands being used to read the video, then you can use libraries like PyAV or ffmpeg-python. For a full-featured video processing framework designed with efficiency in mind, you can check out VidGears (which has a library called CamGears for video reading). If you need frame-accurate seeking then a library like Decord will be super helpful. The good news is there is a large selection of open source libraries that will solve these problems. see this open bug ticket if you think the cap.set() method can be used safely for setting the frame number, be warned that it cannot). Source: admin of OpenCV Project Alexander AlekhinĪnd as a result of not being designed for video manipulation, it does not, and maybe will never have features such as the ability to accurately seek to a precise frame (i.e.

Video I/O and Image I/O things added into OpenCV for demo purposes initially. main purpose of OpenCV library is not highly correlated with goals of Media I/O library.

This one may surprise you (it certainly did me!) but the developers only added the ability to read videos like this for “demo purposes” initially OpenCV is not designed as a media library.Are there any problems with this approach? It is entirely functional, but there are a couple of limitations:
