Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. import cv2
  2. import glob
  3.  
  4. video = glob.glob("*.mp4")
  5. vidcap = cv2.VideoCapture(video[0])
  6. succes = True
  7. counter = 0
  8.  
  9. while succes:
  10. succes, frame = vidcap.read()
  11.  
  12. if succes:
  13. cv2.imwrite(f"frame_{counter:03d}.jpg", frame)
  14. counter = counter + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement