From 44e79862bfb31fdcf59e2331a0afbe6901bb47ee Mon Sep 17 00:00:00 2001 From: rendies Date: Wed, 18 Jan 2023 17:15:28 +0700 Subject: [PATCH] fix: subprocess communicate --- RunCounting.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RunCounting.py b/RunCounting.py index ef64f85..b165afe 100644 --- a/RunCounting.py +++ b/RunCounting.py @@ -15,6 +15,7 @@ from flask import Flask from flask import jsonify from flask_cors import CORS, cross_origin import subprocess +import ffmpeg t0 = time.time() @@ -345,6 +346,7 @@ def PeopleCounter(): # show the output frame # with lock: ffmpeg_process.stdin.write(frame.astype(np.uint8).tobytes()) + ffmpeg_process.communicate() # outputFrame = frame.copy() # cv2.imshow("Real-Time Monitoring/Analysis Window", frame)