extract images from mp4 python

Solutions on MaxInterview for extract images from mp4 python by the best coders in the world

showing results for - "extract images from mp4 python"
Fatoumata
29 Apr 2019
1import cv2
2vidcap = cv2.VideoCapture('big_buck_bunny_720p_5mb.mp4')
3success,image = vidcap.read()
4count = 0
5while success:
6  cv2.imwrite("frame%d.jpg" % count, image)     # save frame as JPEG file      
7  success,image = vidcap.read()
8  print('Read a new frame: ', success)
9  count += 1
10