Answers for "extract images from mp4 python"

1

extract images from mp4 python

import cv2
vidcap = cv2.VideoCapture('big_buck_bunny_720p_5mb.mp4')
success,image = vidcap.read()
count = 0
while success:
  cv2.imwrite("frame%d.jpg" % count, image)     # save frame as JPEG file      
  success,image = vidcap.read()
  print('Read a new frame: ', success)
  count += 1
Posted by: Guest on April-28-2021

Code answers related to "extract images from mp4 python"

Python Answers by Framework

Browse Popular Code Answers by Language