Guest User

Untitled

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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×