Skip to content

Commit

Permalink
Log ffprobe error code and error
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Nov 1, 2022
1 parent b03a3e9 commit 21be8e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frigate/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ def move_files(self):
end_time = start_time + datetime.timedelta(seconds=duration)
self.end_time_cache[cache_path] = (end_time, duration)
else:
if duration == -1:
logger.warning(
f"Failed to probe corrupt segment {f}: {p.returncode} - {p.stderr}"
)

logger.warning(f"Discarding a corrupt recording segment: {f}")
Path(cache_path).unlink(missing_ok=True)
continue
Expand Down

0 comments on commit 21be8e0

Please sign in to comment.