Skip to content

videoCapture.isOpened() always is false! #101

@cgf120

Description

@cgf120

System Information

// example for java user
OpenCV version: 4.7.0
Operating System / Platform: Centos7 or Centos8 已安装ffmpeg
Compiler & compiler version: GLIBC 2.28
JAVA 1.8

Detailed description

videoCapture.isOpened() always is false!
使用centos8,videoCapture.isOpened()一直返回false,用centos7,报错defaultException异常:Handler dispatch failed; nested exception is java.lang.UnsatisfiedLinkError: /tmp/opencv_openpnp3982757882420087236/nu/pattern/opencv/linux/x86_64/libopencv_java460.so: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /tmp/opencv_openpnp3982757882420087236/nu/pattern/opencv/linux/x86_64/libopencv_java460.so)
代码:
OpenCV.loadLocally();
videoCapture = new VideoCapture(downFilePath); //downFilePath文件的绝对路径
videoCapture.open(downFilePath);
if (!videoCapture.isOpened()) {
return;
}

maven config:

<dependency>
  <groupId>org.openpnp</groupId>
  <artifactId>opencv</artifactId>
  <version>4.7.0-0</version>
</dependency>

Steps to reproduce

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions