From 6ad81b9c8d1e399b63c1139ec51d1bd64fbfd0d4 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Fri, 13 Oct 2023 14:59:29 -0600 Subject: [PATCH] Send as list --- frigate/events/audio.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/frigate/events/audio.py b/frigate/events/audio.py index b547f6b32..b96e76af3 100644 --- a/frigate/events/audio.py +++ b/frigate/events/audio.py @@ -47,12 +47,21 @@ def get_ffmpeg_command(ffmpeg: FfmpegConfig) -> list[str]: or parse_preset_input(ffmpeg.input_args, 1) or ffmpeg.input_args ) - return get_ffmpeg_arg_list( - f"ffmpeg -vn {{}} -i {{}} -f {AUDIO_FORMAT} -ar {AUDIO_SAMPLE_RATE} -ac 1 -y {{}}".format( - " ".join(input_args), - ffmpeg_input.path, + return ( + ["ffmpeg", "-vn"] + + input_args + + ["-i"] + + [ffmpeg_input.path] + + [ + "-f", + f"{AUDIO_FORMAT}", + "-ar", + f"{AUDIO_SAMPLE_RATE}", + "-ac", + "1", + "-y", "pipe:", - ) + ] )