Can't get hardware transcoding to work

Hello all,
I’ve used Plex for a while and just recently started trying to get into 4k video on my plex server. I quickly realized the server wasn’t capable of transcoding 4k with constant stuttering and buffering. So, I looked up info on it and found out about hardware acceleration. Before I build a new server with a gpu that can hardware accelerate I wanted to give things a try. So I tested it on my desktop. Installed Plex Media server and all on here.

I enabled the option under transcoder to user hardware acceleration, however when I go to activity while playing a 4k video it does not show (hw) as the guide says it should. Just says transcoding HEVC to H264. And it’s also pretty obvious that the GPU is not getting used because my CPU usage for Plex Media Server is at 100%.

I have a GTX 1070 Ti GPU, and an i7 8700k CPU. Both of which should fully support all the necessary features for hardware transcoding based on what I’ve read. I’m also running the latest version of Plex Media Server (version 1.13.4.5271).

Can anyone tell me what might be wrong to prevent hardware transcoding from working?

Thanks

  • Which OS are you using?
  • Is it running as a service?

At least with Windows, HW transcoding is not supported if PMS runs as a service.

The test PMS is running on windows 10.

It is not running as a service.

Hmm, another update. I got it to work on a couple of 4k videos. Is there a max bitrate that it can hw transcode? I haven’t found the similarity between the ones that aren’t working, and the ones that are for sure yet, but I have two that aren’t working a 59.3 Mbps, and a 67.2 Mbps. Then I have 3 others that do work a 17.7 Mbps, 22.1 Mbps, and 27.3 Mbps. All 5 videos are HEVC source, 2 of them are HDR (one that works 27.3 Mbps, and one that doesn’t work 67.2 Mbps).

If you can provide the log from PMS after trying to play one of these files that don’t work, it will say why HW wasn’t used. Make sure you have debug logging turned on before.

Also provide the XML for the video.

Ok, here is the part of the log when trying to play the video that doesn’t work:

Jul 27, 2018 17:44:07.451 [5940] INFO - [FFMPEG] - MFT name: 'Microsoft AAC Audio Encoder MFT'
Jul 27, 2018 17:44:07.608 [5940] INFO - [FFMPEG] - MFT name: 'Microsoft AAC Audio Encoder MFT'
Jul 27, 2018 17:44:08.366 [10712] ERROR - [Transcoder] [h264_nvenc @ 03da1200] InitializeEncoder failed: invalid param (8)
Jul 27, 2018 17:44:08.399 [6160] ERROR - [Transcoder] 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
Jul 27, 2018 17:44:08.473 [11612] INFO - [FFMPEG] - MFT name: 'Microsoft AAC Audio Encoder MFT'
Jul 27, 2018 17:44:08.475 [11612] INFO - [FFMPEG] - MFT name: 'Microsoft AAC Audio Encoder MFT'
Jul 27, 2018 17:44:24.287 [8624] WARN - Transcode runner appears to have died.
Jul 27, 2018 17:44:24.287 [5940] WARN - Transcode runner appears to have died.
Jul 27, 2018 17:44:24.389 [8624] WARN - Timed out waiting for segment.
Jul 27, 2018 17:44:24.389 [5940] WARN - Timed out waiting for segment.

