Linux PMS fails to transcode HEVC 10 bit content if HW encoding is enabled (PMS 1.15.1.710 )

Server Version#: 1.15.1.710
Player Version#: Chrome Web Client 3.89.2

When hardware encoding is enabled, HEVC 10 bit content fails to transcode and fails to fall back to the software encoder/decoder. The following log errors are noted.
If HW encoding is disabled the software encoder handles the content just fine.

Mar 05, 2019 09:18:27.467 [0x7f12589d4700] ERROR - Extras: Preroll file didn’t exist or couldn’t be read: ‘’.
Mar 05, 2019 09:18:28.256 [0x7f12589d4700] ERROR - [Transcoder] [hevc @ 0x1adb700] No support for codec hevc profile 2.
Mar 05, 2019 09:18:28.257 [0x7f1246ffd700] ERROR - [Transcoder] [hevc @ 0x1adb700] Failed setup for format vaapi_vld: hwaccel initialisation returned error.

Would you please do the following:

  1. Verify DEBUG logging is enabled (VERBOSE is OFF)
  2. Recreate the failure
  3. Wait 30 seconds then download the log ZIP file
  4. Obtain the XML for the file played (Get Info -> View XML -> paste inline here as “Code”)
  5. Attach the ZIP file

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="4" librarySectionTitle="Movies" librarySectionUUID="4b0b3412-a258-40a4-91f5-14768c62196c" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1550857654">
<Video ratingKey="626756" key="/library/metadata/626756" guid="com.plexapp.agents.imdb://tt0120586?lang=en" librarySectionTitle="Movies" librarySectionID="4" librarySectionKey="/library/sections/4" studio="New Line Cinema" type="movie" title="American History X" contentRating="R" summary="A former neo-■■■■ skinhead tries to prevent his younger brother from going down the same wrong path that he did." rating="8.5" year="1998" tagline="Some Legacies Must End." thumb="/library/metadata/626756/thumb/1551631635" art="/library/metadata/626756/art/1551631635" duration="7133408" originallyAvailableAt="1998-10-30" addedAt="1551486839" updatedAt="1551631635" chapterSource="media" primaryExtraKey="/library/metadata/626757" ratingImage="imdb://image.rating">
<Media id="1852740" duration="7133408" bitrate="3286" width="1920" height="1080" aspectRatio="1.78" audioChannels="6" audioCodec="ac3" videoCodec="hevc" videoResolution="1080" container="mkv" videoFrameRate="24p" videoProfile="main 10">
<Part accessible="1" exists="1" id="1852964" key="/library/parts/1852964/1551486505/file.mkv" duration="7133408" file="/mnt/8TB/plexmedia/HD Movies/American History X (1998)/American History X (1998).mkv" size="2929932040" container="mkv" deepAnalysisVersion="2" requiredBandwidths="3772,3535,3335,3335,3335,3335,3335,3335" videoProfile="main 10">
<Stream id="3745653" streamType="1" default="1" codec="hevc" index="0" bitrate="2838" bitDepth="10" chromaSubsampling="4:2:0" colorPrimaries="bt709" colorRange="tv" colorSpace="bt709" colorTrc="bt709" frameRate="23.976" height="1080" level="120" profile="main 10" refFrames="1" requiredBandwidths="3313,3076,2879,2879,2879,2879,2879,2879" width="1920" displayTitle="1080p (HEVC Main 10)" />
<Stream id="3745654" streamType="2" selected="1" default="1" codec="ac3" index="1" channels="6" bitrate="448" language="English" languageCode="eng" audioChannelLayout="5.1(side)" requiredBandwidths="448,448,448,448,448,448,448,448" samplingRate="48000" displayTitle="English (AC3 5.1)" />
<Stream id="3745655" streamType="3" codec="vobsub" index="2" bitrate="12" language="English" languageCode="eng" requiredBandwidths="16,16,16,16,16,16,16,16" displayTitle="English (VOBSUB)" />
</Part>
</Media>
<Media id="1852744" duration="7133408" bitrate="3276" width="1920" height="1080" aspectRatio="1.78" audioChannels="6" audioCodec="ac3" videoCodec="hevc" videoResolution="1080" container="mp4" videoFrameRate="24p" optimizedForStreaming="0" has64bitOffsets="0" videoProfile="main 10">
<Part accessible="1" exists="1" id="1852968" key="/library/parts/1852968/1551488471/file.mp4" duration="7133408" file="/mnt/8TB/plexmedia/IOS/HD Movies/American History X (1998)/American History X (1998).mp4" size="2921449311" container="mp4" deepAnalysisVersion="2" has64bitOffsets="0" optimizedForStreaming="0" requiredBandwidths="3762,3524,3324,3324,3324,3324,3324,3324" videoProfile="main 10">
<Stream id="3745662" streamType="1" default="1" codec="hevc" index="0" bitrate="2824" bitDepth="10" chromaSubsampling="4:2:0" codecID="hvc1" colorPrimaries="bt709" colorRange="tv" colorSpace="bt709" colorTrc="bt709" frameRate="23.976" height="1080" level="120" profile="main 10" refFrames="1" requiredBandwidths="3313,3076,2879,2879,2879,2879,2879,2879" streamIdentifier="1" width="1920" displayTitle="1080p (HEVC Main 10)" />
<Stream id="3745663" streamType="2" selected="1" default="1" codec="ac3" index="1" channels="6" bitrate="448" language="English" languageCode="eng" audioChannelLayout="5.1(side)" requiredBandwidths="448,448,448,448,448,448,448,448" samplingRate="48000" streamIdentifier="2" displayTitle="English (AC3 5.1)" />
</Part>
</Media>
<Media id="1852751" duration="7133408" bitrate="3286" width="1920" height="1080" aspectRatio="1.78" audioChannels="6" audioCodec="ac3" videoCodec="hevc" videoResolution="1080" container="mkv" videoFrameRate="24p" videoProfile="main 10">
<Part accessible="1" exists="1" id="1852978" key="/library/parts/1852978/1551486505/file.mkv" duration="7133408" file="/mnt/12TB/plexmedia/HD Movies/American History X (1998)/American History X (1998).mkv" size="2929932040" container="mkv" deepAnalysisVersion="2" requiredBandwidths="3772,3535,3335,3335,3335,3335,3335,3335" videoProfile="main 10">
<Stream id="3745685" streamType="1" default="1" codec="hevc" index="0" bitrate="2838" bitDepth="10" chromaSubsampling="4:2:0" colorPrimaries="bt709" colorRange="tv" colorSpace="bt709" colorTrc="bt709" frameRate="23.976" height="1080" level="120" profile="main 10" refFrames="1" requiredBandwidths="3313,3076,2879,2879,2879,2879,2879,2879" width="1920" displayTitle="1080p (HEVC Main 10)" />
<Stream id="3745686" streamType="2" selected="1" default="1" codec="ac3" index="1" channels="6" bitrate="448" language="English" languageCode="eng" audioChannelLayout="5.1(side)" requiredBandwidths="448,448,448,448,448,448,448,448" samplingRate="48000" displayTitle="English (AC3 5.1)" />
<Stream id="3745687" streamType="3" codec="vobsub" index="2" bitrate="12" language="English" languageCode="eng" requiredBandwidths="16,16,16,16,16,16,16,16" displayTitle="English (VOBSUB)" />
</Part>
</Media>
<Genre id="287" filter="genre=287" tag="Drama" />
<Director id="63317" filter="director=63317" tag="Tony Kaye" />
<Writer id="63318" filter="writer=63318" tag="David McKenna" />
<Producer id="63366" filter="producer=63366" tag="John Morrissey" />
<Country id="28" filter="country=28" tag="USA" />
<Role id="21062" filter="actor=21062" tag="Edward Norton" role="Derek Vinyard" />
<Role id="63319" filter="actor=63319" tag="Edward Furlong" role="Danny Vinyard" />
<Role id="28741" filter="actor=28741" tag="Beverly D&#39;Angelo" role="Doris Vinyard" />
<Role id="63321" filter="actor=63321" tag="Jennifer Lien" role="Davina Vinyard" />
<Role id="48441" filter="actor=48441" tag="Ethan Suplee" role="Seth Ryan" />
<Role id="63322" filter="actor=63322" tag="Fairuza Balk" role="Stacey" />
<Role id="63320" filter="actor=63320" tag="Avery Brooks" role="Dr. Bob Sweeney" />
<Role id="63323" filter="actor=63323" tag="Elliott Gould" role="Murray" />
<Role id="20046" filter="actor=20046" tag="Stacy Keach" role="Cameron Alexander" />
<Role id="63325" filter="actor=63325" tag="William Russ" role="Dennis Vinyard" />
<Similar id="102787" filter="similar=102787" tag="Full Metal Jacket" />
<Similar id="97211" filter="similar=97211" tag="American Beauty" />
<Similar id="104769" filter="similar=104769" tag="■■■■■■" />
<Similar id="102785" filter="similar=102785" tag="GoodFellas" />
<Similar id="97215" filter="similar=97215" tag="Taxi Driver" />
<Similar id="102788" filter="similar=102788" tag="Scarface" />
<Similar id="97217" filter="similar=97217" tag="Reservoir Dogs" />
<Similar id="99853" filter="similar=99853" tag="Sin City" />
<Similar id="107313" filter="similar=107313" tag="The Big Lebowski" />
<Similar id="97210" filter="similar=97210" tag="American Psycho" />
<Similar id="107351" filter="similar=107351" tag="Gran Torino" />
<Similar id="102735" filter="similar=102735" tag="Casino" />
<Similar id="104768" filter="similar=104768" tag="The Usual Suspects" />
<Similar id="102744" filter="similar=102744" tag="L.A. Confidential" />
<Similar id="97214" filter="similar=97214" tag="The Machinist" />
<Similar id="97200" filter="similar=97200" tag="Requiem for a Dream" />
<Similar id="97209" filter="similar=97209" tag="Fargo" />
<Similar id="115541" filter="similar=115541" tag="25th Hour" />
<Similar id="102791" filter="similar=102791" tag="One Flew Over the Cuckoo&#39;s Nest" />
<Similar id="105718" filter="similar=105718" tag="The Devil&#39;s Advocate" />
<Extras size="1">
<Video ratingKey="626757" key="/library/metadata/626757" guid="iva://api.internetvideoarchive.com/2.0/DataService/VideoAssets(7909)?lang=en&amp;bitrates=80,212,450,750,1500,8000&amp;duration=138&amp;adaptive=1&amp;dts=0" type="clip" title="American History X" summary="" index="1" year="2013" thumb="/library/metadata/626757/thumb/1551486856" subtype="trailer" duration="138000" originallyAvailableAt="2013-11-13" addedAt="1551486856" extraType="1">
<Media id="1852741" duration="138000" bitrate="1500" width="1280" height="720" aspectRatio="1.78" audioCodec="aac" videoCodec="h264" videoResolution="720" container="mp4" premium="1">
<Part id="1852965" duration="138000" container="mp4" key="/services/iva/assets/7909/video.mp4?bitrate=1500" optimizedForStreaming="1">
<Stream id="3745656" streamType="1" codec="h264" index="0" bitrate="1500" height="720" width="1280" displayTitle="720p (H.264)" />
<Stream id="3745657" streamType="2" selected="1" codec="aac" index="1" channels="2" language="English" languageCode="eng" displayTitle="English (AAC Stereo)" />
</Part>
</Media>
<Media id="1852742" duration="138000" bitrate="750" width="640" height="480" aspectRatio="1.33" audioCodec="aac" videoCodec="h264" videoResolution="480" container="mp4" premium="1">
<Part id="1852966" duration="138000" container="mp4" key="/services/iva/assets/7909/video.mp4?bitrate=750" optimizedForStreaming="1">
<Stream id="3745658" streamType="1" codec="h264" index="0" bitrate="750" height="480" width="640" displayTitle="480p (H.264)" />
<Stream id="3745659" streamType="2" selected="1" codec="aac" index="1" channels="2" language="English" languageCode="eng" displayTitle="English (AAC Stereo)" />
</Part>
</Media>
<Media id="1852743" duration="138000" bitrate="450" width="640" height="480" aspectRatio="1.33" audioCodec="aac" videoCodec="h264" videoResolution="480" container="mp4" premium="1">
<Part id="1852967" duration="138000" container="mp4" key="/services/iva/assets/7909/video.mp4?bitrate=450" optimizedForStreaming="1">
<Stream id="3745660" streamType="1" codec="h264" index="0" bitrate="450" height="480" width="640" displayTitle="480p (H.264)" />
<Stream id="3745661" streamType="2" selected="1" codec="aac" index="1" channels="2" language="English" languageCode="eng" displayTitle="English (AAC Stereo)" />
</Part>
</Media>
</Video>
</Extras>
</Video>
</MediaContainer>

