Repository: blakeblackshear/frigate

Issue:
[Config Support]: Audio event ffmpeg fails if input_args is not a preset
### Describe the problem you are having

I'm using custom ffmpeg arguments and experimenting with audio event detection.  At some point between beta2 and beta6, audio detection stopped working and an exception is logged when events/audio.py tries to concatenate global_args and input_args.  I think maybe input_args also needs to be run through get_ffmpeg_arg_list?

### Version

0.13.0-614a36a

### Frigate config file

```yaml
mqtt:
  host: portal.home
  user: frigate
  password: "{FRIGATE_MQTT_PASSWORD}"
  stats_interval: 30

detectors:
  #cpu_warmer:
  #  type: cpu
  #  num_threads: 4
  coral_edgetpu_pcie:
    type: edgetpu
    device: pci:0

snapshots:
  enabled: True
  bounding_box: True
  quality: 95
  #height: 480

audio:
  enabled: True
  min_volume: 350
  listen:
    - bark
    - fire_alarm
    - speech

record:
  enabled: True
  retain:
    days: 14
    mode: all
  events:
    #max_seconds: 300
    pre_capture: 5
    post_capture: 10

birdseye:
  # continuous, objects, motion
  mode: continuous
  #mode: objects
  #mode: motion
  quality: 1
  width: 1920
  height: 1080
  restream: True

live:
  #height: 1080
  height: 720
  #height: 540
  quality: 1

detect:
  enabled: True
  #width: 1920
  #height: 1080
  width: 1280
  height: 720
  # Default is 5 fps.  The detector feeds the live and birdseye views
  # as well, so those can not have a higher resolution nor higher
  # framerate than the detector is receiving from output_args.detect.
  fps: 10
  # Number of frames before an object is considered gone, default 5s.
  max_disappeared: 50  # 5 seconds
  stationary:
    # Confirm the presence of an object after this many frames by
    # re-running object detection.  Default is 0, which confirms
    # object only when motion is detected.
    interval: 300  # 30 seconds
    # Number of frames without a position change to consider an object
    # stationary, default 10s.
    threshold: 100  # 10 seconds

rtmp:
  enabled: False

timestamp_style:
  position: "tl"
  format: "%Y-%m-%d %H:%M:%S"
  # color:
  #   red: 255
  #   green: 255
  #   blue: 255
  thickness: 1
  effect: shadow

# Optional: Motion configuration
# NOTE: Can be overridden at the camera level
motion:
  # Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
  # Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
  # The value should be between 1 and 255.
  #threshold: 25
  # Optional: Minimum size in pixels in the resized motion image that counts as motion (default: 30)
  # Increasing this value will prevent smaller areas of motion from being detected. Decreasing will
  # make motion detection more sensitive to smaller moving objects.
  # As a rule of thumb:
  #  - 15 - high sensitivity
  #  - 30 - medium sensitivity
  #  - 50 - low sensitivity
  #contour_area: 30
  # Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below)
  # Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.
  # Too low and a fast moving person wont be detected as motion.
  #delta_alpha: 0.2
  # Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)
  # Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
  # Low values will cause things like moving shadows to be detected as motion for longer.
  # https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/
  #frame_alpha: 0.2
  # Optional: Height of the resized motion frame  (default: 50)
  # This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense
  # of higher CPU usage. Lower values result in less CPU, but small changes may not register as motion.
  #frame_height: 50
  # Optional: motion mask
  # NOTE: see docs for more detailed info on creating masks
  #mask: 0,900,1080,900,1080,1920,0,1920
  # Optional: improve contrast (default: shown below)
  # Enables dynamic contrast improvement. This should help improve night detections at the cost of making motion detection more sensitive
  # for daytime.
  improve_contrast: True

objects:
  track:
    - person
    - car
    - motorcycle
    - cat
    - dog
  # filters:
  #   person:
  #     # Optional: minimum width*height of the bounding box for the detected object (default: 0)
  #     min_area: 5000
  #     # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
  #     max_area: 100000
  #     # Optional: minimum score for the object to initiate tracking (default: shown below)
  #     min_score: 0.5
  #     # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
  #     threshold: 0.7
  #     # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
  #     # Checks based on the bottom center of the bounding box of the object
  #     mask: 0,0,1000,0,1000,200,0,200

ffmpeg:
  global_args: -hide_banner -loglevel info
  # -hwaccel_output_format must be a native surface (e.g. vaapi, qsv)
  # and converted at the output step in order to use
  # hardware-accelerated filters like scale_vaapi.
  hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi
  # Default input_args contains '-use_wallclock_as_timestamps 1', but
  # this causes ffmpeg to drop H.264 B-frames.
  input_args: -flags +low_delay -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt+nobuffer+flush_packets -ec +guess_mvs+deblock+favor_inter -rtsp_transport tcp -timeout 10000000 -reorder_queue_size 1024
  # -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
  #
  #-flags +low_delay 
  output_args:
    detect: -vf scale_vaapi=w=1280:h=720,hwdownload,format=yuv420p -f rawvideo -pix_fmt yuv420p
    record: -f segment -segment_time 60 -segment_format mp4 -strftime 1 -reset_timestamps 1 -c copy
    #-an
    # transcode test
    #record: -f segment -segment_time 60 -segment_format mp4 -strftime 1 -reset_timestamps 1 -c:v h264_vaapi -an -profile:v high -bf 10 -level 60 -q 1 -rc_mode CQP -qp 22
    rtmp: -c copy -f flv

#ui:
#  use_experimental: true

cameras:
  driveway:
    ffmpeg:
      inputs:
        - path: rtsp://nvr:{FRIGATE_RTSP_PASSWORD}@cam-driveway.home/h264Preview_01_sub
          roles:
            - audio
        - path: rtsp://nvr:{FRIGATE_RTSP_PASSWORD}@cam-driveway.home/
          roles:
            - detect
            - record
            - rtmp
    mqtt: &reolink_mqtt_opts
      height: 540
      quality: 95
    motion:
      mask: &mask_driveway
        # timestamp
        #- 1363,44,1913,44,1913,12,1363,12
        - 909,29,1275,29,1275,8,909,8
        # foliage left
        #- 370,183,698,384,695,0,0,0,0,83
        - 247,122,465,256,463,0,0,0,0,55
        # foliage right
        #- 1254,253,1920,587,1920,0,793,0,781,150
        - 836,169,1280,391,1280,0,529,0,521,100
    objects:
      #mask: 892,244,1280,391,1280,0,529,0,521,100
      mask: 774,190,1280,617,1280,0,529,0,521,100
    zones:
      driveway_far:
        #coordinates: 1382,460,1172,225,961,225,910,460
        #coordinates: 921,307,781,150,641,150,607,307
        #coordinates: 1162,316,1042,41,905,45,885,324
        coordinates: 1186,363,1030,40,896,37,823,367
      driveway_near:
        #coordinates: 1382,460,1920,834,1920,1080,788,1080,910,460
        #coordinates: 921,307,1280,556,1280,720,525,720,607,307
       # coordinates: 1149,292,1280,556,1280,720,876,720,876,297
        coordinates: 1174,359,1280,556,1280,720,876,720,867,350
      front_stairs:
        #coordinates: 222,1080,130,600,0,541,0,232,175,310,366,257,533,1080
        #coordinates: 148,720,87,400,0,361,0,155,117,207,244,171,355,720
        coordinates: 267,571,296,92,173,25,167,0,338,0,502,0,526,557
    birdseye:
      order: 100
    ui:
      order: 100
```


