Hardware transcoding not working in docker

I just installed PMS on the host. Hardware transcoding still fails.

PlexMediaServer install: PlexMediaServer-1.30.1.6497-5fc2e0894 - Installation starting.
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
PlexMediaServer install:   Installation Type:   New
PlexMediaServer install:   Process Control:     systemd
PlexMediaServer install:   Plex User:           plex
PlexMediaServer install:   Plex Group:          plex
PlexMediaServer install:   Video Group:         render
PlexMediaServer install:   Metadata Dir:        /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install:   Temp Directory:      /tmp
PlexMediaServer install:   Lang Encoding:       en_US.UTF-8
PlexMediaServer install:   Processor:           Intel(R) Celeron(R) N5095 @ 2.00GHz
PlexMediaServer install:   Intel i915 Hardware: Found
PlexMediaServer install:   Nvidia GPU card:     Not Found
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.

@ChuckPa

I’m here.

That looks good.

Show me /tmp/plexinstaller.log please (wrapped in </> code markers)

# Plex Media Server installation configuration info:  Fri Jan  6 03:31:55 PM EST 2023
Init=0
Systemd=1
Custom=0
LinuxContainer=0
NewInstall=1
HaveOverride=0
OverrideFile=""
PlexUser="plex"
PlexGroup="plex"
VideoGroup="render"
AppSuppDir="/var/lib/plexmediaserver/Library/Application Support"
PlexTempDir="/tmp"
LangEncoding="en_US.UTF-8"
ExistingVersion=0
DistroName="ubuntu"
DistroVersion="2204"
HaveHardware=1
HaveTranscoderPref=0
NeedUser=1
NeedGroup=1
NeedVideo=1
Verbose=1
Running=0
Errors=0
Warnings=0
Havei915=1
HaveNvidia=0
Platform="MINI S"
Processor="Intel(R) Celeron(R) N5095 @ 2.00GHz"
Distro="Ubuntu 22.04.1 LTS"
Kernel="Linux patcave 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux"
Memory="7729 1173 472"

excellent.

now cross confirm.

groups plex

Compare that to the GID which owns /dev/dri/renderD128

groups plex
plex : plex video render

ll /dev/dri
total 0
drwxr-xr-x   3 root root        100 Jan  5 15:20 ./
drwxr-xr-x  20 root root       4760 Jan  6 15:32 ../
drwxr-xr-x   2 root root         80 Jan  6 15:32 by-path/
crw-rw----+  1 root render 226,   0 Jan  6 15:32 card0
crw-rw----+  1 root render 226, 128 Jan  6 15:32 renderD128

Do you have a small library section (maybe some home / test videos) you can verify HW transcoding works?

If so,

Settings - Server - Transcoder - Show Advanced.

Make certain all the transcoder options are enabled (I’ve see that mess up for some)
SAVE if you make changes.

Now try HW transcode.

I am connected to his NUC over ssh. Can I verify those settings on the console?

SSH Tunnel to it.

On your machine:

  1. ssh -L 8888:127.0.0.1:32400 ip.addr.of.remote
  2. Log in and let sit idle
  3. Return to the local host
  4. Open a browser tab to http://127.0.0.1:8888/web

It’ll run through the tunnel.

This is my friend’s Plex server not mine. Doing that asks me to authenticate to Plex for MY server.

Are these settings stored in a config file on the host?

Preferences.xml stores the server ownership info

I am looking at my NUC that works and I see this

