mirror of
https://github.com/rendies/People-Counting-in-Real-Time.git
synced 2025-05-14 09:59:29 +07:00
fix: use ffmpeg rtsp
This commit is contained in:
parent
62d0e16a89
commit
d910d04b79
|
@ -125,9 +125,7 @@ def PeopleCounter():
|
|||
|
||||
if config.Thread:
|
||||
vs = thread.ThreadingClass(config.url)
|
||||
ret, frame = vs.read()
|
||||
height, width, ch = frame.shape
|
||||
ffmpeg_process = open_ffmpeg_stream_process(height, width)
|
||||
ffmpeg_process = open_ffmpeg_stream_process(1920, 1080)
|
||||
# loop over frames from the video stream
|
||||
while True:
|
||||
# grab the next frame and handle if we are reading from either
|
||||
|
@ -344,9 +342,9 @@ def PeopleCounter():
|
|||
writer.write(frame)
|
||||
|
||||
# show the output frame
|
||||
with lock:
|
||||
ffmpeg_process.stdin.write(frame.astype(np.uint8).tobytes())
|
||||
|
||||
ffmpeg_process.stdin.write(frame.astype(np.uint8).tobytes())
|
||||
# with lock:
|
||||
# outputFrame = frame.copy()
|
||||
# cv2.imshow("Real-Time Monitoring/Analysis Window", frame)
|
||||
key = cv2.waitKey(1) & 0xFF
|
||||
|
|
Loading…
Reference in New Issue
Block a user