Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

extract frames from video python

import cv2
video_name = "name.mp4" # or any other extension like .avi etc
vidcap = cv2.VideoCapture(video_name)
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
Comment

PREVIOUS NEXT
Code Example
Python :: knowing the sum of null value is pandas dataframe 
Python :: get next multiple of a number 
Python :: how to multiply inputs in python 
Python :: remove all occurrences of a character in a list python 
Python :: pytesseract pdf to text 
Python :: NotImplementedError: Please use HDF reader for matlab v7.3 files 
Python :: How to use tqdm with pandas apply 
Python :: how to split an input in python by comma 
Python :: how to create chess board numpy 
Python :: tqdm notebook 
Python :: fix ImportError: No module named PIL 
Python :: datetime 30 days ago python 
Python :: how to place image in tkinter 
Python :: href in selenium 
Python :: python time execution 
Python :: decode url python 
Python :: resize image array python 
Python :: how to change voice of pyttsx3 
Python :: _csv.Error: field larger than field limit (131072) 
Python :: PySpark null or missing values 
Python :: use python3 as default mac 
Python :: python datetime now only date 
Python :: how to do label encoding in multiple column at once 
Python :: how to send audio with inline telebot 
Python :: python fiscal year prior 
Python :: stop a subprocess python 
Python :: filter startswith django 
Python :: discard vs remove python 
Python :: django annotate concat string 
Python :: matplotlib set size 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =