[Support]: ffmpeg continuous crashes when on color mode (not on B/N) #15889
-
Describe the problem you are havingHello, I have 5 Dahua IPC-HDBW2541E-S. 4 of them are behaving fine and 1 is not. I get continuous ffmpeg crashes during the day and they stop at night, when the camera automatically enables the infrared. I found a way to reproduce: when I go in the camera settings, camera -> conditions -> day & night -> change from "auto" to "B/N", the crashes stop. The 4 cameras that are working well are on a old firmware (and I can't upgrade them due to a problem - only the camera misbehaving I can upgrade and it came with a much newer firmware). It took me ages to find that "color"/"b/n" is the cause, but now I am not sure how to fix though. The misbehaving camera is "giardino". Version0.14.1-f4f3cfa (but happening also on previous versions) What browser(s) are you using?Version 131.0.6778.108 (Official Build) (64-bit) Frigate config filemqtt:
enabled: true
host: core-mosquitto
user: redacted
password: redacted
topic_prefix: frigate
client_id: frigate
stats_interval: 60
go2rtc:
streams:
garage-civico-47:
- rtsp://redacted:[email protected]:554/cam/realmonitor?channel=1&subtype=0
garage-civico-47-sub:
- rtsp://redacted:[email protected]:554/cam/realmonitor?channel=1&subtype=1
garage-civico-61:
- rtsp://redacted:[email protected]:554/cam/realmonitor?channel=1&subtype=0
garage-civico-61-sub:
- rtsp://redacted:[email protected]:554/cam/realmonitor?channel=1&subtype=1
ingresso-civico-55:
- rtsp://redacted:[email protected]:554/cam/realmonitor?channel=1&subtype=0
ingresso-civico-55-sub:
- rtsp://redacted:[email protected]:554/cam/realmonitor?channel=1&subtype=1
garage-interno:
- rtsp://redacted:[email protected]:554/cam/realmonitor?channel=1&subtype=0
garage-interno-sub:
- rtsp://redacted:[email protected]:554/cam/realmonitor?channel=1&subtype=1
giardino:
- rtsp://redacted:[email protected]:554/cam/realmonitor?channel=1&subtype=0
giardino-sub:
- rtsp://redacted:[email protected]:554/cam/realmonitor?channel=1&subtype=1
ffmpeg:
hwaccel_args: preset-vaapi
output_args:
record: preset-record-generic-audio-copy
detectors:
coral:
type: edgetpu
device: usb
cameras:
ingresso-civico-55:
enabled: true
audio:
enabled: false
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/ingresso-civico-55
roles:
- record
- audio
- path: rtsp://127.0.0.1:8554/ingresso-civico-55-sub
roles:
- detect
live:
stream_name: ingresso-civico-55
mqtt:
timestamp: false
bounding_box: false
crop: true
quality: 100
height: 500
motion:
mask:
- 704,0,704,35,397,31,393,0
- 0,576,189,576,0,191
garage-civico-47:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/garage-civico-47
roles:
- record
- audio
- path: rtsp://127.0.0.1:8554/garage-civico-47-sub
roles:
- detect
live:
stream_name: garage-civico-47
mqtt:
timestamp: false
bounding_box: false
crop: true
quality: 100
height: 500
objects:
filters:
car:
mask:
- 239,97,230,0,224,0,310,0,320,127
suitcase:
mask:
- 704,76,585,40,561,188,704,254
motion:
mask:
- 683,530,704,576,401,576,401,538
- 31,55,176,0,0,0,0,205
garage-civico-61:
enabled: true
audio:
enabled: false
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/garage-civico-61
roles:
- record
- audio
- path: rtsp://127.0.0.1:8554/garage-civico-61-sub
roles:
- detect
live:
stream_name: garage-civico-61
mqtt:
timestamp: false
bounding_box: false
crop: true
quality: 100
height: 500
motion:
mask:
- 397,0,350,57,0,118,0,0
- 704,0,502,0,506,47,704,212
zones:
escluso_cancello:
coordinates: 0,125,0,576,704,576,704,111,489,56,431,57,439,0
objects:
filters:
suitcase:
mask:
- 223,91,293,90,291,191,236,184
garage-interno:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/garage-interno
roles:
- record
- audio
- path: rtsp://127.0.0.1:8554/garage-interno-sub
roles:
- detect
live:
stream_name: garage-interno
mqtt:
timestamp: false
bounding_box: false
crop: true
quality: 100
height: 500
objects:
filters:
bicycle:
mask: 704,248,704,146,642,45,511,83,595,296
car:
mask: 364,0,610,0,616,105,370,113
motion:
mask:
- 704,535,704,576,403,576,405,541
- 465,0,704,0,704,330
giardino:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/giardino
roles:
- record
- audio
- path: rtsp://127.0.0.1:8554/giardino-sub
roles:
- detect
live:
stream_name: giardino
mqtt:
timestamp: false
bounding_box: false
crop: true
quality: 100
height: 500
motion:
mask:
- 704,0,459,0,463,144,704,331
- 293,0,0,0,0,32,296,39
- 0,30,108,37,119,168,0,217
objects:
filters:
suitcase:
mask:
- 0.099,0.705,0.25,0.526,0.379,0.595,0.247,0.795
- 0.133,0.416,0.226,0.349,0.289,0.467,0.203,0.54
person:
mask: 0.211,0.534,0.142,0.42,0.226,0.358,0.281,0.475
detect:
enabled: true
width: 704
height: 576
fps: 5
audio:
enabled: true
listen:
- bark
- fire_alarm
- scream
- speech
- yell
record:
enabled: true
retain:
days: 14
mode: all
events:
retain:
default: 30
mode: motion
objects:
track:
- person
- car
- bicycle
- motorcycle
- cat
- backpack
- handbag
- suitcase
- knife
- dog
version: 0.14
camera_groups:
Garage:
order: 1
icon: LuCar
cameras:
- garage-civico-47
- garage-civico-61
- garage-interno
Parti_comuni:
order: 2
icon: LuFlower2
cameras:
- giardino
- ingresso-civico-55 Relevant Frigate log output2025-01-08 08:49:10.794937773 [2025-01-08 09:49:10] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 08:49:10.795184075 [2025-01-08 09:49:10] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 08:50:00.816220488 [2025-01-08 09:50:00] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 08:50:00.816482179 [2025-01-08 09:50:00] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 08:50:00.877880009 [2025-01-08 09:50:00] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 08:50:00.878134188 [2025-01-08 09:50:00] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 08:50:10.881061128 [2025-01-08 09:50:10] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 08:50:10.881291508 [2025-01-08 09:50:10] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 08:51:00.900150486 [2025-01-08 09:51:00] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 08:51:00.900353834 [2025-01-08 09:51:00] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 08:51:00.986461311 [2025-01-08 09:51:00] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 08:51:00.987921095 [2025-01-08 09:51:00] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 08:51:10.987969167 [2025-01-08 09:51:10] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 08:51:10.988070512 [2025-01-08 09:51:10] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 08:52:01.005374547 [2025-01-08 09:52:01] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 08:52:01.005769260 [2025-01-08 09:52:01] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 08:52:01.113986186 [2025-01-08 09:52:01] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 08:52:01.114128253 [2025-01-08 09:52:01] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 08:52:11.120707435 [2025-01-08 09:52:11] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 08:52:11.120711469 [2025-01-08 09:52:11] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 08:53:01.131337986 [2025-01-08 09:53:01] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 08:53:01.131570839 [2025-01-08 09:53:01] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 08:53:01.235695760 [2025-01-08 09:53:01] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 08:53:01.236934984 [2025-01-08 09:53:01] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 08:53:11.239446926 [2025-01-08 09:53:11] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 08:53:11.239732418 [2025-01-08 09:53:11] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 08:54:01.263111335 [2025-01-08 09:54:01] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 08:54:01.263345501 [2025-01-08 09:54:01] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 08:54:01.352591348 [2025-01-08 09:54:01] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 08:54:01.352811800 [2025-01-08 09:54:01] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 08:54:11.362495457 [2025-01-08 09:54:11] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 08:54:11.362872063 [2025-01-08 09:54:11] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 08:55:01.375345270 [2025-01-08 09:55:01] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 08:55:01.375592967 [2025-01-08 09:55:01] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 08:55:01.512927941 [2025-01-08 09:55:01] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 08:55:01.514169773 [2025-01-08 09:55:01] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 08:55:11.516351475 [2025-01-08 09:55:11] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 08:55:11.516679691 [2025-01-08 09:55:11] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 09:09:13.537332554 [2025-01-08 10:09:13] frigate.comms.dispatcher INFO : Setting motion threshold for garage-civico-47: 30
2025-01-08 09:09:13.544695146 [2025-01-08 10:09:13] frigate.comms.dispatcher INFO : Setting motion contour area for garage-civico-47: 10
2025-01-08 09:23:51.732143889 [2025-01-08 10:23:51] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 09:23:51.733168441 [2025-01-08 10:23:51] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 09:23:51.844262074 [2025-01-08 10:23:51] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 09:23:51.845203903 [2025-01-08 10:23:51] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 09:24:01.848054597 [2025-01-08 10:24:01] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 09:24:01.848063774 [2025-01-08 10:24:01] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 09:24:51.871475896 [2025-01-08 10:24:51] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 09:24:51.871710275 [2025-01-08 10:24:51] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 09:24:51.927025614 [2025-01-08 10:24:51] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 09:24:51.927300991 [2025-01-08 10:24:51] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 09:25:01.931759133 [2025-01-08 10:25:01] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 09:25:01.932683371 [2025-01-08 10:25:01] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 09:25:51.953122953 [2025-01-08 10:25:51] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 09:25:51.953364615 [2025-01-08 10:25:51] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 09:25:52.074300564 [2025-01-08 10:25:52] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 09:25:52.075619090 [2025-01-08 10:25:52] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 09:26:02.077034626 [2025-01-08 10:26:02] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 09:26:02.077310906 [2025-01-08 10:26:02] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 09:26:52.099511252 [2025-01-08 10:26:52] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 09:26:52.099730595 [2025-01-08 10:26:52] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 09:26:52.189813498 [2025-01-08 10:26:52] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 09:26:52.190102248 [2025-01-08 10:26:52] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 09:27:02.192544548 [2025-01-08 10:27:02] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 09:27:02.201446368 [2025-01-08 10:27:02] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 09:27:52.216136069 [2025-01-08 10:27:52] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 09:27:52.216784755 [2025-01-08 10:27:52] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 09:27:52.264636404 [2025-01-08 10:27:52] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 09:27:52.265089850 [2025-01-08 10:27:52] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 09:28:02.267857894 [2025-01-08 10:28:02] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 09:28:02.268065328 [2025-01-08 10:28:02] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 09:28:52.290546281 [2025-01-08 10:28:52] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 09:28:52.290751676 [2025-01-08 10:28:52] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 09:28:52.403130038 [2025-01-08 10:28:52] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 09:28:52.405252014 [2025-01-08 10:28:52] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 09:29:02.407416845 [2025-01-08 10:29:02] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 09:29:02.407647339 [2025-01-08 10:29:02] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-01-08 09:29:52.432678973 [2025-01-08 10:29:52] watchdog.giardino INFO : No frames received from giardino in 20 seconds. Exiting ffmpeg...
2025-01-08 09:29:52.432763787 [2025-01-08 10:29:52] watchdog.giardino INFO : Waiting for ffmpeg to exit gracefully...
2025-01-08 09:29:52.531572652 [2025-01-08 10:29:52] frigate.video ERROR : giardino: Unable to read frames from ffmpeg process.
2025-01-08 09:29:52.531682027 [2025-01-08 10:29:52] frigate.video ERROR : giardino: ffmpeg process is not running. exiting capture thread...
2025-01-08 09:30:02.533632809 [2025-01-08 10:30:02] watchdog.giardino ERROR : Ffmpeg process crashed unexpectedly for giardino.
2025-01-08 09:30:02.533908040 [2025-01-08 10:30:02] watchdog.giardino ERROR : The following ffmpeg logs include the last 100 lines prior to exit. Relevant go2rtc log outputNothing relevant here (there's literally nothing for today, and the problem happened to day from 7am) FFprobe output from your camera# ffprobe rtsp://redacted:[email protected]:554
ffprobe version n5.1-2-g915ef932a3-20220731 Copyright (c) 2007-2022 the FFmpeg developers
built with gcc 12.1.0 (crosstool-NG 1.25.0.55_3defb7b)
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20220731
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Input #0, rtsp, from 'rtsp://redacted:[email protected]:554':
Metadata:
title : Media Server
Duration: N/A, start: 0.064000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p(progressive), 2960x1668, 10 fps, 10 tbr, 90k tbn
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp Frigate statsSorry I don't know how to get this with the addon Install methodHassOS Addon docker-compose file or Docker CLI commandit's installed as HassOS Addon Object DetectorCoral Network connectionWired Camera make and modelDahua IPC-HDBW2541E-S Screenshots of the Frigate UI's System metrics pagesAny other information that may be helpfulI moved from Auto to B/N at 09:55 and to Auto (so "color" since it's 10am here and there's light) at 10:25. In the screenshot attached, you can see the Giardino camera stats changing at 10.25. That's when the ffpmeg crashes also starts. Also in the Frigate log, you can see the crashes before 09:55 and after 10:25. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 20 replies
-
Since you're using go2rtc, you could try using the ffmpeg module to see if it's more stable. Eg:
|
Beta Was this translation helpful? Give feedback.
-
hi @hawkeye217 it still crashes, but I get different errors in the frigate log now (below), I get the same also when in B/N now.
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Since you're using go2rtc, you could try using the ffmpeg module to see if it's more stable. Eg: