There have been several conversations over the years, and it seems the solution to enabling HW acc’l is specific to the GPU and that iGPU’s are particularly difficult. I’ve also not seen anyone provide convincing benchmarks to demonstrate a quantitative improvement for their efforts after proclaiming, ‘It works now.’ This thread is intended to cover only Jasper Lake iGPU and to provide a quantitative result. In reviewing the source materials, it seems the approach is the same for Elkhart Lake iGPUs but I cannot confirm.
Some system details:
TrueNAS SCALE 24.10.1 (Electric Eel)
CW-N5105-NAS motherboard with Intel N5105 CPU, 64GB of non-ECC RAM.
Running the ix-Jellyfin community app v1.1.16
For now, I’m not entirely sure I’ve done everything correctly but I can at least demonstrate a >2x improvement in frame rate when transcoding a 4K HEVC Dolby Vision Profile 8.1 (HDR10) video with AAC 5.1 audio to a 4K H264/AAC 2.1 output in a browser. (Disclaimer: This is just a stress test. Best practice is, of course, to convert all videos into a format that will direct play on clients without relying on transcoding. I personally go for H264/AAC still to support some older clients in use, otherwise I’d go H265/AAC - but I welcome any corrections on the best codecs for a mixed ecosystem of new and old window, linux, android, and iOS clients)
I can post a guide on how to replicate this setup, but first I’m curious if this is the level of performance that others have been seeing. I was hoping for much more reliance on the otherwise unused iGPU.
I’m curious if this is the level of performance that others have been seeing.
No. I see significantly higher than that, but it’d help knowing your hardware configuration and transcoding settings. A shared common public-domain video clip for testing purposes would also be most helpful as performance could vary between videos even with similar profiles.
Can you share the transcoding logs from the runs? They also can be helpful for figuring out what may be misconfigured or not being utilized.
My N5105 is running under Proxmox though, not TrueNAS Scale. My Scale server that I usually run Jellyfin under has has an i5-13600K, so not exactly a fair comparison.
That being said, depending on which options I have set with my N5105, I’m able to get 50-90fps transcoding a HEVC Main 10 HDR10 video to H264. Lower fps was when I forced a max bandwidth of 40mbit/sec. Higher fps was at a max bandwidth of 8mbit/sec. Original source video is 3840 * 2160. I’d have to dig around to see if I have a video that specifically Dolby Vision 8.1.
I noticed in your QSV screen shot, the container’s CPU usage is 101%, just 3% lower than CPU-only using 104%. I have a feeling that it’s still doing the majority of work with the CPU and has offloaded just a bit to the GPU.
Running Jellyfin as a container under proxmox with my N5105, I was utilizing 60-75% of the CPU with 2 cores configured. I’m not familiar right off hand to say if the proxmox cpu utilization is comparable to TrueNAS’s. However my i5-13600K with Truenas shows 4% when transcoding the same video with similar force transcoding settings.
Also just to note, my Truenas Jellyfin app idles around 900MB of memory, but jumps to 2.2GB when I was testing transcoded streams. Yours shows 1.28-1.66GB. How much memory does your system have, and how much is available? Any chance the jellyfin container is memory starved? Or busy doing other tasks?
I’m happy to hear you’re having better performance! Great idea to standardize the test video. Looks like there the Kodi wiki has us covered. I’ll use this one: HDR 10-bit HEVC 59.94fps (in MP4, Camp by Sony)
My ix-Jellyfin docker resource allocation. System has 64GB of non-ECC RAM
Also, I can confirm that nothing else was hitting the CPU during the screenshots above. When I stopped transcoding, CPU usage dropped to low single digits.
Here’s the result with QSV enabled using the reference video file.
Enable hardware HEVC decoding. This should bump up your frame rate considerably, but probably won’t get you past 60fps for smooth transcoded playback.
Enable HEVC hardware encoding. Firefox doesn’t support HEVC out of the box. Support is experimental and requires a config option set. Even then, it doesn’t support 10bit or HDR video AFAIK.
Switch to Chrome or Edge to direct stream the content.
Ah, I was under the impression that Jasper Lake did not support HEVC 10-bit decoding, but it’s only the encoding that it doesn’t support. Turning that on really improved performance. Thank you for the help! I’m going to update the OP with these results and start working on the guide.
Jasper lake supports HEVC encoding, even at 10 bit. It doesn’t support AV1. Only Arc and Core Ultra CPUs support AV1 hardware encoding from Intel’s lineup.
It’s Firefox that’s the limiting factor with your original test as it barely has HEVC support (mainly due to parents/licensing costs) and lacks support for 10+ but content and HDR. It does support AV1, but that’s not an accelerated option with the N5105.
Here’s what I was able to get using h264 and HEVC encoding and Chrome. Videos are just samples from Jellyfin test video collect. The videos are all the “same”, just different resolutions, bitrates, and encodings, as well as all 60fps. Bandwidth was capped at 80mbit to prevent direct streaming and to force transcoding.
The 8k 10bit video I could almost get to play at 60fps if I dropped the max bandwidth down to 8mbit, which dropped the resolution down to I believe 1920x1080. Going from 8k 10-bit video down to FHD at (almost) 60fps is still pretty impressive for a 4 year old 10-watt CPU. That being said, I still direct stream as much as I can.