### Relevant log output

```shell
2023-12-02 16:14:13.240551614  [2023-12-02 16:14:13] frigate.app                    INFO    : Audio process started: 429
2023-12-02 16:14:13.253296973  Process audio_capture:
2023-12-02 16:14:13.261768387  Traceback (most recent call last):
2023-12-02 16:14:13.261774510    File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2023-12-02 16:14:13.261877351      self.run()
2023-12-02 16:14:13.261880731    File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2023-12-02 16:14:13.261886643      self._target(*self._args, **self._kwargs)
2023-12-02 16:14:13.261889761    File "/opt/frigate/frigate/events/audio.py", line 97, in listen_to_audio
2023-12-02 16:14:13.261915330      audio = AudioEventMaintainer(
2023-12-02 16:14:13.261918423    File "/opt/frigate/frigate/events/audio.py", line 192, in __init__
2023-12-02 16:14:13.261921934      self.ffmpeg_cmd = get_ffmpeg_command(self.config.ffmpeg)
2023-12-02 16:14:13.261925023    File "/opt/frigate/frigate/events/audio.py", line 44, in get_ffmpeg_command
2023-12-02 16:14:13.261928104      input_args = get_ffmpeg_arg_list(ffmpeg.global_args) + (
2023-12-02 16:14:13.261930712  TypeError: can only concatenate list (not "str") to list
```


### Frigate stats

