OpenCV3 error: “Unable to stop the stream: Inappropriate ioctl for device”

后端 未结 2 1984
我寻月下人不归
我寻月下人不归 2020-12-31 17:43

I\'m trying to read the frames of an .mov file using OpenCV 3.2 (from the menpo conda channel). I\'m using Python 3.5.3 through Anaconda on an Ubuntu 16.04 64-bit setup.

2条回答
  •  無奈伤痛
    2020-12-31 18:16

    Solved the problem by getting around it entirely.

    Used the opencv-feedstock recipe of OpenCV for conda-forge. In the recipe folder is the build information for conda. I modified the build.sh file, changing the following options:

    -DBUILD_PNG=1
    -DBUILD_JPEG=1
    -DWITH_CUDA=1
    -DWITH_FFMPEG=1
    

    ran conda build --numpy 1.12 recipe from the parent directory (had to specify the NumPy version, as the build script requirement lists numpy x.x which means you have to provide the version at runtime), and waited.

    Took forever (seriously, a couple hours on a very powerful machine--the time sink is CUDA), but the build eventually completed successfully.

    Then it was just a matter of installing the locally-built bz2 archive (conda install --use-local opencv). No more weird ioctl error messages, and the above script worked just fine.

提交回复
热议问题