[solved] Hardware encoding & transcoding does not work anymore with new server version

Server Version#: 1.32.7.7621 on Ubunutu 22.04
I recently updated my server to the latest version and found out by accident that the hardware encoding does not work anymore.

It is enabled in the configuration and I’m very sure that it worked in the past on my server.

Nov 13, 2023 08:51:08.316 [140509989268280] DEBUG - [GPU] Got device: HD Graphics 530, intel@builtin, default true, best true, ID 8086:1912:103c:829a@0000:00:02.0, DevID [8086:1912:103c:829a], flags 0x38a7
35W:~$ vainfo
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()
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
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointFEI

but now I see this:

Nov 07, 2023 08:28:10.257 [140428199086904] DEBUG - [Req#337aac/Transcode] Codecs: testing mpeg2video (decoder) with hwdevice vaapi
Nov 07, 2023 08:28:10.257 [140428199086904] DEBUG - [Req#337aac/Transcode] Codecs: hardware transcoding: testing API vaapi for device '/dev/dri/renderD128' (HD Graphics 530)
Nov 07, 2023 08:28:10.257 [140428199086904] ERROR - [Req#337aac/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Nov 07, 2023 08:28:10.258 [140428199086904] DEBUG - [Req#337aac/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error
Nov 07, 2023 08:28:10.258 [140428199086904] DEBUG - [Req#337aac/Transcode] Could not create hardware context for mpeg2video

As I saw a lot of changes on the feature in the past change logs, I consider my issue a bug being introduced by that.

full log:
Plex Media Server Logs_2023-11-13_08-52-41.zip (7.5 MB)

@chris299

Which kernel & version are you using?

Today I started running down a problem with the HWE / non-HWE kernels.

@ChuckPa it is Ubuntu 22.04.3 LTS (GNU/Linux 6.2.0-36-generic x86_64)

chris@35W:~$ cat /proc/version_signature
Ubuntu 6.2.0-36.37~22.04.1-generic 6.2.16

EDIT: could it be related to my usage of

VaapiDriver="i965"

I was told to do in another topic here…
I still don’t really understand, what this options actually changes. :wink: Is there a documentation on all the Options in Preferences.xml ?

and just for curiosity: is it possible to change, what is actually transcoded and into what target codec for the PLEX app on player devices?
I understand for DLNA there are profiles to do that (but somehow I’m not able to get this to work properly as the profile parameters seem to be ignored in several cases :frowning: )

@chris299

I checked ubuntu yesterday. Ubuntu 22.04.3 with 6.2 kernel is 100% functional.

The ‘VaapiDriver=“i965”’ did only apply to ApolloLake + GeminiLake but this is interesting in that you have a SkyLake.

IF I remember correctly, we made all the changes for all processors (Ivy Bridge → SkyLake + ApolloLake + GeminiLake) to use the i965 interface driver (IVR) instead of the Intel Media Driver (IMD)

You ask about DLNA.

Are you using DLNA as the primary player or are you using Plex apps?
There is VERY VERY little which can be done with DLNA.

As for changing target codecs , the answer is no.

@ChuckPa thank you very much for investigating.

However, I removed the VaapiDriver=“i965” instruction from the preferences.xml and now it works again with hardware transcoding. :slight_smile:

I usually use Plex Apps, only with one older SONY TV I don’t have a Plex App so I have to use DLNA.
As the TV does not play most of my media, especially not the PLEX DVR recorded ones, I am trying to figure out how I can control/change the DLNA Behaviour.
see Help needed to make DLNA profile work for older Sony BRAVIA TV KDL-46HX855
I even think I understood how it should work, but some of my configuration parameters seem to be just ignored…:frowning:

I spent the entire evening to finally arrive at this conclusion as well. I just couldn’t make transcoding work to save my life!! After installing a new docker (in which it worked), I compared the Pref.xml files and remembered a long time ago adding VaapiDriver to make it work. Bit me good, but glad I got it figured it out. I wish I would have found this post 6 hours ago, but my previous searches didn’t find it. I only found this post when posting the solution and it suggested off to the side.

I actually removed both these:
VaapiDriver=“i965” HardwareDevicePath=“”

All is working normal again.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.