无法启动FrameGrabber

时间:2017-05-11 14:40:26

标签: java

我正在使用Netbeans IDE,当我尝试运行项目时出现此错误:

Exception in thread "Thread-1" java.lang.RuntimeException: Unable to start the FrameGrabber
    at org.imesha.examples.javacv.JavaCVExample.start(JavaCVExample.java:75)
    at java.base/java.lang.Thread.run(Thread.java:844)

如果您需要查看来自JavaCVExample.java或pom.xml的代码,请告诉我,我将编辑此帖子。什么可能解决这个问题?

编辑(更新):

来自JavaCVExample.java的第75行的代码:

 public void start() {
      frameGrabber = new 
      FFmpegFrameGrabber("USB\\VID_090C&PID_71B3&MI_00\\6&9D4DD26&1&0000");
      frameGrabber.setFormat("DirectShow");
      frameGrabber.setImageWidth(640);
      frameGrabber.setImageHeight(480);

        logger.debug("Starting frame grabber");
        try {
            frameGrabber.start();
            logger.debug("Started frame grabber with image width-height : {}-{}", frameGrabber.getImageWidth(), frameGrabber.getImageHeight());
        } catch (FrameGrabber.Exception e) {
            logger.error("Error when initializing the frame grabber", e);
            throw new RuntimeException("Unable to start the FrameGrabber", e);
        }

        SwingUtilities.invokeLater(() -> {
            window.setVisible(true);
        });

        process();

        logger.debug("Stopped frame grabbing.");
    }

0 个答案:

没有答案