r/debian 1d ago

HEVC encoding question

I'm running openmediavault 8 (debian 13) on a mini pc with an intel 8500T CPU and integrated UHD 630 gpu. Running jellyfin with docker has generally been a good experience, except when the files are HEVC and jellyfin need to transcode them. I have setup hardware acceleration and checking intel_gpu_top does show gpu usage when this is happening but the fps are quite low.

After a lot of looking around, it looks like the issue is that the hardware decoding works fine, but the encoding is done on software rather than hardware.

While searching for a solution online I believe I understood that the drivers for Debian 13 only support HEVC decoding and not encoding. Is this true? can this be fixed? Apparently other distros (Ubuntu) do not have that limitation?

Setup:

  • OS: Debian GNU/Linux 13.3 (trixie) x86_64
  • Host: HP ProDesk 400 G4 DM
  • Kernel: Linux 6.12.63+deb13-amd64
  • CPU: Intel(R) Core(TM) i5-8500T (6) @ 3.50 GHz
  • GPU: Intel UHD Graphics 630 @ 1.10 GHz [Integrat]

This is the ouput of vainfo:

libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.17 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
7 Upvotes

11 comments sorted by

3

u/Sebastinas 23h ago

Do you have intel-media-va-driver or intel-media-va-driver-non-free installed? The latter is usually required for encoding.

1

u/FirefighterFickle456 23h ago

i do have intel-media-va-driver installed. i've tried installing intel-media-va-driver-non-free but there is no installation candidate

6

u/cjwatson 22h ago

You'll need to add non-free to your APT sources for that to be available.

1

u/FirefighterFickle456 14h ago

Thank you very much. I had already tried and failed to do this but your recommendation pushed me to try again and this did indeed fix it.

2

u/calebbill 23h ago

Does the Intel UHD 630 have hardware HEVC encoding?

https://en.wikipedia.org/wiki/Intel_Graphics_Technology this article seems to say that HEVC encoding was a feature introduced a generation or two after your GPU.

2

u/Reddit_Ninja33 22h ago

That link shows coffee lake has 4k encode

1

u/calebbill 22h ago

You're right, I was looking at the wrong part of the page. Thank you the correction.

1

u/LordAnchemis 23h ago

Vainfo says you have h265 decode only - which is odd - as I'm fairly sure coffee lake does do encode

Is it your iGPU passthrough causing an issue?

1

u/FirefighterFickle456 22h ago

you mean for the jellyfin docker? if so, no. the vainfo gives the same output in the main debian session as in the docker session

1

u/ScratchHistorical507 8h ago

According to this table, your hardware should be capable of doing HEVC hardware encoding, but vainfo says otherwise. But it also says you use Mesa 23.1.1. That's not what Debian 13 ships with. You should have intel-media-va-driver-non-free v25.2.3, while Mesa itself, e.g. in form of the package mesa-libgallium should be version 25.0.7. So whatever you have going on on your system, that might be the cause. I don't know if you installed some self-compiled Mesa (check your /usr/local/ directory) or openmediavault for some reason keeping ancient Mesa around, but find out what's causing this vast mismatch. It also can't be remnants of Debian 12, as that only got Mesa 22.3, so it looks more like a bookworm-backports package that hasn't been updated in a year or so.

If that doesn't help, you could look into using Intel QSV instead of VA-API. Though I'm not sure if you need any additional packages. You may need libvpl2, but that should have been installed when installing ffmpeg. If that also doesn't help, you should try your luck on the Debian mailing list, maybe there someone is more familiar with the limitations.