alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.5k stars 214 forks source link

[Jellyfin] Hardware video acceleration not working properly #537

Closed pojlFDlxCOvZ4Kg8y1l4 closed 1 year ago

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

Hello,

I have hardware acceleration enabled on a Intel J4105 system, running a Intel® UHD Graphics 600 iGPU. Both Intel QuickSync (QSV) and VA-API work properly with X264 decoding (forced lower bitrate than original media file). CPU utilization is lower than without and logs confirm its using the hardware decoders.

So far so good.

The same with different HEVC files (movies, TV show episodes etc.) all show a similar problem, video is either white or pink (depending on if it's a cartoon or not) and it does not show the full picture. Only that which is moving at the current frame.
Changing the bitrate, switching clients (jellyfin media player, chrome, firefox) do not change the weird looking video. Audio is fine no matter what decoding technique is used.

A visual comparison of the same shot:
image
image

Bottom with software transcoding, and how it should look like. Top is with Intel QSV (but also VA API).

What I have tried so far:

Toggling these options

I also have asked in the Jellyfin Discord about this issue. Another user, which uses the linuxserver.io jellyfin docker directly (not as HA add-on) updated to the same version (10.8.7-1-ls186). That user did not report what I'm experiencing, on his system everything is fine with HEVC hardware transcoding.

This leads me to suspecting maybe HA not including the proper drivers for my platform, or the add-on trying to do something it's not expected to. I do not know how to find the smoking gun though.

Transcoding log:

transcode log x265 hw.txt

What other options are available, besides software decoding? Did I miss something?

alexbelgium commented 1 year ago

Hi, I've added the linuxserver mods, please check if it works

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

Thank you for your quick response!

I've updated the add-on, hardware acceleration works and is quick but it still shows the weird colors and missing details:
image

Direct play and software transcoding both look good.

Hardware addition transcode log.txt

Do you need more logs?

alexbelgium commented 1 year ago

Sorry I'm not able to help you then... Perhaps the jellyfin team could help ?

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

I'll open a ticket and refer to this issue :>

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

FYI, the transcoding issue does not occur with VP8, VP9, only HEVC. See the issue I opened at the jellyfin github for video reference.

https://github.com/jellyfin/jellyfin/issues/8683

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

Here I am again, do you happen to know which drivers exactly were added? Nyanmisika mentions the intel-media-va-driver-non-free specifically, is that the package included in the update?
Here's the comment I'm referencing:
https://github.com/jellyfin/jellyfin/issues/8683#issuecomment-1302167515

alexbelgium commented 1 year ago

Hi, here is the one : opencl-intel from https://github.com/linuxserver/docker-mods/tree/jellyfin-opencl-intel

alexbelgium commented 1 year ago

Not sure the non free is available for alpine. I'll try to install another one

alexbelgium commented 1 year ago

Linked to this family of cpu https://github.com/intel/media-driver/issues/930 ?

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

Not sure the non free is available for alpine. I'll try to install another one

This issue suggests that you indeed chose the correct package (intel-media-driver) for Alpine linux.
"Hardware encoding via VAAPI does not work with the i985 (libva-intel-driver) driver and newer GEN hardware. Please also provide iHD (intel-media-driver) within the Docker image. [...] Installing intel-media-driver fixes the problem and vainfo works and ffmpeg transcoding with a vaapi encoder works." https://github.com/linuxserver/docker-tvheadend/issues/178

However, with that issue vainfo does not work at all while it does work now.
It could be what is needed for the J4105 iGPU, but I'm not 100% sure.

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

Linked to this family of cpu intel/media-driver#930 ?

That looks like very similar to the issue I'm experiencing. Not for 100%, but very close.

This issue is interesting, it mentions a version of tvheadend where it did work with Intel iHD and i965/i915. It also mentions that as of Emby version 4.6.* includes a iHD driver with fixes for gemini lake.

alexbelgium commented 1 year ago

I've pushed a new version with the (intel-media-driver), did it work?

alexbelgium commented 1 year ago

Lots of issues described with jellyfin on transcoding... That's why avoid transcoding ! Emby was better in my exp at direct reading

alexbelgium commented 1 year ago

I've pushed again a new version, it is not on alpine...

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

I've pushed a new version with the (intel-media-driver), did it work?

I couldnt download to that version for whatever reason, Home Assistant did not see a new version of the add-on.

Lots of issues described with jellyfin... That's why avoid transcoding ! Emby was much better at direct reading

True, I also want to avoid transcoding. My own devices are capable of x265 direct play, but it's already an achievement if I get friends to even join the jellyfin web UI.. Can't even think of them even setting up the media player correctly lol.
Such a bummer, I picked up this little machine specifically for the transcoding capabilities.

I've pushed again a new version, it is not on alpine...

Installed just fine, but no difference! :<

alexbelgium commented 1 year ago

Hi, please test this new version with ffmpeg removed

alexbelgium commented 1 year ago

I've changed the logic and there is a DOCKER_MOD option to define the type of driver your want

nyanmisaka commented 1 year ago

Linked to this family of cpu intel/media-driver#930 ?

That looks like very similar to the issue I'm experiencing. Not for 100%, but very close.

This issue is interesting, it mentions a version of tvheadend where it did work with Intel iHD and i965/i915. It also mentions that as of Emby version 4.6.* includes a iHD driver with fixes for gemini lake.

This issue was fixed by upstream intel a long time ago, so it is not relevant to this decoder issue.

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

I've changed the logic and there is a DOCKER_MOD option to define the type of driver your want

I've updated the add-on to version 10.8.7-1-ls186-5. I see the DOCKER_MOD option in the "Info" tab but "Configuration" does not reflect the change.

Info tab: DOCKER_MODS: linuxserver/mods:jellyfin-opencl-intel|linuxserver/mods:jellyfin-amd|linuxserver/mods:jellyfin-rffmpeg # Install graphic drivers

Config tab: image

Do I change that setting somewhere else?

Picture is still the same:

image

nyanmisaka commented 1 year ago

I just had a member of our team run the same test with a J5005 (closer to the J4105 spec) and this issue didn't happen to him. You can try updating linux-firmware to see if that helps.

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915 Pull all glk*.bin to /usr/lib/firmware/i915.

alexbelgium commented 1 year ago

@pojlFDlxCOvZ4Kg8y1l4 could you please paste your full log to check that the intel-media-driver is correctly installed? Thanks

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

@pojlFDlxCOvZ4Kg8y1l4 could you please paste your full log to fresh that the intel-media-driver is correctly installed? Thanks

I see the options to change the drivers now, updated to version 10.8.7-1-ls186-6. Without picking an option, hardware transcoding still looks off.
Following logs are without any option picked:

The logs under HA system > Jellyfin NAS logs (the logs from the home assistant web UI) home assisstant jellyfin logs.txt

Jellyfin add-on logs (the logs from the jellyfin web UI) jellyfin add on log.txt

jellyfin web UI logs with this option enabled jellyfin-opencl-intel logs.txt

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

@nyanmisaka I've tried that, but I get a error when copying.
folder /usr/lib/firmware does not exist.
image

alexbelgium commented 1 year ago

Thanks for the details. The log from the HA UI is truncated though: it starts at To support the app dev(s) visit: Jellyfin: https://opencollective.com/jellyfin To support LSIO projects visit: https://www.linuxserver.io/donate/ but normally there should be my banner, and a message if the Intel driver was correctly installed really at top of the log... Thanks very much!

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

I couldnt find the log files with the SAMBA add-on and a google search, and tried to catch all output by copy pasting and pressing refresh. Does this provide you the info you need?

/package/admin/s6-overlay/libexec/preinit: info: read-only root
/package/admin/s6-overlay/libexec/preinit: info: writable /run. Checking for executability.
/package/admin/s6-overlay/libexec/preinit: warning: unable to find /run in /proc/mounts, check that your container manager pre-mounts /proc, and that /run is a tmpfs. The container is likely to crash soon, if /run is (incorrectly) mounted noexec.
[custom-init] No custom services found, skipping...
[mod-init] Attempting to run Docker Modification Logic
[mod-init] Applying linuxserver/mods:jellyfin-opencl-intel files to container
[mod-init] linuxserver/mods:jellyfin-opencl-intel applied to container
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service 00-legacy: starting
s6-rc: info: service 00-legacy successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-aaa_dockerfile_backup.sh
cont-init: info: /etc/cont-init.d/00-aaa_dockerfile_backup.sh exited 0
cont-init: info: running /etc/cont-init.d/00-banner.sh
-----------------------------------------------------------
 Add-on: Jellyfin NAS
 A Free Software Media System that puts you in control of managing and streaming your media.
-----------------------------------------------------------
 Add-on version: 10.8.7-1-ls186-6

----- here is a gap in the logs ----

**** Installing/updating opencl-intel debs and adding clinfo to package install list ****
Selecting previously unselected package intel-igc-core.
(Reading database ... 15021 files and directories currently installed.)
Preparing to unpack .../intel-igc-core_1.0.11702.1_amd64.1.deb ...
Unpacking intel-igc-core (1.0.11702.1) ...
Selecting previously unselected package intel-igc-opencl.
Preparing to unpack .../intel-igc-opencl_1.0.11702.1_amd64.deb ...
Unpacking intel-igc-opencl (1.0.11702.1) ...
Selecting previously unselected package intel-level-zero-gpu.
Preparing to unpack .../intel-level-zero-gpu_1.3.24055_amd64.deb ...
Unpacking intel-level-zero-gpu (1.3.24055) ...
Selecting previously unselected package intel-opencl-icd.
Preparing to unpack .../intel-opencl-icd_22.35.24055_amd64.deb ...
Unpacking intel-opencl-icd (22.35.24055) ...
Selecting previously unselected package libigdgmm12:amd64.
Preparing to unpack .../libigdgmm12_22.1.3_amd64.deb ...
Unpacking libigdgmm12:amd64 (22.1.3) ...
Setting up intel-igc-core (1.0.11702.1) ...
Setting up intel-igc-opencl (1.0.11702.1) ...
Setting up libigdgmm12:amd64 (22.1.3) ...
Setting up intel-level-zero-gpu (1.3.24055) ...
Setting up intel-opencl-icd (22.35.24055) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
s6-rc: info: service init-mod-jellyfin-opencl-intel-add-package successfully started
s6-rc: info: service init-mods-package-install: starting
**** Installing all mod packages ****
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:3 https://repo.jellyfin.org/ubuntu focal InRelease
Get:4 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Fetched 228 kB in 1s (230 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  clinfo
0 upgraded, 1 newly installed, 0 to remove and 24 not upgraded.
Need to get 41.4 kB of archives.
After this operation, 138 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 clinfo amd64 2.2.18.04.06-1 [41.4 kB]
Fetched 41.4 kB in 0s (122 kB/s)
Selecting previously unselected package clinfo.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 15060 files and directories currently installed.)
Preparing to unpack .../clinfo_2.2.18.04.06-1_amd64.deb ...
Unpacking clinfo (2.2.18.04.06-1) ...
Setting up clinfo (2.2.18.04.06-1) ...
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun jellyfin (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
[ls.io-init] done.
s6-rc: info: service 99-ci-service-check successfully started
[23:35:47] [INF] [1] Main: Jellyfin version: 10.8.7
[23:35:47] [INF] [1] Main: Environment Variables: ["[JELLYFIN_CACHE_DIR, /config/addons_config/jellyfin/cache]", "[JELLYFIN_DATA_DIR, /config/addons_config/jellyfin/data]", "[JELLYFIN_CONFIG_DIR, /config/addons_config/jellyfin]", "[JELLYFIN_LOG_DIR, /config/addons_config/jellyfin/log]"]
[23:35:47] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg", "--webdir=/usr/share/jellyfin/web"]
[23:35:47] [INF] [1] Main: Operating system: Linux
[23:35:47] [INF] [1] Main: Architecture: X64
[23:35:47] [INF] [1] Main: 64-Bit Process: True
[23:35:47] [INF] [1] Main: User Interactive: True
[23:35:47] [INF] [1] Main: Processor count: 4
[23:35:47] [INF] [1] Main: Program data path: /config/addons_config/jellyfin/data
[23:35:47] [INF] [1] Main: Web resources path: /usr/share/jellyfin/web
[23:35:47] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
[23:35:48] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /config/addons_config/jellyfin/cache
[23:35:48] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[23:35:48] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN addresses : [10.0.0.0/8,172.16.0.0/12,192.168.0.0/16]
[23:35:48] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions : []
[23:35:48] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using LAN addresses: [10.0.0.0/8,172.16.0.0/12,192.168.0.0/16]
[23:35:48] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using bind addresses: []
[23:35:48] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using bind exclusions: []
[23:35:51] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: TMDb 10.8.7.0
[23:35:51] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: Studio Images 10.8.7.0
[23:35:51] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: OMDb 10.8.7.0
[23:35:51] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: MusicBrainz 10.8.7.0
[23:35:51] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: AudioDB 10.8.7.0
[23:35:51] [INF] [1] Main: Kestrel listening on Any IP4 Address
[23:35:52] [WRN] [1] Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager: No XML encryptor configured. Key {d68a4877-663e-4656-8cce-5fe985613435} may be persisted to storage in unencrypted form.
[23:35:52] [INF] [1] Emby.Server.Implementations.ApplicationHost: Running startup tasks
[23:35:52] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for Extract Chapter Images set to fire at 2022-11-05 02:00:00.000 +01:00, which is 02:24:07.3165239 from now.
[23:35:52] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Found ffmpeg version 5.1.2
[23:35:52] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available decoders: ["libdav1d", "av1", "av1_cuvid", "av1_qsv", "h264", "h264_qsv", "h264_cuvid", "hevc", "hevc_qsv", "hevc_cuvid", "mpeg2video", "mpeg2_qsv", "mpeg2_cuvid", "mpeg4", "mpeg4_cuvid", "msmpeg4", "vc1_qsv", "vc1_cuvid", "vp8", "libvpx", "vp8_cuvid", "vp8_qsv", "vp9", "libvpx-vp9", "vp9_cuvid", "vp9_qsv", "aac", "ac3", "flac", "mp3"]
[23:35:52] INFO: Starting NGinx...
[23:35:52] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available encoders: ["libx264", "h264_amf", "h264_nvenc", "h264_qsv", "h264_v4l2m2m", "h264_vaapi", "libx265", "hevc_amf", "hevc_nvenc", "hevc_qsv", "hevc_vaapi", "mpeg4", "msmpeg4", "libvpx", "libvpx-vp9", "aac", "libfdk_aac", "ac3", "flac", "libmp3lame", "libopus", "libvorbis", "srt"]
[23:35:52] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available filters: ["deinterlace_qsv", "deinterlace_vaapi", "hwupload_cuda", "hwupload_vaapi", "overlay_opencl", "overlay_qsv", "overlay_vaapi", "overlay_cuda", "procamp_vaapi", "scale_cuda", "scale_opencl", "scale_qsv", "scale_vaapi", "tonemap_cuda", "tonemap_opencl", "tonemap_vaapi", "vpp_qsv", "yadif_cuda", "zscale", "alphasrc"]
[23:35:53] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available hwaccel types: ["cuda", "vaapi", "qsv", "drm", "opencl", "vulkan"]
[23:35:53] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: /usr/lib/jellyfin-ffmpeg/ffmpeg
[23:35:53] [INF] [1] Emby.Server.Implementations.ApplicationHost: ServerId: d2c504314ffd4677bc066f7983b3e1ce
[23:35:53] [INF] [1] Emby.Server.Implementations.ApplicationHost: Executed all pre-startup entry points in 0:00:00.1921674
[23:35:53] [INF] [1] Emby.Server.Implementations.ApplicationHost: Core startup complete
[23:35:53] [INF] [10] Emby.Server.Implementations.IO.LibraryMonitor: Watching directory /share/storage/movies
[23:35:53] [INF] [8] Emby.Server.Implementations.IO.LibraryMonitor: Watching directory /share/storage/tv
[23:35:53] [INF] [1] Emby.Server.Implementations.ApplicationHost: Executed all post-startup entry points in 0:00:00.3316955
[23:35:53] [INF] [1] Main: Startup complete 0:00:06.2786277
alexbelgium commented 1 year ago

That's perfect.

cont-init: info: running /etc/cont-init.d/00-aaa_dockerfile_backup.sh
cont-init: info: /etc/cont-init.d/00-aaa_dockerfile_backup.sh exited 0

Shows me that the Intel driver was correctly installed, or that at least there were no error message when installing it. For example on my rpi I've got an error message there saying package not found as the Intel driver only works on x86_x64 and not aarch64

alexbelgium commented 1 year ago

If you want to be 100% sure you can manually reinstall it in portainer with apt-get update && apt-get install -yqq intel-media-va-driver-non-free

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

I installed your portainer addon and could download the full logs that way :>

_addon_db21ed7f_jellyfin_logs.txt

For ease of reading, here are the lines directly related to the intel drivers:

[mod-init] Applying linuxserver/mods:jellyfin-opencl-intel files to container
[mod-init] linuxserver/mods:jellyfin-opencl-intel applied to container
[...]
Setting up intel-level-zero-gpu (1.3.24055) ...
Setting up intel-opencl-icd (22.35.24055) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
s6-rc: info: service init-mod-jellyfin-opencl-intel-add-package successfully started
s6-rc: info: service init-mods-package-install: starting
[...]
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mod-jellyfin-opencl-intel-add-package: starting
**** Installing/updating opencl-intel debs and adding clinfo to package install list ****
Selecting previously unselected package intel-igc-core.
(Reading database ... 15021 files and directories currently installed.)
Preparing to unpack .../intel-igc-core_1.0.11702.1_amd64.1.deb ...
Unpacking intel-igc-core (1.0.11702.1) ...
Selecting previously unselected package intel-igc-opencl.
Preparing to unpack .../intel-igc-opencl_1.0.11702.1_amd64.deb ...
Unpacking intel-igc-opencl (1.0.11702.1) ...
Selecting previously unselected package intel-level-zero-gpu.
Preparing to unpack .../intel-level-zero-gpu_1.3.24055_amd64.deb ...
Unpacking intel-level-zero-gpu (1.3.24055) ...
Selecting previously unselected package intel-opencl-icd.
Preparing to unpack .../intel-opencl-icd_22.35.24055_amd64.deb ...
Unpacking intel-opencl-icd (22.35.24055) ...
Selecting previously unselected package libigdgmm12:amd64.
Preparing to unpack .../libigdgmm12_22.1.3_amd64.deb ...
Unpacking libigdgmm12:amd64 (22.1.3) ...
Setting up intel-igc-core (1.0.11702.1) ...
Setting up intel-igc-opencl (1.0.11702.1) ...
Setting up libigdgmm12:amd64 (22.1.3) ...
Setting up intel-level-zero-gpu (1.3.24055) ...
Setting up intel-opencl-icd (22.35.24055) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
s6-rc: info: service init-mod-jellyfin-opencl-intel-add-package successfully started
s6-rc: info: service init-mods-package-install: starting
nyanmisaka commented 1 year ago

firmwares should be installed on the host, not docker.

alexbelgium commented 1 year ago

Thanks both. Then from the logs it is indeed correctly installed. For the firmware alas the host is not accessible through HA os, it can only be modified through a special ssh access and even though it is not remanent... Here is an addon enabling root ssh access or you can do it manually

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

firmwares should be installed on the host, not docker.

Do I just throw them in that folder and it would work?
/usr/lib/firmware is non existent /lib/firmware also not existent

I didnt know if it would do anything to put the files in there, so I searched for relevant alpine packages and I found this:

Ive tried installing the drivers @alexbelgium mentioned earlier with apk add intel-media-va-driver-non-free but that fails.

A quik Google search led me to this page: https://wiki.alpinelinux.org/wiki/Intel_Video

I've installed mesa-dri-gallium, intel-media-driver and libva-intel-driver

➜  drivers apk add libva-intel-driver mesa-dri-gallium intel-media-driver
(1/15) Installing intel-gmmlib (22.1.3-r0)
(2/15) Installing libxext (1.3.4-r0)
(3/15) Installing libxfixes (6.0.0-r0)
(4/15) Installing libpciaccess (0.16-r0)
(5/15) Installing libdrm (2.4.110-r0)
(6/15) Installing wayland-libs-client (1.20.0-r0)
(7/15) Installing libva (2.14.0-r0)
(8/15) Installing intel-media-driver (22.4.1-r1)
(9/15) Installing libva-intel-driver (2.4.1-r0)
(10/15) Installing mesa (21.3.8-r2)
(11/15) Installing llvm13-libs (13.0.1-r2)
(12/15) Installing fts (1.2.7-r1)
(13/15) Installing libelf (0.186-r0)
(14/15) Installing mesa-glapi (21.3.8-r2)
(15/15) Installing mesa-dri-gallium (21.3.8-r2)
OK: 451 MiB in 202 packages

and rebooted the HA host. Sadly no change in behaviour compared to yesterday.

alexbelgium commented 1 year ago

I was mistaken when saying it was on alpine, it is actually Ubuntu focal ; that's why I put the proposed command with apt-get above. Sorry for the confusion

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

This issue is under investigation at the intel media repo, and has to wait for feedback or a fix from that team.


From: "github-actions[bot]" @.***> Sent: Friday, November 11, 2022 13:02 To: alexbelgium/hassio-addons Cc: pojlFDlxCOvZ4Kg8y1l4; Mention Subject: Re: [alexbelgium/hassio-addons] [Jellyfin] Hardware video acceleration not working properly (Issue #537)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Falexbelgium%2Fhassio-addons%2Fissues%2F537%23issuecomment-1311612687&data=05%7C01%7C%7Cebf1cc110410478acb6508dac3dca47f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638037649655461765%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qvOf2gmIASMZsso03uTs1elXotl29rZYpd2ORD3bCYs%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKFNXMUUUU2X2WAWSGE2RZLWHYYWHANCNFSM6AAAAAARVTEJSU&data=05%7C01%7C%7Cebf1cc110410478acb6508dac3dca47f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638037649655618011%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tmC3xH6U1Xb8RAwqcmvv7VVGNyYKRmSYR6zCyXshTxA%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

Great news, it seems something has changed in a good way!

Big buck bunny works properly in x265 and VP8 hardware decoding, on my mobile phone.

I'll be back after the holidays with some further testing.

Screenshot_2022-12-26-01-09-36-018_com kiwibrowser browser

Screenshot_2022-12-26-01-37-47-466_com kiwibrowser browser

Home Assistant 2022.12.8 Supervisor 2022.11.2 Operating System 9.4 Frontend 20221213.1 - latest

Jellyfin add on version: 10.8.8-1-ls193
opencl-intel enabled

don't know if it works on versions prior to ls193.

pojlFDlxCOvZ4Kg8y1l4 commented 1 year ago

Thank you for being patient.

Sadly, this seems to be a fluke? I've tried it a few times with different files, and hardware transcoding still shows the same behaviour as shown in the purple images.
In a few weeks I've got a new toys to play with, a Lenovo Tiny M720Q with i3-8100T (Intel UHD Graphics 630).

While I do not plan to move my HA instance to that machine, I could try out a HA OS install on the M720Q machine with this add-on installed on it.
I'm also thinking about creating a supervised machine for HA on the J4105 machine, so I can change drivers myself if necessary. From other comments it that seems the gemini lake platform can do HW acceleration properly with the correct drivers. But for now I do not want to deal with that.

Anyways i'll share the results in a few weeks :>

alexbelgium commented 1 year ago

You can run any custom script at startup but putting it in /config/addons_autoscript/jellyfin-nas.sh (or something line that, exact path is shown when starting the addon). It would allow you to install any drivers. An alternative is portainer.