1.18.5.2309 - some videos fail HW decoding

Server Version#: 1.18.5.2309
Player Version#: ios 6.7 beta

HW decoding working - movie 1

image

HW decoding failing - movie 2

image

logs attached
Plex Media Server Logs_2020-01-29_10-28-08.zip (6.4 MB)

culprit perhaps?

[Transcoder] [h264 @ 0x2ed6b80] decoder->cvdl->cuvidCreateDecoder(&decoder->decoder, params) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
[Transcoder] [h264 @ 0x2ed6b80] Failed setup for format cuda: hwaccel initialisation returned error.

more details;
debian/proxmox baremetal (version to be provided later)
gpu: nvidia 1650
gpu drivers (to be provided later)
ram 64g
cpu 2x xeon, 6 core, 24 thread total

Proxmox - Not supported.
Any way to test in a Debian/Redhat environment?

proxmox is debian.

I can’t see how it isn’t supported, its linux, and wasn’t one of the points of the recent repacking to support as many linux distros/types/versions as possible?

1 Like

Tekno, it may be a Debian-based distro but that doesn’t mean it passed the tests and added. Mint and Peppermint are Ubuntu derivatives of Ubuntu and extremely problematic running Plex. Those two distros aren’t on the supported list either.

If it works, great. If not then I’m sorry.

Proxmox was/is such a pain that a user contributed how to set it up which I added to the Linux-Tips

With the new packaging, I expect things to go a lot smoother but that bridge will be crossed when we get there, true?

Hi Chuck, but I am not running it in a container.

As far as plex and every other linux app is concerned, its bog debian.

I run other apps in containers/vms.

Not plex.

fwiw, here are the xml for the 2 files pictured in OP

hw decode failing

<Media id="363581" duration="7160201" bitrate="7743" width="1280" height="536" aspectRatio="2.35" audioChannels="6" audioCodec="dca" videoCodec="h264" videoResolution="720" container="mkv" videoFrameRate="24p" audioProfile="dts" videoProfile="high">
<Part accessible="1" exists="1" id="1197270" key="/library/parts/1197270/1533600000/file.mkv" duration="7160201" file="/data/media/movies/Deadpool 2 (2018)/Deadpool 2 (2018) [Bluray-720p x264 DTS 5.1].mkv" size="6900719592" audioProfile="dts" container="mkv" deepAnalysisVersion="4" indexes="sd" requiredBandwidths="12487,11883,11263,10691,10120,9637,8361,8361" videoProfile="high">
<Stream id="2167712" streamType="1" default="1" codec="h264" index="0" bitrate="6187" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="544" codedWidth="1280" frameRate="23.976" hasScalingMatrix="0" headerCompression="1" height="536" level="41" profile="high" refFrames="12" requiredBandwidths="10974,10337,9729,9158,8586,8099,6835,6835" scanType="progressive" width="1280" displayTitle="720p (H.264)"/>
<Stream id="2167713" streamType="2" selected="1" default="1" codec="dca" index="1" channels="6" bitrate="1509" language="English" languageCode="eng" audioChannelLayout="5.1(side)" bitDepth="24" headerCompression="1" profile="dts" requiredBandwidths="1509,1509,1509,1509,1509,1509,1509,1509" samplingRate="48000" displayTitle="English (DTS 5.1)"/>
<Stream id="2167714" streamType="3" selected="1" default="1" codec="pgs" index="2" bitrate="47" language="English" languageCode="eng" headerCompression="1" requiredBandwidths="56,56,56,56,56,56,56,56" displayTitle="English (PGS)"/>
<Stream id="2186753" key="/library/streams/2186753" streamType="3" codec="srt" format="srt" displayTitle="Unknown (SRT External)"/>
</Part>
</Media>

working hw decode