DEBUG - [Req#14529/Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
DEBUG - [Req#14529/Transcode] TPU: hardware transcoding: final decoder: , final encoder:
DEBUG - [Req#146f5/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#146f5/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#146f5/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#146f5/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#146f5/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#146f5/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#146f5/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#14708/Transcode] TPU: hardware transcoding: using hardware decode accelerator vaapi
DEBUG - [Req#14708/Transcode] TPU: hardware transcoding: zero-copy support present
DEBUG - [Req#14708/Transcode] TPU: hardware transcoding: using zero-copy transcoding
DEBUG - [Req#14708/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#14708/Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi

Then I look at my friend’s NUC and I see this

DEBUG - [Req#51/Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
DEBUG - [Req#51/Transcode] TPU: hardware transcoding: final decoder: , final encoder:
ERROR - [Req#59/Transcode/fyg3adg13zyifoy47ngrsqep/c52e6e15-36c2-4996-aa65-fc6377307e39] [h264 @ 0x7f5d5c6c8100] missing picture in access unit with size 10
ERROR - [Req#5a/Transcode/fyg3adg13zyifoy47ngrsqep/c52e6e15-36c2-4996-aa65-fc6377307e39] [h264 @ 0x7f5d5c6c8100] no frame!
DEBUG - [Req#108/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#108/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#108/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#108/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#108/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#12f/Transcode] TPU: hardware transcoding: using hardware decode accelerator vaapi
DEBUG - [Req#12f/Transcode] TPU: hardware transcoding: zero-copy support present
DEBUG - [Req#12f/Transcode] TPU: hardware transcoding: using zero-copy transcoding
DEBUG - [Req#12f/Transcode] Codecs: hardware transcoding: testing API vaapi
DEBUG - [Req#12f/Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
ERROR - [Req#137/Transcode/8aby2vhjyli18raax0cy3zm2/bbd80329-d7b5-4c42-b33e-1a4cc964b6dd] [h264 @ 0x7fa58e82e040] missing picture in access unit with size 10
ERROR - [Req#138/Transcode/8aby2vhjyli18raax0cy3zm2/bbd80329-d7b5-4c42-b33e-1a4cc964b6dd] [h264 @ 0x7fa58e82e040] no frame!
ERROR - [Req#13f/Transcode/8aby2vhjyli18raax0cy3zm2/bbd80329-d7b5-4c42-b33e-1a4cc964b6dd] [h264 @ 0x7fa58c2df4c0] no frame!
ERROR - [Req#141/Transcode/8aby2vhjyli18raax0cy3zm2/bbd80329-d7b5-4c42-b33e-1a4cc964b6dd] Error while decoding stream #0:0: Invalid data found when processing input
ERROR - [Req#142/Transcode/8aby2vhjyli18raax0cy3zm2/bbd80329-d7b5-4c42-b33e-1a4cc964b6dd] [h264_vaapi @ 0x7fa58c3d8600] Driver does not support any RC mode compatible with selected options (supported modes: CQP).
ERROR - [Req#143/Transcode/8aby2vhjyli18raax0cy3zm2/bbd80329-d7b5-4c42-b33e-1a4cc964b6dd] Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
DEBUG - Streaming Resource: Changing client to use software decoding
DEBUG - TPU: hardware transcoding: enabled, but no hardware decode accelerator found
DEBUG - Codecs: hardware transcoding: testing API vaapi
DEBUG - TPU: hardware transcoding: final decoder: , final encoder:
ERROR - [Req#152/Transcode/8aby2vhjyli18raax0cy3zm2/bbd80329-d7b5-4c42-b33e-1a4cc964b6dd] [h264 @ 0x7f445391e040] missing picture in access unit with size 10
ERROR - [Req#153/Transcode/8aby2vhjyli18raax0cy3zm2/bbd80329-d7b5-4c42-b33e-1a4cc964b6dd] [h264 @ 0x7f445391e040] no frame!
ERROR - [Req#159/Transcode/8aby2vhjyli18raax0cy3zm2/bbd80329-d7b5-4c42-b33e-1a4cc964b6dd] [h264 @ 0x7f44513d44c0] no frame!
ERROR - [Req#15a/Transcode/8aby2vhjyli18raax0cy3zm2/bbd80329-d7b5-4c42-b33e-1a4cc964b6dd] Error while decoding stream #0:0: Invalid data found when processing input
DEBUG - [Req#15b/Transcode/8aby2vhjyli18raax0cy3zm2/bbd80329-d7b5-4c42-b33e-1a4cc964b6dd] Transcoder: session 8aby2vhjyli18raax0cy3zm2 indicated fallback to software decoding

I see these errors

[h264 @ 0x7f5d5c6c8100] missing picture in access unit with size 10
[h264 @ 0x7f5d5c6c8100] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264_vaapi @ 0x7fa58c3d8600] Driver does not support any RC mode compatible with selected options (supported modes: CQP).
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Don’t these point to another cause?

So the transcoder settings are not stored anywhere on the host? They are stored on Plex servers?

Transcoder settings are in the DB.
Owner is in Preferences.

Want a controlled, known good, test video?

Both files failed.

[AVHWDeviceContext @ 0x7f5e3250e980] Failed to get number of OpenCL platforms: -1001.
[AVHWDeviceContext @ 0x7f5e3250e980] Failed to get number of OpenCL platforms: -1001.
[Parsed_hwmap_2 @ 0x7f5e35554840] Failed to created derived device context: -19.
[Parsed_hwmap_2 @ 0x7f5e35554840] Failed to configure output pad on Parsed_hwmap_2
Error reinitializing filters!
Failed to inject frame into filter network: No such device
Error while processing the decoded data for stream #0:0

Based on the errors I am seeing, it looks like a driver issue. Doesn’t it?

Full PMS logs ZIP please ? I can’t debug fragments of this stuff.

It might be ICR libs or might be iHD. Impossible to guess.

@Tortuga

I went digging.

Give this a try.

echo "options i915 enable_guc=2" > /etc/modprobe.d/i915.conf

Update initramfs and restart (obviously)

I did that and ran update-initramfs -u

So now I get a whole set of new errors…

DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API vaapi
ERROR - [Req#172/Transcode] [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/iHD_drv_video.so init failed
ERROR - [Req#172/Transcode] [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed
ERROR - [Req#172/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error
DEBUG - [Req#172/Transcode] Could not create hardware context for h264_vaapi
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API nvenc
ERROR - [Req#172/Transcode] [FFMPEG] - Cannot load libcuda.so.1
ERROR - [Req#172/Transcode] [FFMPEG] - Could not dynamically load CUDA
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Operation not permitted
DEBUG - [Req#172/Transcode] Could not create hardware context for h264_nvenc
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API vaapi
ERROR - [Req#172/Transcode] [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/iHD_drv_video.so init failed
ERROR - [Req#172/Transcode] [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed
ERROR - [Req#172/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error
DEBUG - [Req#172/Transcode] Could not create hardware context for h264
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API nvdec
ERROR - [Req#172/Transcode] [FFMPEG] - Cannot load libcuda.so.1
ERROR - [Req#172/Transcode] [FFMPEG] - Could not dynamically load CUDA
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Operation not permitted
DEBUG - [Req#172/Transcode] Could not create hardware context for h264
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API nvenc
ERROR - [Req#172/Transcode] [FFMPEG] - Cannot load libcuda.so.1
ERROR - [Req#172/Transcode] [FFMPEG] - Could not dynamically load CUDA
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Operation not permitted
DEBUG - [Req#172/Transcode] Could not create hardware context for h264_nvenc
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API vaapi
ERROR - [Req#172/Transcode] [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/iHD_drv_video.so init failed
ERROR - [Req#172/Transcode] [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed
ERROR - [Req#172/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error
DEBUG - [Req#172/Transcode] Could not create hardware context for h264
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API nvdec
ERROR - [Req#172/Transcode] [FFMPEG] - Cannot load libcuda.so.1
ERROR - [Req#172/Transcode] [FFMPEG] - Could not dynamically load CUDA
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Operation not permitted
DEBUG - [Req#172/Transcode] Could not create hardware context for h264
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API nvenc
ERROR - [Req#172/Transcode] [FFMPEG] - Cannot load libcuda.so.1
ERROR - [Req#172/Transcode] [FFMPEG] - Could not dynamically load CUDA
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Operation not permitted
DEBUG - [Req#172/Transcode] Could not create hardware context for h264_nvenc
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API vaapi
ERROR - [Req#172/Transcode] [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/iHD_drv_video.so init failed
ERROR - [Req#172/Transcode] [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed
ERROR - [Req#172/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error
DEBUG - [Req#172/Transcode] Could not create hardware context for h264
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API nvdec
ERROR - [Req#172/Transcode] [FFMPEG] - Cannot load libcuda.so.1
ERROR - [Req#172/Transcode] [FFMPEG] - Could not dynamically load CUDA
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Operation not permitted
DEBUG - [Req#172/Transcode] Could not create hardware context for h264
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API nvenc
ERROR - [Req#172/Transcode] [FFMPEG] - Cannot load libcuda.so.1
ERROR - [Req#172/Transcode] [FFMPEG] - Could not dynamically load CUDA
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Operation not permitted
DEBUG - [Req#172/Transcode] Could not create hardware context for h264_nvenc
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API vaapi
ERROR - [Req#172/Transcode] [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/iHD_drv_video.so init failed
ERROR - [Req#172/Transcode] [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed
ERROR - [Req#172/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error
DEBUG - [Req#172/Transcode] Could not create hardware context for h264
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: testing API nvdec
ERROR - [Req#172/Transcode] [FFMPEG] - Cannot load libcuda.so.1
ERROR - [Req#172/Transcode] [FFMPEG] - Could not dynamically load CUDA
DEBUG - [Req#172/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Operation not permitted
DEBUG - [Req#172/Transcode] Could not create hardware context for h264
DEBUG - [Req#195/Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
DEBUG - [Req#195/Transcode] TPU: hardware transcoding: final decoder: , final encoder:
ERROR - [Req#19d/Transcode/xwn56hy5u4zskavgtep3d9jp/0d23b47c-b1c8-4f01-aad1-83d172d8215d] [h264 @ 0x7f7251bf4580] missing picture in access unit with size 10
ERROR - [Req#19e/Transcode/xwn56hy5u4zskavgtep3d9jp/0d23b47c-b1c8-4f01-aad1-83d172d8215d] [h264 @ 0x7f7251bf4580] no frame!
ERROR - [Req#1a4/Transcode/xwn56hy5u4zskavgtep3d9jp/0d23b47c-b1c8-4f01-aad1-83d172d8215d] [h264 @ 0x7f7251a6c500] no frame!
ERROR - [Req#1ad/Transcode/xwn56hy5u4zskavgtep3d9jp/0d23b47c-b1c8-4f01-aad1-83d172d8215d] Error while decoding stream #0:0: Invalid data found when processing input
DEBUG - [Req#1ae/Transcode/xwn56hy5u4zskavgtep3d9jp/0d23b47c-b1c8-4f01-aad1-83d172d8215d] Transcoder: session xwn56hy5u4zskavgtep3d9jp indicated fallback to software decoding

Do you still want the server logs?

@ChuckPa

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