Hardware Transcode Limitation

Server Version#: 1.23.3.4707
Player Version#: 4.57.4

I recently (and magically) got a Nvidia GeForce RTX 3060 GPU for my plex machine. I was really excited about the prospect of using the GPU to do transcoding and eliminating the prebuffering pauses. I installed the card, and reworked my plex docker instance to take advantage of it. I can see now (hw) in the transcoding section and I can see a plex process show up when using nvidia-smi to view the workload of the GPU.

To my dismay, I have a a bluray rip that is encoded in HVEC, the resolution is 2160p and when I try to use plex to stream it the transcoder seems to choke, hard. I found this article and monitored the verbose log during the attempted stream. The speed values were very close to zero, see below. However, when I look at nvidia-smi during this time, the GPU seems to be idling.

What gives?

Verbose logs during streaming, showing speed of 0.0 to 0.4 – much less than 1:

Jun 23, 2021 10:42:22.228 [0x7fda25094b38] Debug — Completed: [127.0.0.1:34764] 206 PUT /video/:/transcode/session/<session key1>/<session key2>/progress?progress=0.0&size=-22&remaining=-1&vdec_packets=69&vdec_hw_ok=56&speed=0.0&vdec_hw_status=1 (14 live) 1ms 355 bytes (pipelined: 65) (range: bytes=0-) 
Jun 23, 2021 10:42:22.812 [0x7fda2497ab38] Debug — Request: [127.0.0.1:34764 (Loopback)] PUT /video/:/transcode/session/<session key1>/<session key2>/progress?progress=0.0&size=-22&remaining=-1&vdec_packets=72&vdec_hw_ok=59&speed=0.4&vdec_hw_status=1 (14 live) Signed-in Token (<email_address>) (range: bytes=0-)  / Accept => */* / Connection => keep-alive / Host => 127.0.0.1:32400 / Icy-MetaData => 1 / Range => bytes=0- / User-Agent => Lavf/58.27.104 / X-Plex-Http-Pipeline => infinite / X-Plex-Token => xxxxxxxxxxxxxxxxxxxx
Jun 23, 2021 10:42:22.812 [0x7fda25094b38] Debug — Completed: [127.0.0.1:34764] 206 PUT /video/:/transcode/session/<session key1>/<session key2>/progress?progress=0.0&size=-22&remaining=-1&vdec_packets=72&vdec_hw_ok=59&speed=0.4&vdec_hw_status=1 (14 live) 0ms 355 bytes (pipelined: 66) (range: bytes=0-) 
Jun 23, 2021 10:42:23.399 [0x7fda26a7ab38] Debug — Request: [127.0.0.1:34764 (Loopback)] PUT /video/:/transcode/session/<session key1>/<session key2>/progress?progress=0.0&size=-22&remaining=-1&vdec_packets=75&vdec_hw_ok=62&speed=0.0&vdec_hw_status=1 (14 live) Signed-in Token (<email_address>) (range: bytes=0-)  / Accept => */* / Connection => keep-alive / Host => 127.0.0.1:32400 / Icy-MetaData => 1 / Range => bytes=0- / User-Agent => Lavf/58.27.104 / X-Plex-Http-Pipeline => infinite / X-Plex-Token => xxxxxxxxxxxxxxxxxxxx
Jun 23, 2021 10:42:23.400 [0x7fda25094b38] Debug — Completed: [127.0.0.1:34764] 206 PUT /video/:/transcode/session/<session key1>/<session key2>/progress?progress=0.0&size=-22&remaining=-1&vdec_packets=75&vdec_hw_ok=62&speed=0.0&vdec_hw_status=1 (14 live) 0ms 355 bytes (pipelined: 67) (range: bytes=0-) 
Jun 23, 2021 10:42:24.030 [0x7fda1ab63b38] Debug — Request: [127.0.0.1:34764 (Loopback)] PUT /video/:/transcode/session/<session key1>/<session key2>/progress?progress=0.0&size=-22&remaining=-1&vdec_packets=78&vdec_hw_ok=65&speed=0.4&vdec_hw_status=1 (14 live) Signed-in Token (<email_address>) (range: bytes=0-)  / Accept => */* / Connection => keep-alive / Host => 127.0.0.1:32400 / Icy-MetaData => 1 / Range => bytes=0- / User-Agent => Lavf/58.27.104 / X-Plex-Http-Pipeline => infinite / X-Plex-Token => xxxxxxxxxxxxxxxxxxxx
Jun 23, 2021 10:42:24.030 [0x7fda25094b38] Debug — Completed: [127.0.0.1:34764] 206 PUT /video/:/transcode/session/<session key1>/<session key2>/progress?progress=0.0&size=-22&remaining=-1&vdec_packets=78&vdec_hw_ok=65&speed=0.4&vdec_hw_status=1 (14 live) 0ms 355 bytes (pipelined: 68) (range: bytes=0-) 
Jun 23, 2021 10:42:24.634 [0x7fda2497ab38] Debug — Request: [127.0.0.1:34764 (Loopback)] PUT /video/:/transcode/session/<session key1>/<session key2>/progress?progress=0.0&size=-22&remaining=-1&vdec_packets=81&vdec_hw_ok=68&speed=0.0&vdec_hw_status=1 (14 live) Signed-in Token (<email_address>) (range: bytes=0-)  / Accept => */* / Connection => keep-alive / Host => 127.0.0.1:32400 / Icy-MetaData => 1 / Range => bytes=0- / User-Agent => Lavf/58.27.104 / X-Plex-Http-Pipeline => infinite / X-Plex-Token => xxxxxxxxxxxxxxxxxxxx

