[Config Support]: hwaccel issue: "ffmpeg process is not running. exiting capture thread..." #14798
-
Describe the problem you are havingI ditched my ol' AMD graphics card and replaced it by an NVIDIA RTY 3050. I still have issues when trying to enable hwaccel; the cameras refuse to connect. I've followed the guides and made changes to the docker-compose file as well as installed the NVIDIA Container Toolkit. I think that I've properly specified the GPU to Docker. I also determined that the h264 codec is applicable to my card before noting this in the config file. Somewhere, though, I must have screwed-up. If somebody could please have a look to see where I may have made a mistake, I'd be very appreciative... VersionSystem 0.14.1-f4f3cfa Frigate config file### configuration in the root of the Home Assistant config directory!
mqtt:
host: 10.57.8.4
user: me
password: mypassword
ffmpeg:
hwaccel_args: preset-nvidia-h264
detectors:
coral:
type: edgetpu
device: usb
# Object configuration
objects:
track:
- person
- car
- motorcycle
- package
# Restream configuration
go2rtc:
streams:
doorbell-d304p:
- rtsp://admin:[email protected]/h264Preview_01_sub
- "ffmpeg:http://10.57.8.56/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=mypassword2#video=copy#audio=copy#audio=opus"
doorbell-d304p_sub:
# - rtsp://admin:[email protected]/h264Preview_01_sub
- "ffmpeg:http://10.57.8.56/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=mypassword2"
front-rlc833a:
- rtsp://admin:[email protected]/h264Preview_01_sub
- "ffmpeg:front-rlc-833a#video=h264#audio=aac"
sideback-rlc833a:
- rtsp://admin:[email protected]/h264Preview_01_sub
- "ffmpeg:sideback-rlc-833a#video=h264#audio=aac"
back-rlc833a:
- rtsp://admin:[email protected]/h264Preview_01_sub
- "ffmpeg:back-rlc-833a#video=h264#audio=aac"
garage-e550p:
- rtsp://admin:[email protected]/h264Preview_01_sub
- "ffmpeg:garage-e550p#video=h264#audio=aac"
#webrtc:
# candidates:
# - 10.57.8.4:8555
cameras:
doorbell-d304p:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/doorbell-d304p
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/doorbell-d304p_sub
input_args: preset-rtsp-restream-low-latency
roles:
- detect
output_args:
record: preset-record-generic-audio-aac
live:
stream_name: doorbell-d304p
detect:
enabled: true
width: 480
height: 640
record:
enabled: true
retain:
days: 7
mode: all
events:
retain:
default: 30
mode: motion
zones:
FrontDoorStep:
coordinates:
0.781,0.882,0.993,0.768,0.997,0.996,0.342,0.999,0.334,0.952,0.498,0.945,0.623,0.928
loitering_time: 0
objects:
- person
- package
UpperDriveway:
coordinates:
0.312,0.587,0.104,0.665,0.083,0.856,0.333,0.951,0.494,0.941,0.612,0.925,0.783,0.879,1,0.763,0.997,0.431,0.772,0.483,0.779,0.542,0.488,0.573
loitering_time: 0
motion:
mask:
0.004,0.587,0.214,0.587,0.485,0.569,0.77,0.537,0.764,0.475,1,0.417,1,0.182,0,0.176
threshold: 30
contour_area: 10
improve_contrast: 'true'
review:
alerts:
required_zones:
- FrontDoorStep
- UpperDriveway
detections:
required_zones:
- FrontDoorStep
- UpperDriveway
front-rlc833a:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/front-rlc833a?video&audio
input_args: preset-rtsp-restream-low-latency
roles:
- detect
- record
output_args:
record: preset-record-generic-audio-aac
detect:
enabled: true
width: 640
height: 360
record:
enabled: true
retain:
days: 0
mode: all
events:
retain:
default: 30
mode: motion
motion:
mask:
- 0.305,0.003,0.686,0.266,0.999,0.509,1,0
- 0.243,0.743,0.192,0.871,0.108,0.916,0.122,1,0.408,1,0.375,0.912,0.353,0.739,0.282,0.71
threshold: 44
contour_area: 10
improve_contrast: 'true'
zones:
FrontDoorStep:
coordinates:
0.047,0.406,0.095,0.411,0.116,0.328,0.135,0.321,0.221,0.67,0.238,0.735,0.188,0.862,0.102,0.905,0.068,0.658
loitering_time: 0
inertia: 3
objects:
- package
- person
UpperDriveway:
coordinates:
0.816,0.37,0.729,0.307,0.692,0.331,0.442,0.241,0.139,0.316,0.237,0.732,0.28,0.693,0.355,0.729,0.369,0.899,0.416,0.993,0.995,0.997,0.998,0.522
loitering_time: 0
inertia: 3
FrontYard:
coordinates: 0.116,0.314,0.442,0.232,0.689,0.323,0.731,0.305,0.302,0.012,0.101,0.007
loitering_time: 0
objects: person
review:
alerts:
required_zones:
- FrontDoorStep
- FrontYard
- UpperDriveway
detections:
required_zones:
- FrontDoorStep
- FrontYard
- UpperDriveway
sideback-rlc833a:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/sideback-rlc833a?video&audio
input_args: preset-rtsp-restream-low-latency
roles:
- detect
- record
output_args:
record: preset-record-generic-audio-aac
detect:
enabled: true
width: 640
height: 360
record:
enabled: true
retain:
days: 7
mode: all
events:
retain:
default: 30
mode: motion
zones:
UpperDriveway:
coordinates: 0.062,0.198,0.118,0.181,0.153,0.109,0.147,0.029,0.061,0.036
loitering_time: 0
objects: person
SideYard:
coordinates:
0.151,0.104,0.304,0.097,0.502,0.119,1,0.491,1,1,0.425,1,0.341,0.596,0.286,0.437,0.196,0.357,0.246,0.309,0.211,0.171,0.119,0.193
loitering_time: 0
objects: person
SideGarden:
coordinates:
0.06,0.206,0.106,0.196,0.142,0.203,0.209,0.179,0.24,0.307,0.188,0.357,0.289,0.454,0.344,0.633,0.419,1,0.064,1
loitering_time: 0
objects: person
motion:
mask:
0.062,0,0.062,0.029,0.149,0.02,0.16,0.101,0.329,0.09,0.5,0.111,1,0.478,0.996,0,0.782,0
review:
alerts:
required_zones:
- SideGarden
- SideYard
- UpperDriveway
detections:
required_zones:
- SideYard
- UpperDriveway
- SideGarden
back-rlc833a:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/back-rlc833a?video&audio
input_args: preset-rtsp-restream-low-latency
roles:
- detect
- record
output_args:
record: preset-record-generic-audio-aac
detect:
enabled: true
width: 640
height: 360
record:
enabled: true
retain:
days: 7
mode: all
events:
retain:
default: 30
mode: motion
zones:
BackEntry:
coordinates:
0.177,0.358,0.169,0.991,0.661,0.991,0.658,0.353,0.616,0.241,0.472,0.155,0.208,0.059
loitering_time: 0
objects: person
inertia: 3
motion:
mask:
0.173,0.363,0.207,0.055,0.472,0.147,0.621,0.237,0.663,0.358,0.665,0.993,0.678,0.993,0.682,0.007,0.176,0.007
review:
alerts:
required_zones: BackEntry
detections:
required_zones: BackEntry
garage-e550p:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/garage-e550p?video&audio
input_args: preset-rtsp-restream-low-latency
roles:
- detect
- record
output_args:
record: preset-record-generic-audio-aac
detect:
enabled: true
width: 640
height: 360
record:
enabled: true
retain:
days: 7
mode: all
events:
retain:
default: 30
mode: motion
motion:
threshold: 45
contour_area: 10
improve_contrast: 'true'
mask: 0.775,0,0,0.311,0,0
zones:
LowerDriveway:
coordinates:
0.104,0.273,0.209,0.232,0.657,0.392,0.751,0.524,0.718,0.991,0.006,0.997,0.005,0.637,0.214,0.413,0.202,0.35
loitering_time: 0
objects:
- car
- person
GarageLawn:
coordinates: 0.671,0.396,0.755,0.517,0.723,1,1,0.991,1,0.495
loitering_time: 0
GarageBrush1:
coordinates: 0.218,0.23,0.746,0.019,0.745,0.072,0.879,0.099,1,0.085,0.999,0.488,0.658,0.381
inertia: 3
loitering_time: 0
objects: person
GarageBrush2:
coordinates: 0,0.316,0.101,0.276,0.199,0.352,0.209,0.406,0.003,0.63
loitering_time: 0
review:
alerts:
required_zones:
- LowerDriveway
- GarageBrush1
- GarageBrush2
- GarageLawn
detections:
required_zones:
- GarageLawn
- LowerDriveway
- GarageBrush2
- GarageBrush1
objects:
filters:
person:
mask: 0.728,0.572,0.673,0.788,0.704,0.942,0.813,0.942,0.988,0.93,0.981,0.608
version: 0.14
camera_groups:
Front:
order: 1
icon: LuTv2
cameras:
- doorbell-d304p
- front-rlc833a Relevant Frigate log output2024-11-04 19:14:15.154240316 [2024-11-04 19:14:15] frigate.video ERROR : front-rlc833a: Unable to read frames from ffmpeg process.
2024-11-04 19:14:15.154474113 [2024-11-04 19:14:15] frigate.video ERROR : front-rlc833a: ffmpeg process is not running. exiting capture thread...
2024-11-04 19:14:15.163011718 [2024-11-04 19:14:15] watchdog.doorbell-d304p ERROR : No new recording segments were created for doorbell-d304p in the last 120s. restarting the ffmpeg record process...
2024-11-04 19:14:15.163154073 [2024-11-04 19:14:15] watchdog.doorbell-d304p INFO : Terminating the existing ffmpeg process...
2024-11-04 19:14:15.163732133 [2024-11-04 19:14:15] watchdog.doorbell-d304p INFO : Waiting for ffmpeg to exit gracefully...
2024-11-04 19:14:15.163896654 [2024-11-04 19:14:15] frigate.video ERROR : doorbell-d304p: Unable to read frames from ffmpeg process.
2024-11-04 19:14:15.164097739 [2024-11-04 19:14:15] frigate.video ERROR : doorbell-d304p: ffmpeg process is not running. exiting capture thread...
2024-11-04 19:14:25.137147656 [2024-11-04 19:14:25] watchdog.garage-e550p ERROR : Ffmpeg process crashed unexpectedly for garage-e550p.
2024-11-04 19:14:25.153064076 [2024-11-04 19:14:25] watchdog.garage-e550p ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-11-04 19:14:25.153383510 [2024-11-04 19:14:25] ffmpeg.garage-e550p.detect ERROR : [rtsp @ 0x5587aec56140] method DESCRIBE failed: 404 Not Found
2024-11-04 19:14:25.153610709 [2024-11-04 19:14:25] ffmpeg.garage-e550p.detect ERROR : rtsp://127.0.0.1:8554/garage-e550p?video&audio: Server returned 404 Not Found
2024-11-04 19:14:25.154133184 [2024-11-04 19:14:25] watchdog.back-rlc833a ERROR : Ffmpeg process crashed unexpectedly for back-rlc833a.
2024-11-04 19:14:25.154136924 [2024-11-04 19:14:25] watchdog.back-rlc833a ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-11-04 19:14:25.154139221 [2024-11-04 19:14:25] ffmpeg.back-rlc833a.detect ERROR : [rtsp @ 0x5563ffe5b140] method DESCRIBE failed: 404 Not Found
2024-11-04 19:14:25.154141279 [2024-11-04 19:14:25] ffmpeg.back-rlc833a.detect ERROR : rtsp://127.0.0.1:8554/back-rlc833a?video&audio: Server returned 404 Not Found
2024-11-04 19:14:25.155592305 [2024-11-04 19:14:25] watchdog.sideback-rlc833a ERROR : Ffmpeg process crashed unexpectedly for sideback-rlc833a.
2024-11-04 19:14:25.159208485 [2024-11-04 19:14:25] watchdog.sideback-rlc833a ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-11-04 19:14:25.159214306 [2024-11-04 19:14:25] ffmpeg.sideback-rlc833a.detect ERROR : [rtsp @ 0x5589cbd9e140] method DESCRIBE failed: 404 Not Found
2024-11-04 19:14:25.159216960 [2024-11-04 19:14:25] ffmpeg.sideback-rlc833a.detect ERROR : rtsp://127.0.0.1:8554/sideback-rlc833a?video&audio: Server returned 404 Not Found
2024-11-04 19:14:25.175907009 [2024-11-04 19:14:25] watchdog.front-rlc833a ERROR : Ffmpeg process crashed unexpectedly for front-rlc833a.
2024-11-04 19:14:25.175912797 [2024-11-04 19:14:25] watchdog.front-rlc833a ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-11-04 19:14:25.175915309 [2024-11-04 19:14:25] ffmpeg.front-rlc833a.detect ERROR : [rtsp @ 0x5559c3bb1140] method DESCRIBE failed: 404 Not Found
2024-11-04 19:14:25.175917709 [2024-11-04 19:14:25] ffmpeg.front-rlc833a.detect ERROR : rtsp://127.0.0.1:8554/front-rlc833a?video&audio: Server returned 404 Not Found
2024-11-04 19:14:25.179874434 [2024-11-04 19:14:25] frigate.video ERROR : garage-e550p: Unable to read frames from ffmpeg process.
2024-11-04 19:14:25.180313349 [2024-11-04 19:14:25] frigate.video ERROR : garage-e550p: ffmpeg process is not running. exiting capture thread...
2024-11-04 19:14:25.181331636 [2024-11-04 19:14:25] frigate.video ERROR : back-rlc833a: Unable to read frames from ffmpeg process.
2024-11-04 19:14:25.181665897 [2024-11-04 19:14:25] frigate.video ERROR : back-rlc833a: ffmpeg process is not running. exiting capture thread...
2024-11-04 19:14:25.183659884 [2024-11-04 19:14:25] watchdog.doorbell-d304p ERROR : Ffmpeg process crashed unexpectedly for doorbell-d304p.
2024-11-04 19:14:25.184174867 [2024-11-04 19:14:25] watchdog.doorbell-d304p ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-11-04 19:14:25.184594529 [2024-11-04 19:14:25] ffmpeg.doorbell-d304p.detect ERROR : [rtsp @ 0x562eb7da9e40] method DESCRIBE failed: 404 Not Found
2024-11-04 19:14:25.184812136 [2024-11-04 19:14:25] ffmpeg.doorbell-d304p.detect ERROR : rtsp://127.0.0.1:8554/doorbell-d304p_sub: Server returned 404 Not Found
2024-11-04 19:14:25.193311199 [2024-11-04 19:14:25] frigate.video ERROR : sideback-rlc833a: Unable to read frames from ffmpeg process.
2024-11-04 19:14:25.193504851 [2024-11-04 19:14:25] frigate.video ERROR : front-rlc833a: Unable to read frames from ffmpeg process.
2024-11-04 19:14:25.193628833 [2024-11-04 19:14:25] frigate.video ERROR : front-rlc833a: ffmpeg process is not running. exiting capture thread...
2024-11-04 19:14:25.193781778 [2024-11-04 19:14:25] frigate.video ERROR : sideback-rlc833a: ffmpeg process is not running. exiting capture thread...
2024-11-04 19:14:25.195149869 [2024-11-04 19:14:25] watchdog.doorbell-d304p ERROR : No new recording segments were created for doorbell-d304p in the last 120s. restarting the ffmpeg record process...
2024-11-04 19:14:25.195154675 [2024-11-04 19:14:25] watchdog.doorbell-d304p INFO : Terminating the existing ffmpeg process...
2024-11-04 19:14:25.195156878 [2024-11-04 19:14:25] watchdog.doorbell-d304p INFO : Waiting for ffmpeg to exit gracefully...
2024-11-04 19:14:25.202212232 [2024-11-04 19:14:25] frigate.video ERROR : doorbell-d304p: Unable to read frames from ffmpeg process.
2024-11-04 19:14:25.202505446 [2024-11-04 19:14:25] frigate.video ERROR : doorbell-d304p: ffmpeg process is not running. exiting capture thread... Relevant go2rtc log output2024-11-04 18:57:00.182741125 [INFO] Preparing new go2rtc config...
2024-11-04 18:57:00.729168303 [INFO] Starting go2rtc...
2024-11-04 18:57:00.862058732 18:57:00.861 INF go2rtc platform=linux/amd64 revision=b2399f3 version=1.9.2
2024-11-04 18:57:00.862082828 18:57:00.862 INF config path=/dev/shm/go2rtc.yaml
2024-11-04 18:57:00.862661717 18:57:00.862 ERR [rtsp] listen error="listen tcp :8554: bind: address already in use"
2024-11-04 18:57:00.862735354 18:57:00.862 ERR [api] listen error="listen tcp :1984: bind: address already in use"
2024-11-04 18:57:00.862873017 18:57:00.862 INF [webrtc] listen addr=:8555/tcp
2024-11-04 18:57:10.179996564 [INFO] Starting go2rtc healthcheck service... Frigate statsstill don't know where to find these stats ☹️ Operating systemOther Linux Install methodDocker Compose docker-compose file or Docker CLI commandservices:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
deploy: # <------------- Add this section
resources:
reservations:
devices:
- driver: nvidia
# device_ids: ['0'] # this is only needed when using multiple GPUs
count: 1 # number of GPUs
capabilities: [gpu]
shm_size: "128mb" # updated for my cameras
devices:
- /dev/bus/usb:/dev/bus/usb # Passes the USB Coral
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/homeassistant/config/frigate.yml:/config/config.yml
- /mnt/hvSSD/Frigate:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "8971:8971"
- "5000:5000" # Internal unauthenticated access. Expose carefully.
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
FRIGATE_RTSP_PASSWORD: !secret /homeasistant/config/secrets.yaml/frigate_password
network_mode: host Object DetectorCoral Screenshots of the Frigate UI's System metrics pagesAny other information that may be helpful
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 14 replies
-
what are go2rtc logs? |
Beta Was this translation helpful? Give feedback.
-
As noted above...
Not so sure why those 2 ports are bound. |
Beta Was this translation helpful? Give feedback.
-
E1 Outdoor SE |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks for your help again, Nick. I'm slowly wading through all of this and will eventually end up with a happy system. The only way I'm able to do it is with the generous help from people here! |
Beta Was this translation helpful? Give feedback.
20-30% cpu usage isn't really high, and in any case a GPU only helps so much, you still have issues that only the CPU can solve. Moving the garage to a sub stream should help