Closed supragya closed 5 years ago
I followed the stackoverflow answer and it gives me frames as the output.
import cv2
vidcap = cv2.VideoCapture('SampleVideo_1280x720_2mb.mp4')
success,image = vidcap.read()
count = 0
while success:
cv2.imwrite("frames/frame%d.jpg" % count, image) # save frame as JPEG file
success,image = vidcap.read()
print('Read a new frame: ', success)
count += 1
This is also implemented.
@Kogam22 says - I found cv2 module that converts (.mp4)vidoes to frames. Check this out : https://stackoverflow.com/a/33399711/8690463