I just want to convert video to frame images.
Using this simple code
import cv2
vidcap = cv2.VideoCapture(\'gog.mp4\')
success,image = vidcap.read()
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.