From 791409d5e56c387b9bac7df7e467070a44e774df Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Tue, 25 Feb 2020 20:37:12 -0600 Subject: [PATCH] add a few print statements for debugging --- frigate/video.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frigate/video.py b/frigate/video.py index 5fba8e810..707786bc2 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -180,7 +180,12 @@ def track_camera(name, config, ffmpeg_global_config, global_objects_config, dete avg_wait = (avg_wait*99+duration)/100 if not frame_bytes: - break + rc = ffmpeg_process.poll() + if rc is not None: + print(f"{name}: ffmpeg_process exited unexpectedly with {rc}") + break + else: + print(f"{name}: ffmpeg_process is still running but didnt return any bytes") # limit frame rate frame_num += 1 @@ -353,3 +358,5 @@ def track_camera(name, config, ffmpeg_global_config, global_objects_config, dete plasma_client.put(frame, plasma.ObjectID(object_id)) # add to the queue detected_objects_queue.put((name, frame_time, object_tracker.tracked_objects)) + + print(f"{name}: exiting subprocess") \ No newline at end of file