nvidia-smi output during attempted streaming, showing 6% GPU utilization:

$ nvidia-smi
Wed Jun 23 10:42:51 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 465.27       Driver Version: 465.27       CUDA Version: 11.3     |
|-------------------------------+----------------------+----------------------+
| 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 ...  Off  | 00000000:03:00.0  On |                  N/A |
| 34%   51C    P2    41W / 170W |   3285MiB / 12051MiB |      6%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2118      G   /usr/lib/xorg/Xorg                 32MiB |
|    0   N/A  N/A      5996      G   /usr/bin/gnome-shell                7MiB |
|    0   N/A  N/A    337497      C   ffmpeg                            263MiB |
|    0   N/A  N/A    337504      C   ffmpeg                            263MiB |
|    0   N/A  N/A    337509      C   ffmpeg                            263MiB |
|    0   N/A  N/A    337520      C   ffmpeg                            263MiB |
|    0   N/A  N/A    337528      C   ffmpeg                            263MiB |
|    0   N/A  N/A    337538      C   ffmpeg                            263MiB |
|    0   N/A  N/A    337546      C   ffmpeg                            263MiB |
|    0   N/A  N/A    417914      C   ...diaserver/Plex Transcoder     1398MiB |
+-----------------------------------------------------------------------------+
$

May I see the XML of the media being played? (<media></media> tags)

Of particular interest – which surprises everyone.

  1. Subtitles cannot be burned by hardware - there is no API for it.
  2. The CPU must do the job.
  3. The GPU will do the bulk of the work – HOWEVER –
  4. All transcoding will be gated by the speed at which the CPU can burn subtitles into each output frame.
2 Likes

Also, while I was looking at your issue, I noticed the 3060 family is not mentioned in the GPU Video Support Matrix, though there is a reference to this very page on the spec sheet of the 3060. I don’t know if Nvidia just forgot to add it or, since the 3060 is the “smallest” member of the 3000 family, it might not support any codec at all. Which shouldn’t be the case as the matrix mentions older cards that don’t have any hardware decoding.

I definitely need to see the PMS DEBUG logs which capture the start of a transcoding session (about 20 seconds worth is all).

Start playback
play for 20 sec
stop playback
wait 20
Settings - Server - Troubleshooting - Download Logs

Attach the ZIP file please.

