You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
515B

  1. import cv2
  2. import time
  3. def aa():
  4. start = time.time()
  5. vid = cv2.VideoCapture("http://live.play.t-aaron.com/live/THSAk_hd.m3u8")
  6. print("aaaaaaa", time.time() - start)
  7. while True:
  8. if vid is None or not vid.isOpened():
  9. print("11111111111111111111111", vid)
  10. continue
  11. return_value, frame = vid.read()
  12. if return_value is not None and return_value:
  13. print("拉流时间", time.time()-start)
  14. # break
  15. if __name__=="__main__":
  16. aa()