opencv Unable to stop the stream: Inappropriate ioctl for device

前端 未结 5 1724
我在风中等你
我在风中等你 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:05

    The problem was due to missing ffmpeg and ffmpeg-devel. You can verify this in cmake output.

    If FFMPEG is not available, those YES will become NO. And if you compile and install the opencv without FFMPEG, you will get error "Unable to stop the stream: Inappropriate ioctl for device" for video related samples.

    To solve your problem, install ffmpeg and ffmpeg-devel, then "make" and "make install" again.

    Hope this helps.

提交回复
热议问题