<Media id="104213" duration="6566816" bitrate="57649" width="3840" height="2160" aspectRatio="1.78" audioChannels="8" audioCodec="truehd" videoCodec="hevc" videoResolution="4k" container="mkv" videoFrameRate="24p" videoProfile="main 10">
<Part accessible="1" exists="1" id="104646" key="/library/parts/104646/1617589466/file.mkv" duration="6566816" file="/data/hdd_a/movies/Top Gun (1986)/Top Gun (1986).mkv" size="47382006343" container="mkv" deepAnalysisVersion="4" requiredBandwidths="79898,71123,65964,62721,61689,60980,59955,58797" videoProfile="main 10">
<Stream id="80545" streamType="1" default="1" codec="hevc" index="1" bitrate="51101" language="English" languageCode="eng" bitDepth="10" chromaSubsampling="4:2:0" codedHeight="2160" codedWidth="3840" colorPrimaries="bt2020" colorRange="tv" colorSpace="bt2020nc" colorTrc="smpte2084" frameRate="23.976" height="2160" level="153" profile="main 10" refFrames="1" requiredBandwidths="72331,65258,60096,55682,54640,54255,53074,51998" width="3840" displayTitle="4K (HEVC Main 10 HDR)" extendedDisplayTitle="4K (HEVC Main 10 HDR)"> </Stream>
<Stream id="80546" streamType="2" default="1" codec="truehd" index="2" channels="8" bitrate="4476" language="English" languageCode="eng" audioChannelLayout="7.1" bitDepth="24" requiredBandwidths="5584,5474,5203,4945,4945,4945,4945,4945" samplingRate="48000" displayTitle="English (TRUEHD 7.1)" extendedDisplayTitle="English (TRUEHD 7.1)"> </Stream>
<Stream id="80547" streamType="2" selected="1" codec="ac3" index="3" channels="6" bitrate="640" language="English" languageCode="eng" audioChannelLayout="5.1(side)" requiredBandwidths="640,640,640,640,640,640,640,640" samplingRate="48000" displayTitle="English (AC3 5.1)" extendedDisplayTitle="English (AC3 5.1)"> </Stream>
<Stream id="80548" streamType="2" codec="ac3" index="4" channels="2" bitrate="224" language="English" languageCode="eng" audioChannelLayout="stereo" requiredBandwidths="224,224,224,224,224,224,224,224" samplingRate="48000" title="Commentary by producer Jerry Bruckheimer, director Tony Scott, co-screenwriter Jack Epps Jr. and Naval Experts" displayTitle="English (AC3 Stereo)" extendedDisplayTitle="Commentary by producer Jerry Bruckheimer, director Tony Scott, co-screenwriter Jack Epps Jr. and Naval Experts (English AC3 Stereo)"> </Stream>
<Stream id="80544" streamType="3" default="1" codec="srt" index="0" bitrate="0" language="Română" languageCode="rum" requiredBandwidths="1,1,1,1,1,1,1,1" displayTitle="Română (SRT)" extendedDisplayTitle="Română (SRT)"> </Stream>
<Stream id="80549" streamType="3" selected="1" codec="pgs" index="5" bitrate="35" language="English" languageCode="eng" requiredBandwidths="54,54,54,54,54,54,54,54" displayTitle="English (PGS)" extendedDisplayTitle="English (PGS)"> </Stream>
<Stream id="80550" streamType="3" codec="pgs" index="6" bitrate="38" language="English" languageCode="eng" requiredBandwidths="53,53,53,53,53,53,53,53" displayTitle="English (PGS)" extendedDisplayTitle="English (PGS)"> </Stream>
<Stream id="80551" streamType="3" codec="pgs" index="7" bitrate="25" language="中文" languageCode="chi" requiredBandwidths="73,73,73,73,73,73,73,73" displayTitle="中文 (PGS)" extendedDisplayTitle="中文 (PGS)"> </Stream>
<Stream id="80552" streamType="3" codec="pgs" index="8" bitrate="30" language="Česky" languageCode="cze" requiredBandwidths="81,81,81,81,81,81,81,81" displayTitle="Česky (PGS)" extendedDisplayTitle="Česky (PGS)"> </Stream>
<Stream id="80553" streamType="3" codec="pgs" index="9" bitrate="24" language="Dansk" languageCode="dan" requiredBandwidths="55,55,55,55,55,55,55,55" displayTitle="Dansk (PGS)" extendedDisplayTitle="Dansk (PGS)"> </Stream>
<Stream id="80554" streamType="3" codec="pgs" index="10" bitrate="28" language="Deutsch" languageCode="ger" requiredBandwidths="69,69,69,69,69,69,69,69" displayTitle="Deutsch (PGS)" extendedDisplayTitle="Deutsch (PGS)"> </Stream>
<Stream id="80555" streamType="3" codec="pgs" index="11" bitrate="27" language="Español" languageCode="spa" requiredBandwidths="67,67,67,67,67,67,67,67" displayTitle="Español (PGS)" extendedDisplayTitle="Español (PGS)"> </Stream>
<Stream id="80556" streamType="3" codec="pgs" index="12" bitrate="33" language="Español" languageCode="spa" requiredBandwidths="78,78,78,78,78,78,78,78" displayTitle="Español (PGS)" extendedDisplayTitle="Español (PGS)"> </Stream>
<Stream id="80557" streamType="3" codec="pgs" index="13" bitrate="27" language="Français" languageCode="fre" requiredBandwidths="76,76,76,76,76,76,76,76" displayTitle="Français (PGS)" extendedDisplayTitle="Français (PGS)"> </Stream>
<Stream id="80558" streamType="3" codec="pgs" index="14" bitrate="25" language="Italiano" languageCode="ita" requiredBandwidths="61,61,61,61,61,61,61,61" displayTitle="Italiano (PGS)" extendedDisplayTitle="Italiano (PGS)"> </Stream>
<Stream id="80559" streamType="3" codec="pgs" index="15" bitrate="18" language="日本語" languageCode="jpn" requiredBandwidths="55,55,55,55,55,55,55,55" displayTitle="日本語 (PGS)" extendedDisplayTitle="日本語 (PGS)"> </Stream>
<Stream id="80560" streamType="3" codec="pgs" index="16" bitrate="26" language="한국어" languageCode="kor" requiredBandwidths="86,86,86,86,86,86,86,86" displayTitle="한국어 (PGS)" extendedDisplayTitle="한국어 (PGS)"> </Stream>
<Stream id="80561" streamType="3" codec="pgs" index="17" bitrate="22" language="中文" languageCode="chi" requiredBandwidths="55,55,55,55,55,55,55,55" displayTitle="中文 (PGS)" extendedDisplayTitle="中文 (PGS)"> </Stream>
<Stream id="80562" streamType="3" codec="pgs" index="18" bitrate="26" language="Nederlands" languageCode="dut" requiredBandwidths="67,67,67,67,67,67,67,67" displayTitle="Nederlands (PGS)" extendedDisplayTitle="Nederlands (PGS)"> </Stream>
<Stream id="80563" streamType="3" codec="pgs" index="19" bitrate="28" language="Norsk" languageCode="nor" requiredBandwidths="59,59,59,59,59,59,59,59" displayTitle="Norsk (PGS)" extendedDisplayTitle="Norsk (PGS)"> </Stream>
<Stream id="80564" streamType="3" codec="pgs" index="20" bitrate="31" language="Português" languageCode="por" requiredBandwidths="92,92,92,92,92,92,92,92" displayTitle="Português (PGS)" extendedDisplayTitle="Português (PGS)"> </Stream>
<Stream id="80565" streamType="3" codec="pgs" index="21" bitrate="26" language="Português" languageCode="por" requiredBandwidths="65,65,65,65,65,65,65,65" displayTitle="Português (PGS)" extendedDisplayTitle="Português (PGS)"> </Stream>
<Stream id="80566" streamType="3" codec="pgs" index="22" bitrate="36" language="русский язык" languageCode="rus" requiredBandwidths="102,102,102,102,102,102,102,102" displayTitle="русский язык (PGS)" extendedDisplayTitle="русский язык (PGS)"> </Stream>
<Stream id="80567" streamType="3" codec="pgs" index="23" bitrate="27" language="中文" languageCode="chi" requiredBandwidths="70,70,70,70,70,70,70,70" displayTitle="中文 (PGS)" extendedDisplayTitle="中文 (PGS)"> </Stream>
<Stream id="80568" streamType="3" codec="pgs" index="24" bitrate="27" language="Suomi" languageCode="fin" requiredBandwidths="70,70,70,70,70,70,70,70" displayTitle="Suomi (PGS)" extendedDisplayTitle="Suomi (PGS)"> </Stream>
<Stream id="80569" streamType="3" codec="pgs" index="25" bitrate="24" language="Svenska" languageCode="swe" requiredBandwidths="49,49,49,49,49,49,49,49" displayTitle="Svenska (PGS)" extendedDisplayTitle="Svenska (PGS)"> </Stream>
<Stream id="80570" streamType="3" codec="pgs" index="26" bitrate="28" language="ไทย" languageCode="tha" requiredBandwidths="88,88,88,88,88,88,88,88" displayTitle="ไทย (PGS)" extendedDisplayTitle="ไทย (PGS)"> </Stream>
<Stream id="80571" streamType="3" codec="pgs" index="27" bitrate="80" language="English" languageCode="eng" requiredBandwidths="87,87,87,87,87,87,87,87" title="Commentary" displayTitle="English (PGS)" extendedDisplayTitle="Commentary (English PGS)"> </Stream>
<Stream id="80572" streamType="3" codec="pgs" index="28" bitrate="75" language="Deutsch" languageCode="ger" requiredBandwidths="86,86,86,86,86,86,86,86" title="Commentary" displayTitle="Deutsch (PGS)" extendedDisplayTitle="Commentary (Deutsch PGS)"> </Stream>
<Stream id="80573" streamType="3" codec="pgs" index="29" bitrate="68" language="Español" languageCode="spa" requiredBandwidths="74,74,74,74,74,74,74,74" title="Commentary" displayTitle="Español (PGS)" extendedDisplayTitle="Commentary (Español PGS)"> </Stream>
<Stream id="80574" streamType="3" codec="pgs" index="30" bitrate="72" language="Español" languageCode="spa" requiredBandwidths="77,77,77,77,77,77,77,77" title="Commentary" displayTitle="Español (PGS)" extendedDisplayTitle="Commentary (Español PGS)"> </Stream>
<Stream id="80575" streamType="3" codec="pgs" index="31" bitrate="68" language="Français" languageCode="fre" requiredBandwidths="78,78,78,78,78,78,78,78" title="Commentary" displayTitle="Français (PGS)" extendedDisplayTitle="Commentary (Français PGS)"> </Stream>
<Stream id="80576" streamType="3" codec="pgs" index="32" bitrate="64" language="Italiano" languageCode="ita" requiredBandwidths="74,74,74,74,74,74,74,74" title="Commentary" displayTitle="Italiano (PGS)" extendedDisplayTitle="Commentary (Italiano PGS)"> </Stream>
<Stream id="80577" streamType="3" codec="pgs" index="33" bitrate="47" language="日本語" languageCode="jpn" requiredBandwidths="54,54,54,54,54,54,54,54" title="Commentary" displayTitle="日本語 (PGS)" extendedDisplayTitle="Commentary (日本語 PGS)"> </Stream>
<Stream id="80578" streamType="3" codec="pgs" index="34" bitrate="53" language="한국어" languageCode="kor" requiredBandwidths="59,59,59,59,59,59,59,59" title="Commentary" displayTitle="한국어 (PGS)" extendedDisplayTitle="Commentary (한국어 PGS)"> </Stream>
<Stream id="80579" streamType="3" codec="pgs" index="35" bitrate="69" language="Português" languageCode="por" requiredBandwidths="76,76,76,76,76,76,76,76" title="Commentary" displayTitle="Português (PGS)" extendedDisplayTitle="Commentary (Português PGS)"> </Stream>
</Part>
</Media>

Wow, yeah! as you said, that surprises me. If I turn off the subtitles, that should remove the sub-title bottleneck, right?

I saw this too, over the last few weeks on the https://developer.nvidia.com/cuda-gpus page they listed the 3060 under “GeForce Notebook Products”. According to this cude page, it supports the 8.6 compute capability so I’m hoping/guessing that it can crunch some video.

@ChuckPa, thanks for your attention, do you want verbose debugging enabled for this capture?

Thanks again @ChuckPa, this seems to have been the cause because I disabled subtitles and the thing plays like a dream now! That’s really a shame because we like to watch movies with subtitles so we can clearly understand everything that is happening. I guess we’ll just have to pick and choose which movies we enable it on.

@SpikeyGG

If you really want those subtitles in there,

The best solution is to pre-burn them (if they are Image based – PGS,VOBSUB, DVDRIP)
-or-

set the player option to automatic for SRT subtitles. (depends on what the player can handle)

SRT subtitles get sent as a 3rd stream almost every TV can handle.

1 Like

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