frigate .16.1, go2rtc audio conversion issues? #20437
-
Describe the problem you are havingImage: ghcr.io/blakeblackshear/frigate:0.16.1-tensorrt Camera in question: This started after the update from .15.x to .16.1, where this one particular camera no longer would record to the storage. Live streaming still works fine. I am aware that this is more than likely due to the stricter validation checks when recording files, where ulaw is not allowed in the container. I found this discussion, and checked my go2rtc config, which was set correctly, with the add of #hardware at the end (I tried removing it to no effect, but would prefer to have it use hardware acceleration if possible). I'm at a loss as to what I should change at this point. Version0.16.1-e664cb2 What browser(s) are you using?firefox 143.0.4 (64-bit) Frigate config filego2rtc:
foscam_sub:
- rtsp://user:pass@address:88/videoSub
- ffmpeg:foscam_sub#audio=aac
foscam_main:
- rtsp://user:pass@address:88/videoMain
- ffmpeg:foscam_main#audio=aac
Frigate:
back_porch:
# foscam floodlight
live:
streams:
foscam_sub: foscam_sub
inputs:
# sub
- path: rtsp://localhost:8554/foscam_sub
input_args: preset-rtsp-restream
roles:
- detect
# main
- path: rtsp://localhost:8554/foscam_main
input_args: preset-rtsp-restream
roles:
- record Relevant Frigate log output2025-10-11 18:07:11.686595577 [ WARN:[email protected]] global cap.cpp:175 open VIDEOIO(CV_IMAGES): raised OpenCV exception:
2025-10-11 18:07:36.440205 2025-10-11 18:07:11.686599937
2025-10-11 18:07:11.686602770 OpenCV(4.11.0) /io/opencv/modules/videoio/src/cap_images.cpp:267: error: (-215:Assertion failed) number < max_number in function 'icvExtractPattern'
2025-10-11 18:07:36.440231 2025-10-11 18:07:11.686607604
2025-10-11 18:07:36.440240 2025-10-11 18:07:11.686608912
2025-10-11 18:07:11.700391978 [2025-10-11 18:07:11] frigate.record.maintainer WARNING : Failed to probe corrupt segment /tmp/cache/[email protected]
2025-10-11 18:07:11.701271595 [2025-10-11 18:07:11] frigate.record.maintainer WARNING : Discarding a corrupt recording segment: /tmp/cache/[email protected]
2025-10-11 18:07:28.049089684 [2025-10-11 18:07:28] ffmpeg.back_porch.record ERROR : [mp4 @ 0x5c5a676df0c0] Could not find tag for codec pcm_mulaw in stream #1, codec not currently supported in container
2025-10-11 18:07:28.049441953 [2025-10-11 18:07:28] ffmpeg.back_porch.record ERROR : [out#0/segment @ 0x5c5a676ddf00] Could not write header (incorrect codec parameters ?): Invalid argument
2025-10-11 18:07:28.049701826 [2025-10-11 18:07:28] watchdog.back_porch INFO : Terminating the existing ffmpeg process...
2025-10-11 18:07:28.049875818 [2025-10-11 18:07:28] watchdog.back_porch INFO : Waiting for ffmpeg to exit gracefully...
2025-10-11 18:07:31.697243481 [ WARN:[email protected]] global cap.cpp:175 open VIDEOIO(CV_IMAGES): raised OpenCV exception:
2025-10-11 18:07:36.440264 2025-10-11 18:07:31.697250241
2025-10-11 18:07:31.697255769 OpenCV(4.11.0) /io/opencv/modules/videoio/src/cap_images.cpp:267: error: (-215:Assertion failed) number < max_number in function 'icvExtractPattern'
2025-10-11 18:07:36.440276 2025-10-11 18:07:31.697258213
2025-10-11 18:07:36.440285 2025-10-11 18:07:31.697260569
2025-10-11 18:07:31.959316138 [2025-10-11 18:07:31] frigate.record.maintainer WARNING : Failed to probe corrupt segment /tmp/cache/[email protected]
2025-10-11 18:07:31.959567375 [2025-10-11 18:07:31] frigate.record.maintainer WARNING : Discarding a corrupt recording segment: /tmp/cache/[email protected] Relevant go2rtc log output2025-10-11 18:25:27.020320370 [INFO] Preparing new go2rtc config...
2025-10-11 18:25:27.434623634 [INFO] Starting go2rtc...
2025-10-11 18:25:27.508704690 18:25:27.508 INF go2rtc platform=linux/amd64 revision=fa580c5 version=1.9.9
2025-10-11 18:25:27.508708801 18:25:27.508 INF config path=/dev/shm/go2rtc.yaml
2025-10-11 18:25:27.509181704 18:25:27.509 INF [api] listen addr=:1984
2025-10-11 18:25:27.509363834 18:25:27.509 INF [rtsp] listen addr=:8554
2025-10-11 18:25:27.509799341 18:25:27.509 INF [webrtc] listen addr=:8555
2025-10-11 18:25:36.534602815 [INFO] Starting go2rtc healthcheck service... FFprobe output from your cameraInput #0, rtsp, from 'rtsp://$user:$pass@$address:88/videoMain':
Metadata:
title : IP Camera Video
comment : videoMain
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: hevc (Main), yuv420p(tv), 2560x1440, 25 fps, 25 tbr, 90k tbn
Stream #0:1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s Frigate statsNo response Operating systemOther Linux Install methodDocker Compose Object DetectorOther Network connectionMixed Camera make and modelfoscam F41 Screenshots of the Frigate UI's System metrics pages![]() Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The issue you're experiencing is related to the pcm_mulaw audio codec not being supported in MP4 containers for recording. The error message Your go2rtc configuration appears correct, but there might be an issue with how the ffmpeg transcoding is being applied. When using the ffmpeg module in go2rtc, you should ensure the audio conversion is properly configured (1). Try updating your go2rtc configuration to use the ffmpeg module explicitly: go2rtc:
streams:
foscam_sub:
- ffmpeg:rtsp://user:pass@address:88/videoSub#video=copy#audio=aac#hardware
foscam_main:
- ffmpeg:rtsp://user:pass@address:88/videoMain#video=copy#audio=aac#hardware If you need to convert both audio and video streams, you can use: go2rtc:
streams:
foscam_main:
- rtsp://user:pass@address:88/videoMain
- "ffmpeg:foscam_main#video=h264#audio=aac#hardware" When using the ffmpeg module directly, you would add AAC audio like this: go2rtc:
streams:
foscam_main:
- "ffmpeg:rtsp://user:pass@address:88/videoMain#video=copy#audio=copy#audio=aac#hardware" The key difference is using the ffmpeg module directly in the stream URL rather than creating a separate transcoding stream. This ensures that the audio conversion happens at the source level before Frigate attempts to record the stream. 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
The AI is correct. Another easy way to transcode would be to use the
preset-record-generic-audio-aac
output args preset.This was covered in the breaking changes in the 0.16 release notes.