Guest User

Untitled

a guest
Nov 21st, 2016
106
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import numpy as np
  2. import time
  3. import cv2
  4.  
  5. def main():
  6.     cargarvideo()
  7.     return
  8.  
  9. def cargarvideo():
  10.     vid = ['video_01.mp4', 'video_02.mp4', 'video_03.mp4', 'video_04.mp4', 'video_05.mp4']
  11.     for i in [0,1,2,3,4]:
  12.         cap = cv2.VideoCapture(vid[i])
  13.         while(cap.isOpened()):
  14.             ret, fps = cap.read()
  15.             if ret == False:
  16.                 break
  17.             cv2.imshow('Video_Grabado',fps)
  18.             if cv2.waitKey(32) & 0xff == ord('q'):
  19.                 break
  20.     cap.release()
  21.     cv2.destroyAllWindows()
  22.     print "Fin"
  23.  
  24. if __name__ == "__main__":
  25.     main()
RAW Paste Data