<Media id="694167" duration="6486238" bitrate="7235" width="1280" height="536" aspectRatio="2.35" audioChannels="6" audioCodec="dca" videoCodec="h264" videoResolution="720" container="mkv" videoFrameRate="24p" audioProfile="dts" videoProfile="high">
<Part accessible="1" exists="1" id="1197507" key="/library/parts/1197507/1461542400/file.mkv" duration="6486238" file="/data/media/movies/Deadpool (2016)/Deadpool (2016) [Bluray-720p x264 DTS 5.1].mkv" size="5871683960" audioProfile="dts" container="mkv" deepAnalysisVersion="4" indexes="sd" requiredBandwidths="14848,11615,10805,9668,8532,7668,7668,7668" videoProfile="high">
<Stream id="2169151" streamType="1" default="1" codec="h264" index="0" bitrate="5726" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="544" codedWidth="1280" frameRate="23.976" hasScalingMatrix="0" height="536" level="41" profile="high" refFrames="5" requiredBandwidths="13337,10105,9295,8158,7022,6168,6168,6168" scanType="progressive" width="1280" displayTitle="720p (H.264)"/>
<Stream id="2169152" streamType="2" selected="1" default="1" codec="dca" index="1" channels="6" bitrate="1509" audioChannelLayout="5.1(side)" bitDepth="24" profile="dts" requiredBandwidths="1509,1509,1509,1509,1509,1509,1509,1509" samplingRate="48000" displayTitle="Unknown (DTS 5.1)"/>
<Stream id="2169153" streamType="3" default="1" forced="1" codec="ass" index="2" requiredBandwidths="1,1,1,1,1,1,1,1" displayTitle="Unknown Forced (ASS)"/>
<Stream id="2186489" key="/library/streams/2186489" streamType="3" selected="1" codec="srt" format="srt" displayTitle="Unknown (SRT External)"/>
</Part>
</Media>

the main difference I see is 12 reference frames in the failing video, versus 5 reference frames for the working video.

That’s never been tried.

If I remember ProxMox correctly, (I may be wrong here), aren’t permissions still tightly controlled to the point you need allow things like the hardware / udev ?

AUR linux is just redhat and there’s no way that’ll run.

I see the ASS subtitles. (XML you just added)

What happens when you don’t have them in play?

it’s actually the PGS subtitles video with the problem, I disabled them, then whole pms appeared to crash (or otherwise non-responsive), ugh.

I’ll have to wait til I’m home later to reproduce.

remotely restarted PMS.

played problem video without PGS subtitles, still no HW decode.

logs with fresh startup and 1 problem video played.

Plex Media Server Logs_2020-01-29_12-18-22.zip (6.2 MB)

For what it’s worth, I think you’re on to something regarding the reference frames. I was helping another forum user a while back (I’ll try to find the thread); they were experiencing playback issues on videos encoded with (I believe) 8 reference frames. Their other files encoded with 4 (or 5?) played fine. I can’t remember what the ultimate solution to the issue was, but they either re-encoded the files from master themselves or obtained different versions elsewhere.

[Edit]
Found the thread. It’s a somewhat different problem. In their case, the higher reference frames count was causing the file to be transcoded instead of direct played.

1 Like

Nice catch.

Mine is not transcoding (necessarily) because of the references frames, but because I am currently remote/cellular.

But I will check same movie again on LAN and see if it will direct play or be forced to transcode.

Either way, there is some kind of error happening with the decoder (see OP) for this video.

I have seen other videos do the same thing (hw decode fail), but this one I happened to catch and have the time/energy to post about it.

fwiw, the problem video direct plays fine on lan, on IOS client.

Just some observations…

Being the curious type, I spent some time tonight attempting to reproduce this issue on my Linux system (Pop!_OS 19.10) using Intel Quick Sync Video, running on a lowly Atom x5-Z8300 CPU.

My first step was to try to get HandBrakeCLI to produce a file with similar media properties to the “bad” one above: 1280x7210, H.264, high/4.1/ref frames=12/23.976 FPS. HandBrake got most of the way there, using the Jellyfish 110 Mbps, HD, H.264 file as the source, and the following command:
HandBrakeCLI -i jellyfish-110-mbps-hd-h264.mkv -o jellyfish-110-mbps-hd-h264-ref12-1280x720-23.976fps.mkv -e x264 -x level=4.1:ref=12 -w 1280 -l 720 -r 23.976

I say almost, because it refuses to use level 4.1. Doing so violates some internal constraint, so it forces the output to level 5.0:

x264 [warning]: DPB size (12 frames, 43200 mbs) > level limit (9 frames, 32768 mbs)

The resultant file, with all other parameters intact, plays fine on my test system; and I can transcode to whatever resolution/bitrate I like.

So I’m curious if the transcoder, when using Nvidia hardware acceleration, is failing the same test and refusing to transcode. Maybe it would do the same with QSV, if I could get HB to encode the file using the requested level. Perhaps it won’t do so to prevent just such failures from occurring.

At any rate, I know very little about video encoding and decoding, only what I’ve observed. I tried to find some concrete documentation that HB’s assertion that level 4.1 + 12 ref frames = bad is true, but was unable to. The closest I found was a Wikipedia article describing Decoded Picture Buffering (DPB) and its constraints as they relate to reference frames.

1 Like

Yeah, I am gonna call it a bad encode and move on I guess.

1 Like

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