[Config Support]:
See original GitHub issueDescribe the problem you are having
While I am waiting for my Coral USB Device (not easy to get it these days) I wanted to have at least hw acceleration for ffmpeg getting used.
I am running frigate inside proxmox in a LXC Container (PVE 7.1-12)
On the host vainfo shows
error: can’t connect to X server! libva info: VA-API version 1.10.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_10 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.10 (libva 2.10.0) vainfo: Driver version: Intel iHD driver for Intel® Gen Graphics - 21.1.1 () vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSliceLP VAProfileJPEGBaseline : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileVP8Version0_3 : VAEntrypointVLD VAProfileHEVCMain : VAEntrypointVLD VAProfileHEVCMain10 : VAEntrypointVLD VAProfileVP9Profile0 : VAEntrypointVLD VAProfileVP9Profile2 : VAEntrypointVLD
I also see the render device
root@pve:/etc/pve/lxc# ls -lisa /dev/dri total 0 679 0 drwxr-xr-x 3 root root 100 Apr 10 09:35 . 1 0 drwxr-xr-x 23 root root 5320 Apr 18 18:05 … 731 0 drwxr-xr-x 2 root root 80 Apr 10 09:35 by-path 681 0 crw-rw---- 1 root video 226, 0 Apr 10 09:35 card0 680 0 crw-rw---- 1 root render 226, 128 Apr 10 09:35 renderD128
This is the lxc config
arch: amd64 cores: 3 features: keyctl=1,nesting=1 hostname: frigate memory: 8096 mp0: /mnt/fileshare,mp=/fileshare net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=B2:32:5E:76:FA:F6,type=veth ostype: debian rootfs: Thin:vm-123-disk-0,size=8G swap: 8096 lxc.idmap: u 0 100000 1000 lxc.idmap: g 0 100000 1000 lxc.idmap: u 1000 1000 1 lxc.idmap: g 1000 1000 1 lxc.idmap: u 1001 101001 64535 lxc.idmap: g 1001 101001 64535 lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm lxc.cgroup2.devices.allow: c 29:0 rwm lxc.cgroup2.devices.allow: c 189:* rwm lxc.apparmor.profile: unconfined lxc.cgroup2.devices.allow: a lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file 0, 0 lxc.mount.entry: /dev/bus/usb/002 dev/bus/usb/002 none bind,optional,create=dir 0, 0 lxc.cap.drop: lxc.mount.auto: cgroup:rw
…there are some special settings since I am mounting a shared directory from the host …
…and of course there are all the settings which i found in various threads about passing the renderd128 to the lxc container.
Well …inside the container i can not execute vainfo
#root@frigate /# vainfo error: can’t connect to X server! error: failed to initialize display
I notcied that the owner of that render device does not look to good
root@frigate /# ls -lisa /dev/dri/ total 0 3 0 drwxr-xr-x 2 root root 60 Apr 18 18:07 . 1 0 drwxr-xr-x 7 root root 500 Apr 18 18:07 … 680 0 crw-rw---- 1 nobody nogroup 226, 128 Apr 10 09:35 renderD128
…but somehow almost nobody seemed to have the need to do a mapping there …not sure if that should work normally just because it is a privieged container and I am not sure if I need to worry about that nogroup and nobody owner …
when I use the hwaccel in the frigate config
hwaccel_args: - -hwaccel - vaapi - -hwaccel_device - /dev/dri/renderD128 - -hwaccel_output_format - yuv420p
I get those errors
[2022-04-18 16:56:09] ffmpeg.Boden.detect ERROR : [AVHWDeviceContext @ 0x55ab1c36e380] No VA display found for device /dev/dri/renderD128. [2022-04-18 16:56:09] ffmpeg.Boden.detect ERROR : Device creation failed: -22.
…I am also not quite sure about the right parameters here …i am using a dell t40 …E2224 CPU
I guess the error is about the lxc config …
Any Suggestions
Version
0.10.1-83481af
Frigate config file
mqtt:
host: 192.168.178.117
user: frigate
password: xxxxxxx
cameras:
Weg:
ffmpeg:
inputs:
- path: rtsp://admin:cO299792no@192.168.178.67:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
roles:
- rtmp
- detect
record:
enabled: True
Boden:
ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p
inputs:
- path: rtsp://admin:xxxxxxxx@192.168.178.63:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1
roles:
- rtmp
- detect
record:
enabled: True
Relevant log output
2022-04-18 16:55:50] frigate.video ERROR : Boden: Unable to read frames from ffmpeg process.
[2022-04-18 16:55:50] frigate.video ERROR : Boden: ffmpeg process is not running. exiting capture thread...
[2022-04-18 16:55:58] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40770]
[2022-04-18 16:55:59] watchdog.Boden ERROR : Ffmpeg process crashed unexpectedly for Boden.
[2022-04-18 16:55:59] watchdog.Boden ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-04-18 16:55:59] ffmpeg.Boden.detect ERROR : [AVHWDeviceContext @ 0x557ac088d800] No VA display found for device /dev/dri/renderD128.
[2022-04-18 16:55:59] ffmpeg.Boden.detect ERROR : Device creation failed: -22.
[2022-04-18 16:55:59] ffmpeg.Boden.detect ERROR : [h264 @ 0x557ac089c9c0] No device available for decoder: device type vaapi needed for codec h264.
[2022-04-18 16:55:59] ffmpeg.Boden.detect ERROR : Device setup failed for decoder on input stream #0:0 : Invalid argument
[2022-04-18 16:56:00] frigate.video ERROR : Boden: Unable to read frames from ffmpeg process.
[2022-04-18 16:56:00] frigate.video ERROR : Boden: ffmpeg process is not running. exiting capture thread...
[2022-04-18 16:56:09] watchdog.Boden ERROR : Ffmpeg process crashed unexpectedly for Boden.
[2022-04-18 16:56:09] watchdog.Boden ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-04-18 16:56:09] ffmpeg.Boden.detect ERROR : [AVHWDeviceContext @ 0x55ab1c36e380] No VA display found for device /dev/dri/renderD128.
[2022-04-18 16:56:09] ffmpeg.Boden.detect ERROR : Device creation failed: -22.
[2022-04-18 16:56:09] ffmpeg.Boden.detect ERROR : [h264 @ 0x55ab1c0479c0] No device available for decoder: device type vaapi needed for codec h264.
[2022-04-18 16:56:09] ffmpeg.Boden.detect ERROR : Device setup failed for decoder on input stream #0:0 : Invalid argument
[2022-04-18 16:56:10] frigate.video ERROR : Boden: Unable to read frames from ffmpeg process.
[2022-04-18 16:56:10] frigate.video ERROR : Boden: ffmpeg process is not running. exiting capture thread...
[2022-04-18 16:56:19] watchdog.Boden ERROR : Ffmpeg process crashed unexpectedly for Boden.
[2022-04-18 16:56:19] watchdog.Boden ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-04-18 16:56:19] ffmpeg.Boden.detect ERROR : [AVHWDeviceContext @ 0x555643c74f00] No VA display found for device /dev/dri/renderD128.
[2022-04-18 16:56:19] ffmpeg.Boden.detect ERROR : Device creation failed: -22.
Frigate stats
No response
Operating system
Debian
Install method
Docker Compose
Coral version
CPU (no coral)
Any other information that may be helpful
No response
Issue Analytics
- State:
- Created a year ago
- Comments:11
Top GitHub Comments
@Kalougear Sorry, I confused you for OP who is using that. I would recommend creating your own issue and provide the asked for information.
That’s incorrect, it is the same both as it is the standard for Linux.
It can’t find the iGPU, something is keeping it from being seen, most likely in the proxmox config but I am not familiar with it so I don’t know for sure