opencv Unable to stop the stream: Inappropriate ioctl for device

前端 未结 5 1728
我在风中等你
我在风中等你 2021-01-04 03:36

I just want to convert video to frame images.

Using this simple code

import cv2
vidcap = cv2.VideoCapture(\'gog.mp4\')
success,image = vidcap.read()
         


        
5条回答
  •  一向
    一向 (楼主)
    2021-01-04 04:27

    I had the exact same issue using Manjaro 17.0.2 and OpenCV 3.2.0 with Java. I removed the old implementation of OpenCV, went and reinstalled it from scratch. Ran cmake with these parameters cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_LIBV4L=ON .. (thanks @emre)

    Then in the output of the Cmake installation I noticed Can't find ffmpeg - 'pkg-config' utility is missing. Installed the pkg-config and re ran cmake, make and now everything works.

提交回复
热议问题