Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardware Acceleration - Intel Quicksync Error #10

Open
moonilightshaker opened this issue Mar 14, 2022 · 6 comments
Open

Hardware Acceleration - Intel Quicksync Error #10

moonilightshaker opened this issue Mar 14, 2022 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@moonilightshaker
Copy link

moonilightshaker commented Mar 14, 2022

Hi,
thanks in advance for this helpful project. Especially the Home Assistant integration is useful.
Plate-Minder works without the Hardware Acceleration parameters.
As soon as I use the suggested parameters, I get the following error messages:

Error: Dahua1_east source failed: Device creation failed: -542398533.
[h264_qsv @ 0x5566de18f040] No device available for decoder: device type qsv needed for codec h264_qsv.
Device setup failed for decoder on input stream #0:0 : Generic error in an external library
at RTSPMJPEGReadable. (file:///app/lib/PlateMinder.js:56:20)
at RTSPMJPEGReadable.emit (node:events:390:28)
at ChildProcess. (file:///app/lib/MJPEGReadable.js:81:10)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
Error: Dahua1_east source failed: Device setup failed for decoder on input stream #0:0 : Generic error in an external library
at RTSPMJPEGReadable. (file:///app/lib/PlateMinder.js:56:20)
at RTSPMJPEGReadable.emit (node:events:390:28)
at ChildProcess. (file:///app/lib/MJPEGReadable.js:81:10)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
Error: Dahua1_east source failed: Device setup failed for decoder on input stream #0:0 : Generic error in an external library
at RTSPMJPEGReadable. (file:///app/lib/PlateMinder.js:56:20)
at RTSPMJPEGReadable.emit (node:events:390:28)
at ChildProcess. (file:///app/lib/MJPEGReadable.js:81:10)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)

Parameters:
preInputArgs:
- -hwaccel
- qsv
- -c:v
- h264_qsv
preOutputArgs:
- -c:v
- mjpeg_qsv

OS: Debian 11
Device testet: Intel NUC NUC5CPYH and Intel NUC NUC10i7FNH

@sclaflin
Copy link
Owner

sclaflin commented Mar 15, 2022

You're welcome!

Regarding your issue, it looks like your computer doesn't have support for QuickSync:

[h264_qsv @ 0x5566de18f040] No device available for decoder: device type qsv needed for codec h264_qsv.

@moonilightshaker
Copy link
Author

Hi,
i have on this PCs, Frigate in a Docker Container installed.
The Settings for the are from this Site: https://docs.frigate.video/configuration/hardware_acceleration
This is working. I have conformed this with intel-gpu-top: https://wiki.debian.org/HardwareVideoAcceleration
Intel_old

According to Intel, both supports Quicksync:
https://www.intel.de/content/www/de/de/products/sku/196448/intel-core-i710710u-processor-12m-cache-up-to-4-70-ghz/specifications.html
https://ark.intel.com/content/www/de/de/ark/products/91832/intel-celeron-processor-n3060-2m-cache-up-to-2-48-ghz.html
https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video#Hardware_decoding_and_encoding

I have setuped with this paramters on the NUC5CPYH. This is working.
preInputArgs:
- -hwaccel
- vaapi
- -c:v
- h264
preOutputArgs:
- -c:v
- mjpeg

@sclaflin
Copy link
Owner

Fantastic! I'll see about adding this to the documentation.

@sclaflin sclaflin added the documentation Improvements or additions to documentation label Mar 19, 2022
@moonilightshaker
Copy link
Author

The settings in your documentation work for the NUC NUC10i7FNH. Reinstalled the OS and now it works also.

@KidA001
Copy link
Contributor

KidA001 commented Mar 20, 2023

@sclaflin @moonilightshaker I have a Intel Core i5-6500T 2.5 GHz processor with integrated graphics card. It specifies that it supports quicksync. I have access to renderD128 on this machine but the pre input/output logs generate a similar error for me. Any suggestions on figuring out what parameters might work for my setup?

Error I'm getting:

Error: Driveway source failed: Device creation failed: -542398533.
[h264_qsv @ 0x55777835c280] No device available for decoder: device type qsv needed for codec h264_qsv.
Device setup failed for decoder on input stream #0:2 : Generic error in an external library

@KidA001
Copy link
Contributor

KidA001 commented Mar 20, 2023

I was able to get this running with the below config. Unclear to me if it's working or not, so if there are any suggestions to validate that it's using hardware acceleration please let me know.

I had two issues. I'm using Proxmox to create an LXC that runs docker. I needed that LXC to be Privileged, and in addition to that I had to add the following to the /etc/pve/lxc/<lxc id>.conf file:

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.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file

Then I set my args to the following:

preInputArgs:
  - -hwaccel
  - qsv
  - -qsv_device
  - /dev/dri/renderD128
preOutputArgs:
  - -c:v
  - mjpeg

This seems to be working without errors but I'm not sure how to actually validate whether or not it's taking advantage of hardware acceleration.

Note: If I add the args

- -c:v
- h264_qsv

h264_qsv fails with "Error initializing an internal MFX session: unsupported (-3)". I'm not sure if those args are needed or not. Any input appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants