Jellyfin Forum
SOLVED: Hardware transcoding - Failed to get number of OpenCL platforms: -1001 - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Hardware transcoding - Failed to get number of OpenCL platforms: -1001 (/t-solved-hardware-transcoding-failed-to-get-number-of-opencl-platforms-1001)



Hardware transcoding - Failed to get number of OpenCL platforms: -1001 - asktoomuch - 2025-03-31

Hello!

I'm struggling to enable hardware transcoding on my Jellyfin instance, I hope you can help me.

I'm following the guide here (https://jellyfin.org/docs/general/administration/hardware-acceleration/intel#configure-on-linux-host) and I am encountering an error when checking the OpenCL runtime status:

Code:
~$ sudo /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD129 -init_hw_device opencl@va
ffmpeg version 7.0.2-Jellyfin Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.3.0-6ubuntu2~24.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      59.  8.100 / 59.  8.100
  libavcodec    61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample  5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
[AVHWDeviceContext @ 0x59dc07380740] libva: VA-API version 1.22.0
[AVHWDeviceContext @ 0x59dc07380740] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x59dc07380740] libva: Found init function __vaDriverInit_1_22
[AVHWDeviceContext @ 0x59dc07380740] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x59dc07380740] Initialised VAAPI connection: version 1.22
[AVHWDeviceContext @ 0x59dc07380740] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 25.1.0 (aa5ca48).
[AVHWDeviceContext @ 0x59dc07380740] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x59dc073b5640] Failed to get number of OpenCL platforms: -1001.
Device creation failed: -19.
Failed to set value 'opencl@va' for option 'init_hw_device': No such device
Error parsing global options: No such device


Here is some information about my setup:
  • Host machine: Intel Skull Canyon NUC (NUC6i7KYK)
  • Host OS: VMware ESXi-8.0U3d
  • Host GPU: Intel Iris Pro 580 (Skylake iGPU)
  • Guest VM: Ubuntu 24.10 (Oracular Oriole)
  • Kernel version: 6.11.0-21-generic
  • Jellyfin: 10.10.6
  • Installation method: APT repository (no Docker)

Jellyfin and jellyfin-ffmpeg7 are installed:

Code:
~$ sudo apt list --installed jellyfin*
jellyfin-ffmpeg7/now 7.0.2-9-noble amd64 [installed,local]
jellyfin-server/now 10.10.6+ubu2404 amd64 [installed,local]
jellyfin-web/now 10.10.6+ubu2404 all [installed,local]
jellyfin/now 10.10.6+ubu2404 all [installed,local]

The iGPU is exposed to the guest VM (see last entry below):

Code:
~$ lspci
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:07.7 System peripheral: VMware Virtual Machine Communication Interface (rev 10)
00:0f.0 VGA compatible controller: VMware SVGA II Adapter
02:00.0 Serial Attached SCSI controller: VMware PVSCSI SCSI Controller (rev 02)
02:01.0 USB controller: VMware USB1.1 UHCI Controller
02:02.0 Ethernet controller: VMware VMXNET3 Ethernet Controller (rev 01)
02:03.0 USB controller: VMware USB2 EHCI Controller
02:04.0 SATA controller: VMware SATA AHCI controller
02:05.0 VGA compatible controller: Intel Corporation Iris Pro Graphics 580 (rev 09)

The render device is visible (renderD129):

Code:
~$ ls -l /dev/dri
total 0
drwxr-xr-x 2 root root        120 Mar 31 18:26 by-path
crw-rw---- 1 root video  226,  0 Mar 31 18:26 card0
crw-rw---- 1 root video  226,  1 Mar 31 18:26 card1
crw-rw---- 1 root render 226, 128 Mar 31 18:26 renderD128
crw-rw---- 1 root render 226, 129 Mar 31 18:26 renderD129

I have added the Jellyfin user to the render group:

Code:
~$ sudo groups jellyfin
jellyfin : jellyfin video render

