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

FFmpegFrameGrabber not working in latest version 1.5.7 #1774

Closed
khalidwaleed0 opened this issue Mar 10, 2022 · 2 comments
Closed

FFmpegFrameGrabber not working in latest version 1.5.7 #1774

khalidwaleed0 opened this issue Mar 10, 2022 · 2 comments

Comments

@khalidwaleed0
Copy link

khalidwaleed0 commented Mar 10, 2022

This is my code :
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber("desktop");
grabber.setFormat("gdigrab");
grabber.setFrameRate(30);
grabber.start();

It gives me this error

org.bytedeco.javacv.FFmpegFrameGrabber$Exception: av_find_input_format() error: Could not find input format "gdigrab". (For more details, make sure FFmpegLogCallback.set() has been called.)
at org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe(FFmpegFrameGrabber.java:881)
at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:849)
at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:844)
at Main.main(Main.java:11)

Same code works if I downgraded javacv to 1.5.6

@saudet
Copy link
Member

saudet commented Mar 10, 2022

Call FFmpegFrameGrabber.tryLoad() before anything else.

@saudet
Copy link
Member

saudet commented Mar 10, 2022

Duplicate of #1756.

@saudet saudet closed this as completed Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants