From 0d94e2a550d559343baf8d33b1e30111ca21f901 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Tue, 4 Oct 2022 18:28:51 -0600 Subject: [PATCH] Catch ffprobe empty stdout --- frigate/record.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/record.py b/frigate/record.py index 3e4a8c65c..c602b4a98 100644 --- a/frigate/record.py +++ b/frigate/record.py @@ -167,7 +167,7 @@ class RecordingMaintainer(threading.Thread): f"{cache_path}", ] p = sp.run(ffprobe_cmd, capture_output=True) - if p.returncode == 0: + if p.returncode == 0 and p.stdout.decode(): duration = float(p.stdout.decode().strip()) end_time = start_time + datetime.timedelta(seconds=duration) self.end_time_cache[cache_path] = (end_time, duration)