Opencv Videocapture无法读取https url视频

时间:2019-03-16 07:51:51

标签: python opencv ubuntu ffmpeg

我想在我的Ubuntu系统中阅读HTTPS URL视频而不下载它们。我可以在Windows OS中执行此操作,但是当我尝试使用相同的opencv VideoCapture方法在Ubuntu中运行相同的代码时,它无法获取任何帧。

为什么会这样?

我在Ubuntu和Windows中都使用过相同的opencv版本,有人可以指导我解决问题的方法,可以用来编译opencv和流url视频的教程,或者可以在Ubuntu中支持此功能的任何其他库吗?

我几乎尝试了所有方法,但没有取得任何成果,这使我最终提出了这个问题。

opencv build information :

  OpenCV modules:
    To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc java_bindings_generator ml objdetect photo python3 python_bindings_generator stitching video videoio
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 java js python2 ts
    Applications:                -
    Documentation:               NO
    Non-free algorithms:         NO

  GUI: 
    QT:                          YES (ver 4.8.7 EDITION = OpenSource)
      QT OpenGL support:         NO
    GTK+:                        NO
    VTK support:                 NO

  Media I/O: 
    ZLib:                        /lib64/libz.so (ver 1.2.3)
    JPEG:                        /opt/libjpeg-turbo/lib64/libjpeg.a (ver 62)
    WEBP:                        build (ver encoder: 0x020e)
    PNG:                         build (ver 1.6.35)
    TIFF:                        build (ver 42 - 4.0.9)
    JPEG 2000:                   build (ver 1.900.1)
    OpenEXR:                     build (ver 1.7.1)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES
      avcodec:                   YES (ver 58.21.104)
      avformat:                  YES (ver 58.17.101)
      avutil:                    YES (ver 56.18.102)
      swscale:                   YES (ver 5.2.100)
      avresample:                NO
    GStreamer:                   NO
    v4l/v4l2:                    linux/videodev2.h

  Parallel framework:            pthreads

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Lapack:                      NO
    Eigen:                       NO
    Custom HAL:                  NO
    Protobuf:                    build (3.5.1)

  OpenCL:                        YES (no extra features)
    Include path:                /io/opencv/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python 3:
    Interpreter:                 /opt/python/cp36-cp36m/bin/python (ver 3.6.5)
    Libraries:                   libpython3.6m.a (ver 3.6.5)
    numpy:                       /opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include (ver 1.11.3)
    packages path:               lib/python3.6/site-packages

  Python (for build):            /opt/python/cp36-cp36m/bin/python

  Java:                          
    ant:                         NO
    JNI:                         NO
    Java wrappers:               NO
    Java tests:                  NO

  Install to:                    /io/_skbuild/linux-x86_64-3.6/cmake-install

1 个答案:

答案 0 :(得分:0)

我的代码正常工作

<ftp:outbound-channel-adapter/>