Hi,
I want to use the plugin hardware-transcode-vaapi to support the hardware encoding. After installation the encoding failed because the package mesa-va-drivers is missing in the Docker image. Can you add please ?
FYI I added manualy this package in the container and it’s ok now, ffmpeg use the vaap device : /usr/bin/ffmpeg -vaapi_device /dev/dri/renderD128 …
Error: ffmpeg exited with code 1: Device creation failed: -22.
Failed to set value ‹ /dev/dri/renderD128 › for option ‹ vaapi_device ›: Invalid argument
Error parsing global options: Invalid argument
any idea how to correct this? i do not think this argument is in use anymore.
i think that plugin is broken now? it’s erroring out for me. it’s using an old argument that is no longer in use.
my github account isn’t functional right now, or i’d fork it and submit the fix. i think it just needs to change vaapi_device to hwaccel_device.
or vaapi may have new functionality to it that we may not need that at all:
vaapi
device is either an X11 display name, a DRM render node or a DirectX adapter index. If not specified, it will attempt to open the default X11 display ($DISPLAY) and then the first DRM render node (/dev/dri/renderD128), or the default DirectX adapter on Windows.
The following options are recognized:
kernel_driver
When device is not specified, use this option to specify the name of the kernel driver associated with the desired device. This option is available only when the hardware acceleration method drm and vaapi are enabled.
vendor_id
When device and kernel_driver are not specified, use this option to specify the vendor id associated with the desired device. This option is available only when the hardware acceleration method drm and vaapi are enabled and kernel_driver is not specified.
Examples:
-init_hw_device vaapi
Create a vaapi device on the default device.
-init_hw_device vaapi:/dev/dri/renderD129
Create a vaapi device on DRM render node /dev/dri/renderD129.
-init_hw_device vaapi:1
Create a vaapi device on DirectX adapter 1.
-init_hw_device vaapi:,kernel_driver=i915
Create a vaapi device on a device associated with kernel driver ‘i915’.
-init_hw_device vaapi:,vendor_id=0x8086
Create a vaapi device on a device associated with vendor id ‘0x8086’.
I just try my image and it works. Are you sure that your GPU support vaapi ? Maybe I should add a driver in my image to support Intel hardware ? I switched to an AMD GPU which works better than Intel GPU (AMD Radeon 780M Graphics [Integrated]) and works on Linux out of the box.
Oh and does your Docker works on privilegied mode ? Peertube in Docker need an access to /dev/dri/renderD128 on the host.
I just rebuilded and pushed my image with these 2 packages : vainfo intel-media-va-driver
Can you retry ?
You can now enter in you docker container and show some infos with this command : vainfo
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
error: can’t connect to X server!
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_17
amdgpu: unknown (family_id, chip_external_rev): (152, 65)
libva error: /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so init failed
libva info: va_openDriver() returns 2
vaInitialize failed with error code 2 (resource allocation failed),exit
so is this a permission issue? why would Owncast have permission but Peertube not?
It depend, because the docker image must launch in privilegied mode to access to the host’s hardware. I don’t know about K8S, K3S, and sort of things, but with Nomad I need to add allow_privileged = true in the Nomad settings and in the image’s HCL :