mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
Formatting
This commit is contained in:
parent
b2737a3955
commit
b6b387a19b
@ -461,7 +461,9 @@ def recording_clip(
|
|||||||
) as ffmpeg:
|
) as ffmpeg:
|
||||||
while True:
|
while True:
|
||||||
data = ffmpeg.stdout.read(1024)
|
data = ffmpeg.stdout.read(1024)
|
||||||
if not data:
|
if data is not None:
|
||||||
|
yield data
|
||||||
|
else:
|
||||||
if ffmpeg.returncode and ffmpeg.returncode != 0:
|
if ffmpeg.returncode and ffmpeg.returncode != 0:
|
||||||
logger.error(
|
logger.error(
|
||||||
f"Failed to generate clip, ffmpeg logs: {ffmpeg.stderr.read()}"
|
f"Failed to generate clip, ffmpeg logs: {ffmpeg.stderr.read()}"
|
||||||
@ -469,7 +471,6 @@ def recording_clip(
|
|||||||
else:
|
else:
|
||||||
FilePath(file_path).unlink(missing_ok=True)
|
FilePath(file_path).unlink(missing_ok=True)
|
||||||
break
|
break
|
||||||
yield data
|
|
||||||
|
|
||||||
recordings = (
|
recordings = (
|
||||||
Recordings.select(
|
Recordings.select(
|
||||||
@ -516,10 +517,10 @@ def recording_clip(
|
|||||||
"-y",
|
"-y",
|
||||||
"-protocol_whitelist",
|
"-protocol_whitelist",
|
||||||
"pipe,file",
|
"pipe,file",
|
||||||
"-f",
|
"-f",
|
||||||
"concat",
|
"concat",
|
||||||
"-safe",
|
"-safe",
|
||||||
"0",
|
"0",
|
||||||
"-i",
|
"-i",
|
||||||
file_path,
|
file_path,
|
||||||
"-c",
|
"-c",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user