|
|
|
|
|
|
482
|
global frame_no
|
482
|
global frame_no
|
|
483
|
global frame_w
|
483
|
global frame_w
|
|
484
|
inputFile = 'rtsp://admin:@Unv123456@192.168.10.252:554/unicast/c1/s1/live'
|
484
|
inputFile = 'rtsp://admin:@Unv123456@192.168.10.252:554/unicast/c1/s1/live'
|
|
|
|
485
|
+ #inputFile = '../flask-hls-demo/video/cctv.m3u8'
|
|
|
|
486
|
+ #inputFile = 'http://localhost:5000/video/cctv.m3u8'
|
|
485
|
#camera = re.match(r".*/(\d+)_.*", inputFile)
|
487
|
#camera = re.match(r".*/(\d+)_.*", inputFile)
|
|
486
|
camera = "uniview"
|
488
|
camera = "uniview"
|
|
487
|
|
489
|
|
|
488
|
# import video file
|
490
|
# import video file
|
|
|
|
491
|
+ #print(cv2.getBuildInformation())
|
|
489
|
cap = cv2.VideoCapture(inputFile)
|
492
|
cap = cv2.VideoCapture(inputFile)
|
|
|
|
493
|
+ #print(cap)
|
|
490
|
|
494
|
|
|
491
|
# get list of background files
|
495
|
# get list of background files
|
|
492
|
f = []
|
496
|
f = []
|
|
|
|
|
|
|
761
|
return Response(gen_frames(id),
|
765
|
return Response(gen_frames(id),
|
|
762
|
mimetype='multipart/x-mixed-replace; boundary=frame')
|
766
|
mimetype='multipart/x-mixed-replace; boundary=frame')
|
|
763
|
'''
|
767
|
'''
|
|
764
|
- return Response(process_video_cctv(),
|
|
|
|
|
|
768
|
+ return Response(process_video(),
|
|
765
|
mimetype='multipart/x-mixed-replace; boundary=frame')
|
769
|
mimetype='multipart/x-mixed-replace; boundary=frame')
|
|
766
|
|
770
|
|
|
767
|
@app.route('/', methods=["GET"])
|
771
|
@app.route('/', methods=["GET"])
|