convert a video in python to individual frames

Solutions on MaxInterview for convert a video in python to individual frames by the best coders in the world

showing results for - "convert a video in python to individual frames"
Lukas
08 Feb 2016
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