frigate: [HW Accel Support]: greenscreen when hwaccel enabled - libva init failed
Describe the problem you are having
Config works fine if I comment out the hwaccel args line. Enabling it gives me green screen on both camera feeds. Have tried adding “-e LIBVA_DRIVER_NAME=i965” to the docker run also, didnt fix the issue.
Re: the ffprobe output below, I ran the command from inside the frigate docker - gives me the same input/output error regardless of camera feeds working or not - perhaps i’m doing something wrong there?
Any ideas much appreciated! I wouldn’t usually be so quick to open an issue on this only for it mentions to do so in the release notes for hwaccel issues…
Version
0.11.0-C461C9E
Frigate config file
mqtt:
host: 10.0.1.5
database:
path: /config/db/frigate.db
detectors:
coral:
type: edgetpu
device: usb
birdseye:
enabled: False
ffmpeg:
# hwaccel_args: -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -flags low_delay -strict experimental -analyzeduration 1000M -probesize 1000M -rw_timeout 5000000
output_args:
detect: -f rawvideo -pix_fmt yuv420p -filter:v fps=fps=5
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:a copy -c:v copy
detect:
width: 2304
height: 1296
fps: 5
objects:
track:
- person
- car
- cat
- dog
record:
enabled: True
retain:
days: 14
mode: active_objects
events:
retain:
default: 14
mode: active_objects
snapshots:
enabled: True
timestamp: False
bounding_box: True
crop: False
retain:
default: 30
rtmp:
enabled: True
live:
quality: 18
cameras:
camera1:
ffmpeg:
inputs:
- path: rtmp://10.0.1.20/bcs/channel0_main.bcs?channel=0&stream=0&user=*****&password=********
roles:
- record
- rtmp
- detect
camera2:
ffmpeg:
inputs:
- path: rtmp://10.0.1.21/bcs/channel0_main.bcs?channel=0&stream=0&user=*****&password=******
roles:
- record
- rtmp
- detect
docker-compose file or Docker CLI command
sudo docker run -d \
--name frigate \
--restart=unless-stopped \
--mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \
--device /dev/dri/renderD128 \
--device /dev/bus/usb/002:/dev/bus/usb/002 \
--shm-size=128m \
-v /mnt/camera/:/media/frigate/ \
-v /home/frankie/frigate/config/:/config/ \
-v /etc/localtime:/etc/localtime:ro \
-e FRIGATE_RTSP_PASSWORD='******' \
-p 5000:5000 \
-p 1935:1935 \
blakeblackshear/frigate:0.11.0-rc2
Relevant log output
[2022-08-31 14:32:54] frigate.app INFO : Starting Frigate (0.11.0-c461c9e)
Starting migrations
[2022-08-31 14:32:54] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2022-08-31 14:32:54] peewee_migrate INFO : There is nothing to migrate
[2022-08-31 14:32:54] detector.coral INFO : Starting detection process: 226
[2022-08-31 14:32:54] frigate.edgetpu INFO : Attempting to load TPU as usb
[2022-08-31 14:32:54] frigate.app INFO : Output process started: 228
[2022-08-31 14:32:54] frigate.app INFO : Camera processor started for camera1: 231
[2022-08-31 14:32:54] frigate.app INFO : Camera processor started for camera2: 236
[2022-08-31 14:32:54] ws4py INFO : Using epoll
[2022-08-31 14:32:54] frigate.app INFO : Capture process started for camera1: 238
[2022-08-31 14:32:54] frigate.app INFO : Capture process started for camera2: 239
[2022-08-31 14:32:57] frigate.video ERROR : camera1: Unable to read frames from ffmpeg process.
[2022-08-31 14:32:55] ws4py INFO : Using epoll
[2022-08-31 14:32:57] frigate.video ERROR : camera1: ffmpeg process is not running. exiting capture thread...
[2022-08-31 14:32:57] frigate.edgetpu INFO : TPU found
[2022-08-31 14:32:58] frigate.video ERROR : camera2: Unable to read frames from ffmpeg process.
[2022-08-31 14:32:58] frigate.video ERROR : camera2: ffmpeg process is not running. exiting capture thread...
[2022-08-31 14:33:14] watchdog.camera1 ERROR : Ffmpeg process crashed unexpectedly for camera1.
[2022-08-31 14:33:14] watchdog.camera1 ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-08-31 14:33:14] ffmpeg.camera1.detect ERROR : [AVHWDeviceContext @ 0x556f69583040] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
[2022-08-31 14:33:14] ffmpeg.camera1.detect ERROR : [AVHWFramesContext @ 0x556f6963ab80] Failed to read image from surface 0x4000013: 20 (the requested function is not implemented).
[2022-08-31 14:33:14] ffmpeg.camera1.detect ERROR : [h264 @ 0x556f695c7c40] Failed to transfer data to output frame: -5.
[2022-08-31 14:33:14] ffmpeg.camera1.detect ERROR : Error while processing the decoded data for stream #0:0
[2022-08-31 14:33:14] watchdog.camera2 ERROR : Ffmpeg process crashed unexpectedly for camera2.
[2022-08-31 14:33:14] watchdog.camera2 ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-08-31 14:33:14] ffmpeg.camera2.detect ERROR : [AVHWDeviceContext @ 0x558ab5264040] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
[2022-08-31 14:33:14] ffmpeg.camera2.detect ERROR : [AVHWFramesContext @ 0x558ab52a9100] Failed to read image from surface 0x4000013: 20 (the requested function is not implemented).
[2022-08-31 14:33:14] ffmpeg.camera2.detect ERROR : [h264 @ 0x558ab52e0780] Failed to transfer data to output frame: -5.
[2022-08-31 14:33:14] ffmpeg.camera2.detect ERROR : Error while processing the decoded data for stream #0:0
FFprobe output from your camera
root@0718e8585331:/opt/frigate# 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
rtmp://10.0.1.21/bcs/channel0_main.bcs?channel=0: Input/output error
[1] Done ffprobe rtmp://10.0.1.21/bcs/channel0_main.bcs?channel=0
[2]- Done stream=0
[3]+ Done user=*****
root@0718e8585331:/opt/frigate#
Operating system
Other Linux
Install method
Docker CLI
Network connection
Wired
Camera make and model
Reolink RCL-520/RLC-520A
Any other information that may be helpful
Minix Neo Z83-4 mini PC(Intel X5-Z8350 processor) running Ubuntu 20.04.4 Previously was running beta5 without issues after it was suggested to move from stable while troubleshooting reolink cams.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 44
Yes