Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A problem for capturing frames from .mp4 file with opencv #1120

Closed
wureka opened this issue Jan 11, 2022 · 3 comments
Closed

A problem for capturing frames from .mp4 file with opencv #1120

wureka opened this issue Jan 11, 2022 · 3 comments
Labels

Comments

@wureka
Copy link
Contributor

wureka commented Jan 11, 2022

I know that the default configuration for opencv does not turn on WITH_FFMPEG. And this results in a issue. It will not work when I use VideoCapture in opencv to grab frames from a .mp4 file. videoCapture.open('foo.mp4'); will always return false no matter what fourcc I try.

Well, it is the last thing that I clone javacpp-presets, turn on WITH_FFMPEG flag, and build opencv myself.
Any suggestion ?

@saudet
Copy link
Member

saudet commented Jan 11, 2022

Anything wrong with FFmpegFrameGrabber?

@wureka
Copy link
Contributor Author

wureka commented Jan 11, 2022

Well, FFmpegFrameGrabber is the object of JavaCV. I use javacpp-presets/opencv. They seem to be different.
And for JavaCV, yes, FFmpegFrameGrabber can successfully grab frames from .mp4 files. However, as I reported to you that JavaCV has problems combining the Depthai package
https://github.com/bytedeco/javacpp-presets/issues/1118)

JavaCV could be another solution. But my current code is all based on opencv, so I may need more time to verify the linkage between JavaCV and Depthai and convert to JavaCV's functions.

By the way, does JavaCV support Raspberry PI ?

@saudet
Copy link
Member

saudet commented Jan 11, 2022

JavaCV simply uses OpenCV and FFmpeg from the JavaCPP Presets. It doesn't do anything special.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants