How to use VideoCapture? #1528
-
I want to use the VideoCapture class from this example: https://docs.opencv.org/4.7.0/d4/dee/tutorial_optical_flow.html. When I run the following code:
I always get capture.isOpened() returning false. Yes, the path is correct, yes the file is readable, etc. I enabled debug and I get this clue:
So it would appear VideoCapture can not find an implementation to open the mp4 file, and further from the build information it confirms that ffmpeg is not part of the opencv build that I'm using. I would expect to see and FFMPEG entry under the Video I/O: section. Only v4l/v4l2 is listed:
I have the following dependencies in my maven build, but ffmpeg seems to not be available:
Ultimately I just want to be able to open, read and capture frames from video files. What am I missing here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The binaries aren't linked with FFmpeg. Please use FFmpegFrameGrabber insteead. |
Beta Was this translation helpful? Give feedback.
-
ok thanks for the tip |
Beta Was this translation helpful? Give feedback.
The binaries aren't linked with FFmpeg. Please use FFmpegFrameGrabber insteead.