I have installed the lastest openCL drivers from Intel (https://dgpu-docs.intel.com/driver/client/overview.html#installing-client-gpus-on-ubuntu-desktop-24-10)

Code:
$ sudo apt policy intel-opencl-icd
intel-opencl-icd:
  Installed: 25.09.32961.7
  Candidate: 25.09.32961.7
  Version table:
*** 25.09.32961.7 100
        100 /var/lib/dpkg/status
    25.05.32567.18-1~24.10~ppa1 500
        500 https://ppa.launchpadcontent.net/kobuk-team/intel-graphics/ubuntu oracular/main amd64 Packages
    24.35.30872.24-1 500
        500 http://ch.archive.ubuntu.com/ubuntu oracular/universe amd64 Packages

I have verified that the Iris Pro 580 iGPU supports both VA-API and QSV:

Code:
$ sudo /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD129
Trying display: drm
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 25.1.0 (aa5ca48)
vainfo: Supported profile and entrypoints
      VAProfileNone                  : VAEntrypointVideoProc
      VAProfileNone                  : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264Main              : VAEntrypointVLD
      VAProfileH264Main              : VAEntrypointEncSlice
      VAProfileH264Main              : VAEntrypointFEI
      VAProfileH264Main              : VAEntrypointEncSliceLP
      VAProfileH264High              : VAEntrypointVLD
      VAProfileH264High              : VAEntrypointEncSlice
      VAProfileH264High              : VAEntrypointFEI
      VAProfileH264High              : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline          : VAEntrypointVLD
      VAProfileJPEGBaseline          : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain              : VAEntrypointVLD
      VAProfileHEVCMain              : VAEntrypointEncSlice
      VAProfileHEVCMain              : VAEntrypointFEI


But as mentioned above, when I try to verify the setup running the ffmpeg command from the wiki, I get this error:

Quote:"Failed to get number of OpenCL platforms: -1001.
Device creation failed: -19.
Failed to set value 'opencl@va' for option 'init_hw_device': No such device"

I am not 100% sure it is loading the correct driver, as the command mention "VAAPI driver: Intel iHD driver for Intel® Gen Graphics - 25.1.0 (aa5ca4Nerd-face.", when I am supposed to have v25.09 installed according the "intel-opencl-icd" package version, but maybe these versions don't refer to the same thing.

Do you know how I can troubleshoot further? Whenever I try to enable hardware transcoding, either QSV or VA-API, and launch a stream with transcoding, Jellyfin just returns an error.

I'm happy to provide more information if you need it.

Thanks for your help!


RE: Hardware transcoding - Failed to get number of OpenCL platforms: -1001 - TheDreadPirate - 2025-03-31

One, you need to stick with version 24.35 as that is the last version of the intel opencl package that supports your CPU.

https://github.com/intel/compute-runtime/releases/tag/24.35.30872.22

Second, don't bother. Your CPU does not support HEVC 10-bit decoding, which is required for tone mapping. Since you can't tone map there is no reason to worry about the opencl package since tone mapping is the only function that requires opencl.


RE: Hardware transcoding - Failed to get number of OpenCL platforms: -1001 - asktoomuch - 2025-03-31

Oh, that's good to know, thank you. I'll try to downgrade the package to 24.35, see if that makes a difference.

Thank you also for explaining about opencl support and my CPU, that's a disappointment, but not a huge surprise given its age. Am I to understand that hardware transcoding as a whole is a no-go for me? Or is it just that I don't need the opencl package and will need to disable tone mapping in the hardware transcoding configuration in Jellyfin, but otherwise can still benefit from some hardware acceleration?

As you no doubt realize, I am no transcoding expert and I don't know whether you can have video decoding and/or encoding without tone mapping. I'm just trying to understand if going through the work of enable some GPU acceleration can help my machine deal with multiple transcoding streams.

Thanks again!


RE: Hardware transcoding - Failed to get number of OpenCL platforms: -1001 - TheDreadPirate - 2025-03-31

You can hardware transcode, but you will end up CPU DEcoding a lot of newer content. So there will be more CPU usage than if you could hardware decode. But the heaviest load, the encoding portion, is still occurring on the GPU.

At the top of the transcoding dashboard is a list of codecs. These tell Jellyfin what codecs to use the GPU for DEcoding.

https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video#Hardware_decoding_and_encoding

Use this table to check the correct boxes. You'll be using the Skylake column.


RE: Hardware transcoding - Failed to get number of OpenCL platforms: -1001 - asktoomuch - 2025-04-24

After some more tinkering and searching online, I found the root cause of the problem.

The reason that the vainfo command (sudo /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD129) was failing was because the iGPU couldn't be accessed by the ESXi Ubuntu VM. I had to add a special parameters in the advanced configuration of the VM to be able to use the iGPU:

Code:
hypervisor.cpuid.v0 = FALSE

I found this suggestion in comment online on this blog (different hardware but some problem): https://williamlam.com/2021/07/passthrough-of-intel-iris-xe-integrated-gpu-on-11th-gen-nuc-results-in-error-code-43.html

It was misleading because the iGPU device was visible in Linux but not reporting any problem, until you tried to use it in Jellyfin that is.

After adding this parameter and rebooting the VM, the command now succeeds and I can use the iGPU.

Code:
$ sudo /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD129 -init_hw_device opencl@va
ffmpeg version 7.1.1-Jellyfin Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.3.0-6ubuntu2~24.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      59. 39.100 / 59. 39.100
  libavcodec    61. 19.101 / 61. 19.101
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample  5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
[AVHWDeviceContext @ 0x61650bee1740] libva: VA-API version 1.22.0
[AVHWDeviceContext @ 0x61650bee1740] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x61650bee1740] libva: Found init function __vaDriverInit_1_22
[AVHWDeviceContext @ 0x61650bee1740] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x61650bee1740] Initialised VAAPI connection: version 1.22
[AVHWDeviceContext @ 0x61650bee1740] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 25.2.0 (114dd54).
[AVHWDeviceContext @ 0x61650bee1740] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x61650bf17100] 0.0: Intel(R) OpenCL Graphics / Intel(R) Iris(R) Pro Graphics 580
[AVHWDeviceContext @ 0x61650bf17100] Intel QSV to OpenCL mapping function found (clCreateFromVA_APIMediaSurfaceINTEL).
[AVHWDeviceContext @ 0x61650bf17100] Intel QSV in OpenCL acquire function found (clEnqueueAcquireVA_APIMediaSurfacesINTEL).
[AVHWDeviceContext @ 0x61650bf17100] Intel QSV in OpenCL release function found (clEnqueueReleaseVA_APIMediaSurfacesINTEL).
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

I verified with intel_gpu_top and I can see some activity when it's transcoding, so that's perfect.

Thank you for the Wikipedia link to the codecs supported by my platform, that was also super helpful.

I hope that documenting the solution here will help people looking for an answer to the same problem.