Fix OCL_ICD_VENDORS path so Intel OpenCL (HDR tonemapping) works#118
Merged
aptalca merged 1 commit intoJun 19, 2026
Merged
Conversation
The service exported OCL_ICD_VENDORS=/app/emby/extra/etc/OpenCL/vendors, which does not exist in the image. The OpenCL ICD loader therefore found no platforms (CL_PLATFORM_NOT_FOUND_KHR / -1001), so ffmpeg could not create an OpenCL device. HDR->SDR tonemapping (vpp_qsv -> opencl -> tonemap_opencl) failed with 'Error reinitializing filters' and Emby fell back to slow software (libx264) transcoding. The actual ICD vendor files ship at /app/emby/etc/OpenCL/vendors (intel.icd / intel_legacy1.icd, referencing libigdrcl.so on LD_LIBRARY_PATH). Pointing OCL_ICD_VENDORS there restores the full hardware tonemapping pipeline. Validated on an Intel iGPU: ffmpeg -init_hw_device opencl went from -1001 to exit 0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
aptalca
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Points
OCL_ICD_VENDORSat/app/emby/etc/OpenCL/vendorsin the Emby service run script (root/etc/s6-overlay/s6-rc.d/svc-emby/run).The service exported
OCL_ICD_VENDORS=/app/emby/extra/etc/OpenCL/vendors, which does not exist in the image. The OpenCL ICD loader therefore found no platforms and ffmpeg failed to create an OpenCL device:(
-1001=CL_PLATFORM_NOT_FOUND_KHR.) As a result, Intel HDR→SDR tonemapping (thevpp_qsv → hwmap(opencl) → tonemap_opencl → hwmap(qsv)filter chain) failed withError reinitializing filters, and Emby fell back to slow software (libx264) transcoding.The actual ICD vendor files ship at
/app/emby/etc/OpenCL/vendors(intel.icd/intel_legacy1.icd), which referencelibigdrcl.so— already resolvable via the service'sLD_LIBRARY_PATH(/app/emby/lib). PointingOCL_ICD_VENDORSat the real directory restores the full hardware tonemapping pipeline.A changelog entry has been added to
readme-vars.yml.Benefits of this PR and context:
Restores hardware HDR tonemapping on Intel GPUs (QuickSync + OpenCL). Without this, any HDR→SDR transcode silently drops to software encoding, which is dramatically slower (observed ~3–4x vs ~12x on the same Arc A380). The official
emby/embyserverimage sets this env correctly, so this brings the LSIO image in line.How Has This Been Tested?
On a real Intel iGPU, ran ffmpeg's OpenCL device init inside the
lscr.io/linuxserver/emby:betacontainer with the service's exact env, before and after the change:OCL_ICD_VENDORS=/app/emby/extra/etc/OpenCL/vendors):Failed to get number of OpenCL platforms: -1001, exit 1.OCL_ICD_VENDORS=/app/emby/etc/OpenCL/vendors): OpenCL device created, exit 0.This matches real-world transcode logs where the LSIO image fell back to software while the official image completed the QSV+OpenCL tonemap pipeline.
Source / References:
N/A