|
- import cv2
- import time
- def aa():
- start = time.time()
- vid = cv2.VideoCapture("http://live.play.t-aaron.com/live/THSAk_hd.m3u8")
- print("aaaaaaa", time.time() - start)
- while True:
- if vid is None or not vid.isOpened():
- print("11111111111111111111111", vid)
- continue
- return_value, frame = vid.read()
- if return_value is not None and return_value:
- print("拉流时间", time.time()-start)
- # break
-
-
-
-
- if __name__=="__main__":
- aa()
|