```json
{
  "cameras": {
    "back_entry": {
      "audio_dBFS": 0,
      "audio_rms": 0,
      "camera_fps": 10,
      "capture_pid": 379,
      "detection_enabled": 1,
      "detection_fps": 1.9,
      "ffmpeg_pid": 386,
      "pid": 362,
      "process_fps": 9.9,
      "skipped_fps": 0
    },
    "basement_entry": {
      "audio_dBFS": 0,
      "audio_rms": 0,
      "camera_fps": 9.9,
      "capture_pid": 382,
      "detection_enabled": 1,
      "detection_fps": 0,
      "ffmpeg_pid": 394,
      "pid": 363,
      "process_fps": 9.9,
      "skipped_fps": 0
    },
    "driveway": {
      "audio_dBFS": 0,
      "audio_rms": 0,
      "camera_fps": 9.9,
      "capture_pid": 365,
      "detection_enabled": 1,
      "detection_fps": 0,
      "ffmpeg_pid": 369,
      "pid": 360,
      "process_fps": 10,
      "skipped_fps": 0
    },
    "new": {
      "audio_dBFS": 0,
      "audio_rms": 0,
      "camera_fps": 10,
      "capture_pid": 384,
      "detection_enabled": 1,
      "detection_fps": 0,
      "ffmpeg_pid": 393,
      "pid": 364,
      "process_fps": 9.9,
      "skipped_fps": 0
    },
    "parking": {
      "audio_dBFS": 0,
      "audio_rms": 0,
      "camera_fps": 10.1,
      "capture_pid": 368,
      "detection_enabled": 1,
      "detection_fps": 2.1,
      "ffmpeg_pid": 375,
      "pid": 361,
      "process_fps": 10,
      "skipped_fps": 0
    }
  },
  "cpu_usages": {
    "1": {
      "cmdline": "/package/admin/s6/command/s6-svscan -d4 -- /run/service",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "15": {
      "cmdline": "s6-supervise s6-linux-init-shutdownd",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "17": {
      "cmdline": "/package/admin/s6-linux-init/command/s6-linux-init-shutdownd -c /run/s6/basedir -g 3000 -C -B",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "24": {
      "cmdline": "s6-supervise go2rtc-log",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "25": {
      "cmdline": "s6-supervise go2rtc",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "26": {
      "cmdline": "s6-supervise go2rtc-healthcheck",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "27": {
      "cmdline": "s6-supervise nginx-log",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "28": {
      "cmdline": "s6-supervise frigate-log",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "29": {
      "cmdline": "s6-supervise s6rc-fdholder",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "30": {
      "cmdline": "s6-supervise s6rc-oneshot-runner",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "31": {
      "cmdline": "s6-supervise frigate",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "32": {
      "cmdline": "s6-supervise nginx",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "43": {
      "cmdline": "/package/admin/s6-2.11.3.2/command/s6-fdholderd -1 -i data/rules",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "44": {
      "cmdline": "/package/admin/s6/command/s6-ipcserverd -1 -- /package/admin/s6/command/s6-ipcserver-access -v0 -E -l0 -i data/rules -- /package/admin/s6/command/s6-sudod -t 30000 -- /package/admin/s6-rc/command/s6-rc-oneshot-run -l ../.. --",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "82": {
      "cmdline": "s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/nginx",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "83": {
      "cmdline": "s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/go2rtc",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "84": {
      "cmdline": "s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/frigate",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "91": {
      "cmdline": "/usr/local/go2rtc/bin/go2rtc -config=/dev/shm/go2rtc.yaml",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "98": {
      "cmdline": "bash ./run.user go2rtc-healthcheck",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "103": {
      "cmdline": "python3 -u -m frigate",
      "cpu": "6.6",
      "cpu_average": "5",
      "mem": "0.7"
    },
    "109": {
      "cmdline": "nginx: master process nginx",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "140": {
      "cmdline": "nginx: worker process",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "141": {
      "cmdline": "nginx: worker process",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "142": {
      "cmdline": "nginx: worker process",
      "cpu": "0.1",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "143": {
      "cmdline": "nginx: worker process",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "150": {
      "cmdline": "nginx: cache manager process",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "305": {
      "cmdline": "frigate.logger       ",
      "cpu": "0.1",
      "cpu_average": "0",
      "mem": "0.3"
    },
    "314": {
      "cmdline": "frigate.recording_manager",
      "cpu": "0.4",
      "cpu_average": "1",
      "mem": "0.4"
    },
    "323": {
      "cmdline": "/usr/bin/python3 -c from multiprocessing.resource_tracker import main;main(59)",
      "cpu": "1.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "324": {
      "cmdline": "frigate.detector.coral_edgetpu_pcie",
      "cpu": "1.2",
      "cpu_average": "2",
      "mem": "0.4"
    },
    "326": {
      "cmdline": "frigate.output       ",
      "cpu": "26.5",
      "cpu_average": "24",
      "mem": "0.4"
    },
    "340": {
      "cmdline": "ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 1 -bf 0 pipe:",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "341": {
      "cmdline": "ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 1 -bf 0 pipe:",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "342": {
      "cmdline": "ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 1 -bf 0 pipe:",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "343": {
      "cmdline": "ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 1 -bf 0 pipe:",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "344": {
      "cmdline": "ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 1 -bf 0 pipe:",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    },
    "345": {
      "cmdline": "ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1920x1080 -i pipe: -f mpegts -s 1920x1080 -codec:v mpeg1video -q 1 -bf 0 pipe:",
      "cpu": "17.3",
      "cpu_average": "16",
      "mem": "0.2"
    },
    "360": {
      "cmdline": "frigate.process:driveway",
      "cpu": "4.1",
      "cpu_average": "4",
      "mem": "0.4"
    },
    "361": {
      "cmdline": "frigate.process:parking",
      "cpu": "7.4",
      "cpu_average": "8",
      "mem": "0.4"
    },
    "362": {
      "cmdline": "frigate.process:back_entry",
      "cpu": "6.7",
      "cpu_average": "7",
      "mem": "0.5"
    },
    "363": {
      "cmdline": "frigate.process:basement_entry",
      "cpu": "3.8",
      "cpu_average": "4",
      "mem": "0.5"
    },
    "364": {
      "cmdline": "frigate.process:new  ",
      "cpu": "3.7",
      "cpu_average": "4",
      "mem": "0.4"
    },
    "365": {
      "cmdline": "frigate.capture:driveway",
      "cpu": "4.1",
      "cpu_average": "3",
      "mem": "0.4"
    },
    "368": {
      "cmdline": "frigate.capture:parking",
      "cpu": "4.0",
      "cpu_average": "3",
      "mem": "0.4"
    },
    "369": {
      "cmdline": "ffmpeg -hide_banner -loglevel info -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -flags +low_delay -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt+nobuffer+flush_packets -ec +guess_mvs+deblock+favor_inter -rtsp_transport tcp -timeout 10000000 -reorder_queue_size 1024 -i rtsp://nvr:<redacted>@cam-driveway.home/ -f segment -segment_time 60 -segment_format mp4 -strftime 1 -reset_timestamps 1 -c copy /tmp/cache/driveway@%Y%m%d%H%M%S%z.mp4 -r 10 -vf fps=10,scale=1280:720 -vf scale_vaapi=w=1280:h=720,hwdownload,format=yuv420p -f rawvideo -pix_fmt yuv420p pipe:",
      "cpu": "11.0",
      "cpu_average": "10",
      "mem": "0.2"
    },
    "375": {
      "cmdline": "ffmpeg -hide_banner -loglevel info -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -flags +low_delay -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt+nobuffer+flush_packets -ec +guess_mvs+deblock+favor_inter -rtsp_transport tcp -timeout 10000000 -reorder_queue_size 1024 -i rtsp://nvr:<redacted>@cam-parking.home/ -f segment -segment_time 60 -segment_format mp4 -strftime 1 -reset_timestamps 1 -c copy /tmp/cache/parking@%Y%m%d%H%M%S%z.mp4 -r 10 -vf fps=10,scale=1280:720 -vf scale_vaapi=w=1280:h=720,hwdownload,format=yuv420p -f rawvideo -pix_fmt yuv420p pipe:",
      "cpu": "11.0",
      "cpu_average": "10",
      "mem": "0.2"
    },
    "379": {
      "cmdline": "frigate.capture:back_entry",
      "cpu": "3.8",
      "cpu_average": "3",
      "mem": "0.4"
    },
    "382": {
      "cmdline": "frigate.capture:basement_entry",
      "cpu": "4.0",
      "cpu_average": "3",
      "mem": "0.4"
    },
    "384": {
      "cmdline": "frigate.capture:new  ",
      "cpu": "3.8",
      "cpu_average": "3",
      "mem": "0.4"
    },
    "386": {
      "cmdline": "ffmpeg -hide_banner -loglevel info -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -flags +low_delay -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt+nobuffer+flush_packets -ec +guess_mvs+deblock+favor_inter -rtsp_transport tcp -timeout 10000000 -reorder_queue_size 1024 -i rtsp://nvr:<redacted>@cam-back-entry.home/ -f segment -segment_time 60 -segment_format mp4 -strftime 1 -reset_timestamps 1 -c copy /tmp/cache/back_entry@%Y%m%d%H%M%S%z.mp4 -r 10 -vf fps=10,scale=1280:720 -vf scale_vaapi=w=1280:h=720,hwdownload,format=yuv420p -f rawvideo -pix_fmt yuv420p pipe:",
      "cpu": "10.3",
      "cpu_average": "10",
      "mem": "0.2"
    },
    "390": {
      "cmdline": "frigate.audio_manager",
      "cpu": "0.4",
      "cpu_average": "0",
      "mem": "0.4"
    },
    "393": {
      "cmdline": "ffmpeg -hide_banner -loglevel info -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -flags +low_delay -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt+nobuffer+flush_packets -ec +guess_mvs+deblock+favor_inter -rtsp_transport tcp -timeout 10000000 -reorder_queue_size 1024 -i rtsp://nvr:<redacted>@cam-new.home/ -f segment -segment_time 60 -segment_format mp4 -strftime 1 -reset_timestamps 1 -c copy /tmp/cache/new@%Y%m%d%H%M%S%z.mp4 -r 10 -vf fps=10,scale=1280:720 -vf scale_vaapi=w=1280:h=720,hwdownload,format=yuv420p -f rawvideo -pix_fmt yuv420p pipe:",
      "cpu": "10.7",
      "cpu_average": "10",
      "mem": "0.2"
    },
    "394": {
      "cmdline": "ffmpeg -hide_banner -loglevel info -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -flags +low_delay -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt+nobuffer+flush_packets -ec +guess_mvs+deblock+favor_inter -rtsp_transport tcp -timeout 10000000 -reorder_queue_size 1024 -i rtsp://nvr:<redacted>@cam-basement-entry.home/ -f segment -segment_time 60 -segment_format mp4 -strftime 1 -reset_timestamps 1 -c copy /tmp/cache/basement_entry@%Y%m%d%H%M%S%z.mp4 -r 10 -vf fps=10,scale=1280:720 -vf scale_vaapi=w=1280:h=720,hwdownload,format=yuv420p -f rawvideo -pix_fmt yuv420p pipe:",
      "cpu": "10.6",
      "cpu_average": "10",
      "mem": "0.2"
    },
    "1280": {
      "cmdline": "sleep 30s",
      "cpu": "0.0",
      "cpu_average": "0",
      "mem": "0.0"
    }
  },
  "detection_fps": 4,
  "detectors": {
    "coral_edgetpu_pcie": {
      "detection_start": 0,
      "inference_speed": 9.99,
      "pid": 324
    }
  },
  "gpu_usages": {
    "intel-vaapi": {
      "gpu": "20.65%",
      "mem": "-%"
    }
  },
  "processes": {
    "audioDetector": {
      "pid": 390
    },
    "go2rtc": {
      "pid": 91
    },
    "logger": {
      "pid": 305
    },
    "recording": {
      "pid": 314
    }
  },
  "service": {
    "last_updated": 1702108791,
    "latest_version": "0.12.1",
    "storage": {
      "/dev/shm": {
        "free": 242,
        "mount_type": "tmpfs",
        "total": 256,
        "used": 14
      },
      "/media/frigate/clips": {
        "free": 79544,
        "mount_type": "zfs",
        "total": 4718592,
        "used": 4639048
      },
      "/media/frigate/recordings": {
        "free": 79544,
        "mount_type": "zfs",
        "total": 4718592,
        "used": 4639048
      },
      "/tmp/cache": {
        "free": 2645,
        "mount_type": "tmpfs",
        "total": 2861,
        "used": 216
      }
    },
    "temperatures": {
      "apex_0": 43.3
    },
    "uptime": 418,
    "version": "0.13.0-614a36a"
  }
}
```


### Operating system

Proxmox

### Install method

Docker CLI

### Coral version

PCIe

### Any other information that may be helpful

_No response_


Discussion:

Resolving patch:
diff --git a/frigate/events/audio.py b/frigate/events/audio.py
--- a/frigate/events/audio.py
+++ b/frigate/events/audio.py
@@ -43,9 +43,9 @@ def get_ffmpeg_command(ffmpeg: FfmpegConfig) -> list[str]:
     ffmpeg_input: CameraInput = [i for i in ffmpeg.inputs if "audio" in i.roles][0]
     input_args = get_ffmpeg_arg_list(ffmpeg.global_args) + (
         parse_preset_input(ffmpeg_input.input_args, 1)
-        or ffmpeg_input.input_args
+        or get_ffmpeg_arg_list(ffmpeg_input.input_args)
         or parse_preset_input(ffmpeg.input_args, 1)
-        or ffmpeg.input_args
+        or get_ffmpeg_arg_list(ffmpeg.input_args)
     )
     return (
         ["ffmpeg", "-vn"]


Test patch: