After update hw transcoding stops after 5 seconds (Solved)

Hello, first I want to thank plex for being so great I have a life time plex pass.

Unfortuantly, I have run into a bit of an issue when it come to transcoding using a nvidia 2070.

I can confirm nvidia drivers are installed and working
±----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.127.05 Driver Version: 550.127.05 CUDA Version: 12.4 |
|-----------------------------------------±-----------------------±---------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 2060 Off | 00000000:42:00.0 Off | N/A |
| 22% 28C P0 39W / 190W | 1MiB / 6144MiB | 0% Default |
| | | N/A |
±----------------------------------------±-----------------------±---------------------+
| 1 NVIDIA GeForce RTX 2070 Off | 00000000:61:00.0 Off | N/A |
| 39% 31C P0 N/A / 215W | 1MiB / 8192MiB | 0% Default |
| | | N/A |
±----------------------------------------±-----------------------±---------------------+

±----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
±----------------------------------------------------------------------------------------+

Plex docker ( stable Version: 1.0.27) is working and is running Version 1.41.1.9057 of plex. I can see both my video cards and have the 2070 selected in the docker. In plex I have “Use hardware acceleration when available” selected and “Use hardware-accelerated video encoding”. under “Hardware transcoding device” I can also see my 2070 and have it selected.

When I go to start a video it plays fine provided I have not dropped the quality. Once I drop the quality (start trancoding) it plays for about 5 seconds then stops. The same happens regardless of what device i am trying to play on. When I stop the docker edit it and deselect the 2070, so it does not load. Then I fire back up plex, it will transcode then, however using the cpu is not ideal at all. This however does confirm that the rest of the setup works.

Below is the errors I am getting from the console in plex. Please understand I would not post here if I have not already tried to find a fix in these forms and elsewhere. Any help would be very welcome. Please let me know if you need any more info to help you help me. lol

Nov 07, 2024 10:11:20.889 [139750745742136] Error — [Req#a35] Unknown metadata type: folder
Nov 07, 2024 10:11:20.890 [139750745742136] Warning — [Req#a35] QueryParser: Invalid field ‘contentDirectoryID’ found, ignoring.
Nov 07, 2024 10:11:20.890 [139750745742136] Warning — [Req#a35] QueryParser: Invalid field ‘pinnedContentDirectoryID’ found, ignoring.
Nov 07, 2024 10:11:20.890 [139751139597112] Warning — [Req#a34] QueryParser: Invalid field ‘sectionID’ found, ignoring.
Nov 07, 2024 10:11:20.890 [139751139597112] Warning — [Req#a34] QueryParser: Invalid field ‘contentDirectoryID’ found, ignoring.
Nov 07, 2024 10:11:20.890 [139751139597112] Warning — [Req#a34] QueryParser: Invalid field ‘pinnedContentDirectoryID’ found, ignoring.
Nov 07, 2024 10:11:21.021 [139751143893816] Error — [Req#a44] Unknown metadata type: folder
Nov 07, 2024 10:11:21.021 [139751143893816] Warning — [Req#a44] QueryParser: Invalid field ‘contentDirectoryID’ found, ignoring.
Nov 07, 2024 10:11:21.021 [139751143893816] Warning — [Req#a44] QueryParser: Invalid field ‘pinnedContentDirectoryID’ found, ignoring.
Nov 07, 2024 10:11:21.022 [139750937094968] Warning — [Req#a43] QueryParser: Invalid field ‘sectionID’ found, ignoring.
Nov 07, 2024 10:11:21.022 [139750937094968] Warning — [Req#a43] QueryParser: Invalid field ‘contentDirectoryID’ found, ignoring.
Nov 07, 2024 10:11:21.022 [139750937094968] Warning — [Req#a43] QueryParser: Invalid field ‘pinnedContentDirectoryID’ found, ignoring.
Nov 07, 2024 10:11:21.375 [139751146003256] Warning — [Req#a51] QueryParser: Invalid field ‘sectionID’ found, ignoring.
Nov 07, 2024 10:11:21.375 [139750928927544] Error — [Req#a52] Unknown metadata type: folder
Nov 07, 2024 10:11:21.375 [139751146003256] Warning — [Req#a51] QueryParser: Invalid field ‘contentDirectoryID’ found, ignoring.
Nov 07, 2024 10:11:21.375 [139751146003256] Warning — [Req#a51] QueryParser: Invalid field ‘pinnedContentDirectoryID’ found, ignoring.
Nov 07, 2024 10:11:21.375 [139750928927544] Warning — [Req#a52] QueryParser: Invalid field ‘contentDirectoryID’ found, ignoring.
Nov 07, 2024 10:11:21.375 [139750928927544] Warning — [Req#a52] QueryParser: Invalid field ‘pinnedContentDirectoryID’ found, ignoring.
Nov 07, 2024 10:11:22.669 [139751146003256] Error — [Req#a83] Unknown metadata type: folder
Nov 07, 2024 10:11:34.654 [139751146003256] Warning — [Req#bd7/Transcode/0nizdd4wclta3kks0u68rng2] Transcode runner appears to have died.
Nov 07, 2024 10:11:34.665 [139751139597112] Warning — [Req#bda/Transcode/0nizdd4wclta3kks0u68rng2] Transcode runner appears to have died.

Sorry, but it’s not possible to diagnose anything from this snippet.

May I please have the DEBUG logs ZIP file which captures this happening?

( Make certain DEBUG logging is enabled before recreating the failure )

Thank you so much for your help thus far. I have recreated the issue with DEGUG on. Please find the attached log. Please let me know what else you may need.
Plex Media Server Logs_2024-11-08_09-55-31.zip (54.8 KB)

Sorry I forgot to upload the file. My bad. It has been done now. Please let me know if you need anything else and thank you for your help.

Also, just to make sure it was not some setting/cache/codec issue I spun up another plex docker just to test with once video. shut off all the other dockers and added the 2070 to the test plex docker. I can confirm the same error comes up.

PMS shows:

  1. It sees the card on the PCI bus.

Nov 08, 2024 09:52:58.936 [140524700375864] DEBUG - [GPU] Got device: TU106 [GeForce RTX 2070 Rev. A], nvidia@unknown, default true, best true, ID 10de:1f07:1458:37ad@0000:61:00.0, DevID [10de:1f07:1458:37ad], flags 0xe8

  1. When it comes to the actual transcode point, it cannot talk to it.

Nov 08, 2024 09:54:09.561 [140524515007288] DEBUG - [Req#2284/Transcode] Cleaning directory for session ahnyqv0fijw6ckbzkmxsqxr3 ()
Nov 08, 2024 09:54:09.561 [140524515007288] DEBUG - [Req#2284/Transcode] Starting a transcode session ahnyqv0fijw6ckbzkmxsqxr3 at offset -1.0 (state=3)
Nov 08, 2024 09:54:09.562 [140524515007288] DEBUG - [Req#2284/Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Nov 08, 2024 09:54:09.562 [140524515007288] INFO - [Req#2284/Transcode] CodecManager: starting EAE at “/tmp/pms-6dd5159f-ac53-4f6a-8cc3-0b5b7ea5b34d/EasyAudioEncoder”
Nov 08, 2024 09:54:09.563 [140524515007288] DEBUG - [Req#2284/Transcode/JobRunner] Job running: “/config/Library/Application Support/Plex Media Server/Codecs/EasyAudioEncoder-8f4ca5ead7783c54a4930420-linux-x86_64/EasyAudioEncoder/EasyAudioEncoder”
Nov 08, 2024 09:54:09.563 [140524515007288] DEBUG - [Req#2284/Transcode/JobRunner] In directory: “/tmp/pms-6dd5159f-ac53-4f6a-8cc3-0b5b7ea5b34d/EasyAudioEncoder”
Nov 08, 2024 09:54:09.564 [140524515007288] DEBUG - [Req#2284/Transcode/JobRunner] Jobs: Starting child process with pid 617
Nov 08, 2024 09:54:09.564 [140524515007288] DEBUG - [Req#2284/Transcode] [Universal] Using local file path instead of URL: /media/Movies/My Old Ass (2024)/My Old Ass (2024) WEBDL-1080p.mkv
Nov 08, 2024 09:54:09.564 [140524515007288] DEBUG - [Req#2284/Transcode] TPU: hardware transcoding: final decoder: , final encoder:
Nov 08, 2024 09:54:09.565 [140524515007288] DEBUG - [Req#2284/Transcode/JobRunner] Job running: EAE_ROOT=/tmp/pms-6dd5159f-ac53-4f6a-8cc3-0b5b7ea5b34d/EasyAudioEncoder FFMPEG_EXTERNAL_LIBS=‘/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/db205f4-631e8759786d054613dad5b2-linux-x86_64/’ X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx “/usr/lib/plexmediaserver/Plex Transcoder” -codec:0 h264 -codec:1 eac3_eae -eae_prefix:1 ahnyqv0fijw6ckbzkmxsqxr3_ -ss 0 -noaccurate_seek -analyzeduration 20000000 -probesize 20000000 -i “/media/Movies/My Old Ass (2024)/My Old Ass (2024) WEBDL-1080p.mkv” -map 0:0 -codec:0 copy -filter_complex “[0:1] aresample=async=1:ochl=‘stereo’:rematrix_maxval=0.000000dB:osr=48000[0]” -map “[0]” -metadata:s:1 language=eng -codec:1 aac -b:1 256k -f dash -seg_duration 5 -dash_segment_type mp4 -init_seg_name ‘init-stream$RepresentationID$.m4s’ -media_seg_name ‘chunk-stream$RepresentationID$-$Number%05d$.m4s’ -window_size 5 -delete_removed false -skip_to_segment 1 -time_delta 0.0625 -manifest_name “http://127.0.0.1:32400/video/:/transcode/session/ahnyqv0fijw6ckbzkmxsqxr3/6b662b65-df3a-4616-ae88-1cf712bdb605/manifest?X-Plex-Http-Pipeline=infinite” -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 dash -start_at_zero -copyts -vsync cfr -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/ahnyqv0fijw6ckbzkmxsqxr3/6b662b65-df3a-4616-ae88-1cf712bdb605/progress

What you show in the OP is that the basic drivers are loaded.
To do hardware transcoding requires more support packages.

So… Silly question time:

  1. Are all the libnvidia packages installed on the host?
    – libnvidia-encode
    – libnvidia-decode
    – libnvidia-compute (for tone mapping)
    – etc

  2. Have the Nvidia runtime libraries been passed into the container in the spec?

  3. Does the GID used by the container have permission to access the GPU ?
    ( a member of the group which owns it )

If you look here (my LXC script to add GPU to LXC containers), you see;

  1. I get the GID of the render node
  2. I then add the GPU to the container as a physical GPU (not vGPU) and assign it the GID needed for outside the container on the host.
  3. Lastly, I tell LXC to pass all the Nvidia runtime libraries into the container so PMS can access the physical GPU passed in.
[chuck@lizum bin.1999]$ cat add-gpu
#!/bin/bash
#
# Add both Intel and Nvidia GPU passthrough to LXD/LXC container

# Argument #1 is LXC container to add
if [ "$1" = "" ]; then
 echo "Error: missing container name" 
 exit 1
fi

# Container exist ?
if [ "$(lxc list | grep "$1")" == "" ]; then
  echo "Error: Unknown container name '$1'"
  exit 2
fi

# Make certain /dev/dri/renderD128 exists
if [ ! -e /dev/dri/renderD128 ]; then
  echo Error:  This host does not have hardware transcoding ability /dev/dri/renderD128
  echo "        Drivers installed?"
  exit 3
fi

Gid="$(stat -c %g /dev/dri/renderD128)"

# Add it (Both Intel and Nvidia)
lxc config device add "$1" GPUs gpu gid=$Gid

# Add Nvidia runtime 
lxc config set "$1" nvidia.driver.capabilities all
lxc config set "$1" nvidia.require.cuda true
lxc config set "$1" nvidia.runtime true

echo GPU configuration added to \'$1\'

# Restart
if [ "$(lxc list | grep -w "$1" | grep "RUNNING")" != "" ]; then
  echo Restarting $1
  lxc restart $1
fi

[chuck@lizum bin.2000]$

First, wow. Thank you so much for all the effort in this.

So I found a huge clue while I was running down your requests while testing.

So when I said the transcode is not working on lots of device that was true but I think the devices I checked were all a similar type.

So I checked on multiple computers using plexweb, none worked. Then I checked my chromecast and it had the same issue. I also checked using plex for desktop, no go. However I just tried my firestick and it worked. I can confirm transcode is working on the 2070 and can see the process on nvidia-smi. I also works on andriod tv as well as apple ios and roku. I am sorry for missing this.

So of course this does confirm the 2070 is is setup and permisions are working well, but now I do not know where to go from here. Please let me know what you need from me to check/test. Thank you so much for your help and sorry for the miss before.

With Respect,
Andrew

@CabinServerAdmin

I’ve sent you a test file. It will allow you to confirm everything (server side) is working correctly.

It has PGS subtitles (for burning) as well as a nice high video bitrate for transcoding down.

Plex/Web will play it “slow” because Plex/web doesn’t understand 59.94 FPS.

Sorry for the delay in getting back to you with my fidings. I wanted to be sure.

So I am still getting the “Transcode runner appears to have died” when I try to trancode that video to play on plex web, plex windows app and all chromecasts devices. I can play it without transcoding (although slow like you said). I also tested the file on a firestick max and the server could transcode fine and play it on the firestick. It could also handle the video fine without transcoding.

To make sure there are no other issues. I fired up a an offical trunenas version plex docker and tested the same video file, first without giving the docker a video card and it was able to transcode and play. I then gave the docker the video card and it would not transcode for plex web, chrome cast and plex windows app. All other devices the transcoder works fine.

Do you have anymore suggestions I can try? Thank you in advance.
Plex Media Server Logs_2024-11-11_09-46-28.zip (142.7 KB)

I see where you changed the playback quality mid-playback.

Nov 11, 2024 09:43:03.025 [140592866270008] DEBUG - [Req#d32/Transcode/aqr6h7yfykhph0l2id3cb146] Asked for segment 24 from session.
Nov 11, 2024 09:43:03.052 [140592786516792] DEBUG - [Req#a39/Transcode] MDE: My Old Ass (2024) WEBDL-1080p: Audio Direct Streaming is disabled, so video's audio stream will be transcoded
Nov 11, 2024 09:43:03.052 [140592786516792] DEBUG - [Req#a39/Transcode] MDE: Cannot direct stream audio stream due to profile or setting limitations
Nov 11, 2024 09:43:03.052 [140592786516792] DEBUG - [Req#a39/Transcode] MDE: My Old Ass (2024) WEBDL-1080p: selected media 0 / 2
Nov 11, 2024 09:43:03.052 [140592848972600] DEBUG - [Req#a39/Transcode] Killing job.
Nov 11, 2024 09:43:03.052 [140592848972600] DEBUG - [Req#a39/Transcode] Signalling job ID 787 with 9
Nov 11, 2024 09:43:03.052 [140592786516792] DEBUG - [Req#a39/Transcode] Streaming Resource: Session 0x7fde53a9ac58:clc1814fxzvq5o2z5tpcgn67 changed from using 21252kbps to 3971kbps of WAN bandwidth.  Used bandwidth is now 3971kbps
Nov 11, 2024 09:43:03.052 [140592786516792] DEBUG - [Req#a39/Transcode] Streaming Resource: Session 0x7fde53a9ac58:clc1814fxzvq5o2z5tpcgn67 changed transcode slot usage to used.  Used slots is now 1
Nov 11, 2024 09:43:03.052 [140592848972600] DEBUG - [Req#a39/Transcode] Job was already killed, not killing again.
Nov 11, 2024 09:43:03.052 [140592848972600] DEBUG - [Req#a39/Transcode] Stopping transcode session aqr6h7yfykhph0l2id3cb146
Nov 11, 2024 09:43:03.052 [140592786516792] DEBUG - [Req#a39/Transcode] Streaming Resource: Reached Decision id=2 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=2 part=(id=2 decision=transcode container=mp4 protocol=dash streams=(Video=(id=1 decision=transcode bitrate=3659 encoder=h264_nvenc width=1280 height=692) Audio=(id=2 decision=transcode bitrate=122 encoder=aac channels=2 rate=48000))))

This is a known, and long standing, problem with several of the lesser-capable players (Plex/web, ChromeCast, etc)

To confirm,

  1. Set the quality value first.
  2. Now start playback.
  3. Let it play.

Thank you very much for your help. Your suggestion is indeed is a solution and I can confirm it work; perhaps not the most elegant solution, but a solution none the less.

Thanks again.

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