Guest User

Untitled

a guest
Oct 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import cv2
  2. import imageio
  3.  
  4. cap = cv2.VideoCapture('stillalive.mov')
  5. cap.set(1 ,62)
  6. length = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) - 62
  7. print('length=%d' % length)
  8. frames = []
  9. for i in range(1668):
  10. ret, frame = cap.read()
  11. frames.append(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
  12. imageio.mimsave("stillalive.gif", frames, fps=60)
Add Comment
Please, Sign In to add comment