Skip to content

Instantly share code, notes, and snippets.

@CreedsCode
Last active December 23, 2020 10:20
Show Gist options
  • Save CreedsCode/acf5cc36cd7589553931c1ac351fb65c to your computer and use it in GitHub Desktop.
Save CreedsCode/acf5cc36cd7589553931c1ac351fb65c to your computer and use it in GitHub Desktop.

Revisions

  1. CreedsCode renamed this gist Dec 23, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. CreedsCode created this gist Dec 23, 2020.
    9 changes: 9 additions & 0 deletions slpice.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    import cv2
    vidcap = cv2.VideoCapture('video.mp4')
    success, image = vidcap.read()
    count = 1
    while success:
    cv2.imwrite("output/image_%d.jpg" % count, image)
    success, image = vidcap.read()
    print('Saved ', count)
    count += 1