And then the XML. I got a second version of the file which is shown here as well. The first Media file does not work (it’s the one I tried to play for the log snippet above. The second media file plays with hw transcoding just fine.

<Media videoResolution="4k" id="22638" duration="8397600" bitrate="67247" width="3840" height="2160" aspectRatio="1.78" audioChannels="8" audioCodec="truehd" videoCodec="hevc" container="mkv" videoFrameRate="24p" videoProfile="main 10">
<Part accessible="1" exists="1" id="22649" key="/library/parts/22649/1531267830/file.mkv" duration="8397600" file="W:\Movies\Ready.Player.One.2018.2160p.mkv" size="70589431086" container="mkv" videoProfile="main 10">
<Stream id="53191" streamType="1" default="1" codec="hevc" index="0" bitrate="66799" language="English" languageCode="eng" bitDepth="10" chromaSubsampling="4:2:0" colorPrimaries="bt2020" colorRange="tv" colorSpace="bt2020nc" colorTrc="smpte2084" frameRate="23.976" height="2160" level="153" profile="main 10" refFrames="1" title="MPEG-H HEVC Video / 62963 kbps / 2160p / 23.976 fps / 16:9 / Main 10 Profile 5.1 High / 4:2:0 / 10 bits / HDR / BT.2020" width="3840" displayTitle="MPEG-H HEVC Video / 62963 kbps / 2160p / 23.976 fps / 16:9 / Main 10 Profile 5.1 High / 4:2:0 / 10 bits / HDR / BT.2020 (English)" />
<Stream id="53192" streamType="2" selected="1" default="1" codec="truehd" index="1" channels="8" language="English" languageCode="eng" audioChannelLayout="7.1" bitDepth="24" samplingRate="48000" title="Dolby Atmos/TrueHD Audio / 7.1-Atmos / 48 kHz / 3666 kbps / 16-bit" displayTitle="Dolby Atmos/TrueHD Audio / 7.1-Atmos / 48 kHz / 3666 kbps / 16-bit (English)" />
<Stream id="53193" streamType="2" codec="ac3" index="2" channels="6" bitrate="448" language="English" languageCode="eng" audioChannelLayout="5.1(side)" samplingRate="48000" title="Compatibility Track / Dolby Digital Audio / 5.1-EX / 48 kHz / 448 kbps" displayTitle="Compatibility Track / Dolby Digital Audio / 5.1-EX / 48 kHz / 448 kbps (English AC3)" />
<Stream id="53194" streamType="3" codec="pgs" index="3" language="English" languageCode="eng" title="SDH" displayTitle="SDH (English PGS)" />
<Stream id="53195" streamType="3" codec="pgs" index="4" language="&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;" languageCode="ara" displayTitle="&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577; (PGS)" />
<Stream id="53196" streamType="3" codec="pgs" index="5" language="&#20013;&#25991;" languageCode="chi" title="Mandarin Traditional" displayTitle="Mandarin Traditional (&#20013;&#25991; PGS)" />
<Stream id="53197" streamType="3" codec="pgs" index="6" language="&#20013;&#25991;" languageCode="chi" title="Cantonese" displayTitle="Cantonese (&#20013;&#25991; PGS)" />
<Stream id="53198" streamType="3" codec="pgs" index="7" language="&#268;esky" languageCode="cze" displayTitle="&#268;esky (PGS)" />
<Stream id="53199" streamType="3" codec="pgs" index="8" language="Dansk" languageCode="dan" displayTitle="Dansk (PGS)" />
<Stream id="53200" streamType="3" codec="pgs" index="9" language="Suomi" languageCode="fin" displayTitle="Suomi (PGS)" />
<Stream id="53201" streamType="3" codec="pgs" index="10" language="Fran&#231;ais" languageCode="fre" displayTitle="Fran&#231;ais (PGS)" />
<Stream id="53202" streamType="3" codec="pgs" index="11" language="Magyar" languageCode="hun" displayTitle="Magyar (PGS)" />
<Stream id="53203" streamType="3" codec="pgs" index="12" language="Italiano" languageCode="ita" displayTitle="Italiano (PGS)" />
<Stream id="53204" streamType="3" codec="pgs" index="13" language="&#54620;&#44397;&#50612;" languageCode="kor" displayTitle="&#54620;&#44397;&#50612; (PGS)" />
<Stream id="53205" streamType="3" codec="pgs" index="14" language="Norsk" languageCode="nor" displayTitle="Norsk (PGS)" />
<Stream id="53206" streamType="3" codec="pgs" index="15" language="polski" languageCode="pol" displayTitle="polski (PGS)" />
<Stream id="53207" streamType="3" codec="pgs" index="16" language="Portugu&#234;s" languageCode="por" title="Brazillian" displayTitle="Brazillian (Portugu&#234;s PGS)" />
<Stream id="53208" streamType="3" codec="pgs" index="17" language="Rom&#226;n&#259;" languageCode="rum" displayTitle="Rom&#226;n&#259; (PGS)" />
<Stream id="53209" streamType="3" codec="pgs" index="18" language="&#1088;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081; &#1103;&#1079;&#1099;&#1082;" languageCode="rus" displayTitle="&#1088;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081; &#1103;&#1079;&#1099;&#1082; (PGS)" />
<Stream id="53210" streamType="3" codec="pgs" index="19" language="Espa&#241;ol" languageCode="spa" title="Latin American" displayTitle="Latin American (Espa&#241;ol PGS)" />
<Stream id="53211" streamType="3" codec="pgs" index="20" language="Svenska" languageCode="swe" displayTitle="Svenska (PGS)" />
<Stream id="53212" streamType="3" codec="pgs" index="21" language="&#3652;&#3607;&#3618;" languageCode="tha" displayTitle="&#3652;&#3607;&#3618; (PGS)" />
<Stream id="53213" streamType="3" codec="pgs" index="22" language="T&#252;rk&#231;e" languageCode="tur" displayTitle="T&#252;rk&#231;e (PGS)" />
</Part>
</Media>
<Media videoResolution="4k" id="26101" duration="8397590" bitrate="37683" width="3840" height="2160" aspectRatio="1.78" audioChannels="8" audioCodec="truehd" videoCodec="hevc" container="mkv" videoFrameRate="24p" videoProfile="main 10">
<Part accessible="1" exists="1" id="26112" key="/library/parts/26112/1532680235/file.mkv" duration="8397590" file="W:\Movies\Ready.Player.One.2018.2160p.2.mkv" size="39556095187" container="mkv" videoProfile="main 10">
<Stream id="60285" streamType="1" default="1" codec="hevc" index="0" bitrate="28510" bitDepth="10" chromaSubsampling="4:2:0" colorPrimaries="bt2020" colorRange="tv" colorSpace="bt2020nc" colorTrc="smpte2084" frameRate="23.976" height="2160" level="153" profile="main 10" refFrames="1" width="3840" displayTitle="Unknown (HEVC Main 10)" />
<Stream id="60286" streamType="1" forced="1" codec="hevc" index="1" bitrate="64" bitDepth="10" chromaSubsampling="4:2:0" colorPrimaries="bt2020" colorRange="tv" colorSpace="bt2020nc" colorTrc="smpte2084" frameRate="23.976" height="1080" level="153" profile="main 10" refFrames="1" width="1920" displayTitle="Unknown (HEVC Main 10)" />
<Stream id="60287" streamType="2" selected="1" default="1" codec="truehd" index="2" channels="8" bitrate="3218" language="English" languageCode="eng" audioChannelLayout="7.1" bitDepth="24" samplingRate="48000" displayTitle="English (TRUEHD 7.1)" />
<Stream id="60288" streamType="2" codec="dca" index="3" channels="6" bitrate="1536" language="English" languageCode="eng" audioChannelLayout="5.1(side)" bitDepth="16" profile="ma" samplingRate="48000" displayTitle="English (DTS-HD MA 5.1(side))" />
<Stream id="60289" streamType="2" codec="ac3" index="4" channels="6" bitrate="384" language="English" languageCode="eng" audioChannelLayout="5.1(side)" samplingRate="48000" displayTitle="English (AC3 5.1(side))" />
<Stream id="60290" streamType="2" codec="ac3" index="5" channels="6" bitrate="384" language="Fran&#231;ais" languageCode="fre" audioChannelLayout="5.1(side)" samplingRate="48000" displayTitle="Fran&#231;ais (AC3 5.1(side))" />
<Stream id="60291" streamType="2" codec="dca" index="6" channels="6" bitrate="1536" language="Italiano" languageCode="ita" audioChannelLayout="5.1(side)" bitDepth="16" profile="ma" samplingRate="48000" displayTitle="Italiano (DTS-HD MA 5.1(side))" />
<Stream id="60292" streamType="2" codec="ac3" index="7" channels="6" bitrate="384" language="Espa&#241;ol" languageCode="spa" audioChannelLayout="5.1(side)" samplingRate="48000" displayTitle="Espa&#241;ol (AC3 5.1(side))" />
<Stream id="60293" streamType="3" codec="vobsub" index="8" bitrate="9" language="English" languageCode="eng" displayTitle="English (VOBSUB)" />
<Stream id="60294" streamType="3" codec="vobsub" index="9" bitrate="7" language="Fran&#231;ais" languageCode="fre" displayTitle="Fran&#231;ais (VOBSUB)" />
<Stream id="60295" streamType="3" codec="vobsub" index="10" bitrate="9" language="Italiano" languageCode="ita" displayTitle="Italiano (VOBSUB)" />
<Stream id="60296" streamType="3" codec="vobsub" index="11" bitrate="7" language="Espa&#241;ol" languageCode="spa" displayTitle="Espa&#241;ol (VOBSUB)" />
</Part>
</Media>

So, not really sure what the invalid param(8) means in this case.

Can you provide the entire log, please. The parameters would have been listed earlier. Although I think the issue is that you have a 4k video and the hw transcoder might not be capable of handling 4k.

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