无法在java中使用opencv打开视频

时间:2017-10-03 13:43:37

标签: java opencv ubuntu-17.04

我在ubuntu 17.04 中使用 opencv 320 ,只是尝试计算java中给定视频的总帧数。这是我的代码。

    true
Failed to query video capabilities: Inappropriate ioctl for device
libv4l2: error getting capabilities: Inappropriate ioctl for device
VIDEOIO ERROR: V4L: device /home/aritra/workspace/oopencv/horror.mp4: Unable to query number of channels
could not open this file 

我已将视频文件保留在项目中。每当我运行这个程序时,它都显示消息

Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  NO
--     FFMPEG:                      YES
--       avcodec:                   YES (ver 57.64.101)
--       avformat:                  YES (ver 57.56.101)
--       avutil:                    YES (ver 55.34.101)
--       swscale:                   YES (ver 4.2.100)
--       avresample:                YES (ver 3.1.0)
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     Aravis SDK:                  NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    Using libv4l1 (ver 1.12.3) / libv4l2 (ver 1.12.3)
--     XIMEA:                       NO
--     Xine:                        NO
--     gPhoto2:                     NO

但我的视频I / O状态是

curl -D- -u Username:Password  -X POST -H "Content-Type: application/json" --data "{\"jql\":\"project = GB and issueType = Risk\"}"  "site/rest/api/2/search"

我已根据OpenCV Constants.CaptureProperty检查https://github.com/opencv/opencv/issues/6157并使 WITH_LIBV4L = ON 但仍然收到这些消息。我该怎么办?任何人都可以帮助我吗?

0 个答案:

没有答案