frigate: [HW Accel Support]: Nvidia Decoder Error
Describe the problem you are having
I’m heading towards trying to get a GPU detector set up, but was running into errors that I thought were related to not decoding the video on that device. In trying to just get hardware acceleration set up, I’m running into the errors shown. Not sure what to do about them. If I remove the hwaccel_args, I get output from the camera in the WebUI. Enabling the option gives the “No frames received, check error logs” message.
Version
0.13.1
Frigate config file
mqtt:
host: homeassistant.*****.ts.net
port: 1883
user: *******
password: *******
topic_prefix: frigate
objects:
track:
- person
- bicycle
- cat
- dog
- horse
- sheep
- cow
- elephant
- bear
- zebra
- giraffe
filters:
person:
min_area: 5000
max_area: 100000
cameras:
front-yard-cam: # <------ Name the camera
ffmpeg:
hwaccel_args: preset-nvidia-h264
inputs:
- path: rtsp://bauman-hpenvy.*******.ts.net:8556/front-yard-cam # <----- The stream you want to use for detection
roles:
- detect
- record
detect:
width: 1920 # <---- update for your camera's resolution
height: 1080 # <---- update for your camera's resolution
record:
enabled: True
snapshots:
enabled: True
logger:
default: info
logs:
frigate.mqtt: debug
docker-compose file or Docker CLI command
version: "3.9"
services:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable-tensorrt
shm_size: "64mb" # update for your cameras based on calculation above
deploy: # <------------- Add this section
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
devices:
- /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
- /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
volumes:
- \\wsl$$\Ubuntu\etc\localtime:/etc/localtime:ro
- \\wsl$$\Ubuntu\home\ringofowl\frigate\config:/config/
- \\wsl$$\Ubuntu\home\ringofowl\frigate\clips:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
- YOLO_MODELS=yolov7-320
#- USE_FP16=false
#- FRIGATE_RTSP_PASSWORD: "password"
Relevant log output
2024-02-11 15:52:08 2024-02-11 15:52:08.119554858 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f8148008980] moov atom not found
2024-02-11 15:52:08 2024-02-11 15:52:08.121116775 [ERROR:0@6.599] global cap.cpp:164 open VIDEOIO(CV_IMAGES): raised OpenCV exception:
2024-02-11 15:52:08 2024-02-11 15:52:08.121121075
2024-02-11 15:52:08 2024-02-11 15:52:08.121123775 OpenCV(4.7.0) /io/opencv/modules/videoio/src/cap_images.cpp:267: error: (-215:Assertion failed) number < max_number in function 'icvExtractPattern'
2024-02-11 15:52:08 2024-02-11 15:52:08.121125575
2024-02-11 15:52:08 2024-02-11 15:52:08.121127275
2024-02-11 15:52:08 2024-02-11 15:52:08.172306714 [2024-02-11 15:52:08] frigate.record.maintainer WARNING : Failed to probe corrupt segment /tmp/cache/front-yard-cam@20240211155205-0500.mp4
2024-02-11 15:52:08 2024-02-11 15:52:08.173661928 [2024-02-11 15:52:08] frigate.record.maintainer WARNING : Discarding a corrupt recording segment: /tmp/cache/front-yard-cam@20240211155205-0500.mp4
2024-02-11 15:52:08 2024-02-11 15:52:08.262061159 [INFO] Starting go2rtc healthcheck service...
2024-02-11 15:52:23 2024-02-11 15:52:23.536020982 [2024-02-11 15:52:23] watchdog.front-yard-cam ERROR : Ffmpeg process crashed unexpectedly for front-yard-cam.
2024-02-11 15:52:23 2024-02-11 15:52:23.536026382 [2024-02-11 15:52:23] watchdog.front-yard-cam ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-02-11 15:52:23 2024-02-11 15:52:23.536029182 [2024-02-11 15:52:23] ffmpeg.front-yard-cam.detect ERROR : [h264 @ 0x560e7dc9ea40] Hardware is lacking required capabilities
2024-02-11 15:52:23 2024-02-11 15:52:23.536112483 [2024-02-11 15:52:23] ffmpeg.front-yard-cam.detect ERROR : [h264 @ 0x560e7dc9ea40] Failed setup for format cuda: hwaccel initialisation returned error.
2024-02-11 15:52:23 2024-02-11 15:52:23.536130983 [2024-02-11 15:52:23] ffmpeg.front-yard-cam.detect ERROR : Impossible to convert between the formats supported by the filter 'Parsed_fps_0' and the filter 'auto_scale_0'
2024-02-11 15:52:23 2024-02-11 15:52:23.536133583 [2024-02-11 15:52:23] ffmpeg.front-yard-cam.detect ERROR : Error reinitializing filters!
2024-02-11 15:52:23 2024-02-11 15:52:23.536158383 [2024-02-11 15:52:23] ffmpeg.front-yard-cam.detect ERROR : Failed to inject frame into filter network: Function not implemented
2024-02-11 15:52:23 2024-02-11 15:52:23.536162883 [2024-02-11 15:52:23] ffmpeg.front-yard-cam.detect ERROR : Error while processing the decoded data for stream #0:0
2024-02-11 15:52:25 2024-02-11 15:52:25.217223303 [2024-02-11 15:52:25] frigate.video ERROR : front-yard-cam: Unable to read frames from ffmpeg process.
FFprobe output from your camera
# ffprobe rtsp://bauman-hpenvy.********.ts.net:8556/front-yard-cam
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
[rtsp @ 0x55a802b22140] method SETUP failed: 461 Unsupported Transport
Input #0, rtsp, from 'rtsp://bauman-hpenvy.*******.ts.net:8556/front-yard-cam':
Metadata:
title : No Name
Duration: N/A, start: -0.521711, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709, progressive), 1920x1080, 20 fps, 20 tbr, 90k tbn
#
Operating system
Windows
Install method
Docker Compose
Network connection
Wired
Camera make and model
Wyze Cam Pan v3
Any other information that may be helpful
About this issue
- Original URL
- State: open
- Created 5 months ago
- Comments: 16 (2 by maintainers)
Maybe verify the codec on that stream. Your card can’t decode h265 and may have problems with h264 if its the “high” profile. Is it a wyze camera? There may be something with the input stream that your card cant handle. especially if it works on cpu/software decode. Also i dont know how ffmpeg is compiled with frigate. But you may need a custom ffmpeg install to build it for lower than compute 52. I think the newest nvidia ffmpeg requires compute 5.2. Or the second generation maxwell architecture. Your card is 5.0. Just some rambling thoughts