Plex Media Server Logs_2019-03-05_14-03-11.zip (33.9 KB)

Did you purge logs or remove files from that ZIP?
I am missing a lot of the information I expect to see.
Also, the LANG encoding of the PMS log is not UTF-8.

I purged prior to running the test. Here are the logs from a clean start with the test again. I hope these ones are better.Plex Media Server Logs_2019-03-05_15-03-30.zip (115.6 KB)

Thank you… Now it’s very clear.

HW HEVC transcoding does not exist in the i7-5xxx generation of processors.

Mar 05, 2019 15:02:25.388 [0x7fed89d6d700] INFO - Plex Media Server v1.15.1.710-ece95b3a1 - Ubuntu PC x86_64 - build: linux-x86_64 debian - GMT -06:00
Mar 05, 2019 15:02:25.388 [0x7fed89d6d700] INFO - Linux version: 18.04.2 LTS (Bionic Beaver), language: en-US
Mar 05, 2019 15:02:25.388 [0x7fed89d6d700] INFO - Processor Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
Mar 05, 2019 15:02:25.388 [0x7fed89d6d700] INFO - /usr/lib/plexmediaserver/Plex Media Server

The first to decode HEVC SDR (8-bit) is the -6xxx family.
The first to decode HEVC HDR (10-bit) is the -7xxx family.

Should it not fall back to SW encoding if HW is not available? Rather than just fail to work at all?

Yes it should. It also should know not to invoke HW transcoding at all.

I am still looking at your logs.

Two of us are looking at your logs. Definitely seeing something going on.

Is it possible to have the server idle so you can repeat the HEVC fallback scenario once more?

It will give us a clean set of logs and make it easier than trying to sift through the other sessions which are ongoing.

Nothing else was running when I did this test. LMK if you want me to make any changes to try to quiet it a bitPlex Media Server Logs_2019-03-05_16-00-45.zip (128.5 KB)

Any updates on this? I’ve noticed this bug still exists in the public release (1.15.2.793) as well

None at this time but also unable to reproduce the observations reliably

1 Like

Just chipping in that I have this exact same problem since the latest public update. Happy to help if you’re still having problems with this.

Has anyone tried the latest Beta ? 1.15.3.8xx ?

I’m running 1.15.3.876 and still have the same problem. Let me know if I can provide help, logs, etc.

Thanks for the input.

I have received info the transcoder updates are making their way toward QA now. We have a lot of testing prepared so it will be a bit before that’s ready but this is a lot of progress and looks good based on initial indications.

Any updates on if a fix is in the pipeline? This issue still exists in all versions I’ve tested.

Still this issue in the most recent 1.15.6.1079

Processor Intel® Core™ i7-4790 CPU @ 3.60GHz

CodecManager: obtaining decoder ‘hevc’
[Transcoder] [hevc @ 0x1c334c0] No support for codec hevc profile 2.
[Transcoder] [hevc @ 0x1c334c0] Failed setup for format vaapi_vld: hwaccel initialisation returned error.

It will always fail to transcode HEVC because you need at least a -6xxx processor to HW decode HEVC SDR and need a -7xxx processor to HW decode HEVC HDR

The -4xxx series has no support for HEVC.

This line is the error code from the processor’s ASIC

[Transcoder] [hevc @ 0x1c334c0] No support for codec hevc profile 2.

Failing to HW transcode HEVC is not the bug described here. The bug is the failure to fall back to software transcoding when hardware transcoding does not work.
Fixing the fallback means that people with a mixture of 10 bit HEVC and other content can keep HW transcoding enabled so that the content that does work can be HW transcoded and the 10 bit HEVC will fall back to software encoding.
Because of this bug we have to keep HW transcoding disabled as the fallback is not always working.

1 Like