I cant figure out what the problem is.
I am using
I have gone through all the related problems on internet but have not got the solution for the problem yet. 'v.mp4' file is in the same directory in which my python file is present.
CODE
import cv2
vidcap = cv2.VideoCapture('v.mp4')
success,image = vidcap.read()
count = 0;
print success
while success:
success,image = vidcap.read()
cv2.imwrite("frame%d.jpg" % count, image) # save frame as JPEG file
if cv2.waitKey(10) == 27: # exit if Escape is hit
break
count += 1
The opencv-python
package does not have VideoCapture()
support outside of Windows. See my answer here or the PyPI opencv-python
documentation, which states:
IMPORTANT NOTE
MacOS and Linux packages do not support video related functionality (not compiled with FFmpeg).