PMS transcoding regression discussion

PMS transcoding regression discussion

In this thread we will identify / What’s wanted:

  1. Host platform (Hardware and OS w/ version)

  2. PMS version where the regression was identified

  3. Most recent known working version (if available)

  4. Specific <media> segment XML from video files (with sample if possible) which reproduces the problem. (Hover over item → Get Info → View XML)

  5. Steps to reproduce

  6. DEBUG log file ZIP which captures the failure.

  7. Sample file if possible (only needs to be 5-10 MB. Forum allows 35MB total)

What’s not wanted:

  1. No “Me too” posts. These will be removed.

  2. Off-Topic posts will be removed.

  3. Duplicate posts will be removed. Instead, “Like” the post(s) which match your issue.

Example post

  • Enabling HDR Tone Mapping results in SW transcode on Intel KabyLake
  1. Ubuntu 20.04.6 LTS
  2. PMS 1.32.6.7468-07e0d4a7e
  3. PMS 1.32.1.6999-91e1e2e2c
  4. XML
<Part accessible="1" exists="1" id="87" key="/library/parts/87/1622134243/file.mkv" duration="7139488" file="/vol/media/uhd/1917 (2019)/1917 (2019).mkv" size="69837447029" audioProfile="ma" container="mkv" deepAnalysisVersion="6" requiredBandwidths="111858,97058,94786,91065,89211,88184,86522,85077" videoProfile="main 10">
<Stream id="296" streamType="1" default="1" codec="hevc" index="0" bitrate="76271" language="English" languageTag="en" languageCode="eng" bitDepth="10" chromaLocation="topleft" 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="101554,89489,87216,83476,80974,79947,78323,77101" title="English" width="3840" displayTitle="4K HDR10 (HEVC Main 10)" extendedDisplayTitle="English (4K HDR10 HEVC Main 10)"> </Stream>
<Stream id="297" streamType="2" selected="1" default="1" codec="dca" index="1" channels="8" bitrate="1536" language="English" languageTag="en" languageCode="eng" audioChannelLayout="7.1" bitDepth="24" profile="ma" requiredBandwidths="4909,4697,4227,3950,3855,3816,3816,3816" samplingRate="48000" title="English / DTS-HD Master Audio / 7.1 / 48 kHz / 3 817 kbps / 24-bit (DTS Core: 5.1 / 48 kHz / 1509 kbps / 24-bit)" displayTitle="English (DTS-HD MA 7.1)" extendedDisplayTitle="English / DTS-HD Master Audio / 7.1 / 48 kHz / 3 817 kbps / 24-bit (DTS Core: 5.1 / 48 kHz / 1509 kbps / 24-bit)"> </Stream>
<Stream id="298" streamType="2" codec="ac3" index="2" channels="6" bitrate="448" language="English" languageTag="en" languageCode="eng" audioChannelLayout="5.1(side)" requiredBandwidths="448,448,448,448,448,448,448,448" samplingRate="48000" title="English" displayTitle="English (AC3 5.1)" extendedDisplayTitle="English (AC3 5.1)"> </Stream>
<Stream id="299" streamType="2" codec="truehd" index="3" channels="8" language="English" languageTag="en" languageCode="eng" audioChannelLayout="7.1" bitDepth="24" requiredBandwidths="5476,5117,4283,4027,3868,3839,3839,3839" samplingRate="48000" title="English" displayTitle="English (TRUEHD 7.1)" extendedDisplayTitle="English (TRUEHD 7.1)"> </Stream>
</Part>
</Media>
  1. Using attached 30 second sample,
    – HDR tonemapping enabled
    – HW transcoding does not engage, SW only
    – OpenCL errors seen in logs.
    – Turn HDR Tone mapping OFF
    – HW transcoding operates normally less HDR tone mapping.

attach sample video
attach DEBUG logs ZIP file

With thanks in advance

My thanks in advance to all who contribute here to helping us recover from the recent changes and moving forward again.

We’ve started that process but there’s a lot to identify and recover from.
With everyone’s help, we’ll get there quickly.

Thanks,
Chuck

4 Likes

OS: Ubuntu 22.04.3 LTS
PMS: 1.32.6.7468 (also had same behavior on last public release (that was replaced by 1.32.6.7468), not sure what version, before that I didnt have 4k HDR content so cant comment on when the issue started as I didnt attempt to play any). EDIT: Downgrading to 1.32.5.7349 fixed it.
Media XML: I am not sure how to access this? Please advise and Ill post it.
Sample: I dont have a sample. But it happens with every 4K HDR movie I have tried.
Steps: Play 4K HDR movie on a 1080p capable display (I am using Roku 4, also tried Roku Stick). HDR Tone mapping is enabled. CPU only transcoding is being used. Not seeing errors in logs. Just the buffering that happens:

<SegmentList>
<Segment duration="5006" startOffset="1803011" endOffset="1808017">
<File name="chunk-00000" type="av">
<FileVariant size="8424721" variant="b5b84741-1dc1-4cb9-a453-5d6da4ff8fcb" />
</File>
<Timelines>
<Transcode startTime="46" endTime="14680" complete="1" fileType="av" variant="b5b84741-1dc1-4cb9-a453-5d6da4ff8fcb" />
</Timelines>
</Segment>
</SegmentList>
<PlaybackReports>
<Playback startTime="1710" endTime="12463" state="buffering" progress="1803000" />
<Playback startTime="12463" endTime="12611" state="playing" progress="1803000" />
<Playback startTime="12611" endTime="12640" state="buffering" progress="1805430" />
<Playback startTime="12640" endTime="13626" state="playing" progress="1805430" />
<Playback startTime="13626" endTime="15848" state="buffering" progress="1806430" />
<Playback startTime="15848" endTime="19011" state="playing" progress="1806430" />
<Playback startTime="19011" endTime="19060" state="buffering" progress="1808934" />
</PlaybackReports>
<StateReports />
<StateReports />
</SessionReport>

With HDR Tone Mapping off, HW is being used CPU stays under 5%.

DEBUG LOGS:
Plex_Logs.zip (2.5 MB)

File’s MediaInfo:

Video
ID                          : 1
Format                      : HEVC
Format/Info                 : High Efficiency Video Coding
Format profile              : Main 10@L5@Main
HDR format                  : SMPTE ST 2086, HDR10 compatible
Codec ID                    : V_MPEGH/ISO/HEVC
Duration                    : 2 h 34 min
Bit rate                    : 2 724 kb/s
Width                       : 3 840 pixels
Height                      : 1 608 pixels
Display aspect ratio        : 2.40:1
Frame rate mode             : Constant
Frame rate                  : 23.976 (24000/1001) FPS
Color space                 : YUV
Chroma subsampling          : 4:2:0 (Type 2)
Bit depth                   : 10 bits
Bits/(Pixel*Frame)          : 0.018
Stream size                 : 2.94 GiB (81%)
Writing library             : x265 3.5+1-f0c1022b6:[Windows][GCC 10.2.0][64 bit] 10bit
Encoding settings           : cpuid=1111039 / frame-threads=4 / numa-pools=24 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x1608 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / repeat-headers / annexb / no-aud / no-eob / no-eos / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=240 / gop-lookahead=0 / bframes=4 / b-adapt=0 / b-pyramid / bframe-bias=0 / rc-lookahead=15 / lookahead-slices=8 / scenecut=40 / no-hist-scenecut / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=3 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=2 / selective-sao=4 / no-early-skip / rskip / fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=20.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 / chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,50) / cll=1522,161 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-sbrc / hdr10 / hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / scenecut-aware-qp=0conformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass / no-mcstf
Default                     : Yes
Forced                      : No
Color range                 : Limited
Color primaries             : BT.2020
Transfer characteristics    : PQ
Matrix coefficients         : BT.2020 non-constant
Mastering display color pri : BT.2020
Mastering display luminance : min: 0.0050 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 1522
MaxCLL_Original             : 1522 cd/m2
Maximum Frame-Average Light : 161
MaxFALL_Original            : 161 cd/m2

Audio #1
ID                          : 2
Format                      : AAC LC
Format/Info                 : Advanced Audio Codec Low Complexity
Codec ID                    : A_AAC-2
Duration                    : 2 h 34 min
Bit rate                    : 449 kb/s
Channel(s)                  : 6 channels
Channel layout              : C L R Ls Rs LFE
Sampling rate               : 48.0 kHz
Frame rate                  : 46.875 FPS (1024 SPF)
Compression mode            : Lossy
Delay relative to video     : 10 ms
Stream size                 : 496 MiB (13%)
Title                       : Surround
Language                    : English
Default                     : Yes
Forced                      : No

Thanks for the logs. I see it

  • “Failed to inject frame into filter network” (This is an OpenCL error)
data for stream #0:0
Sep 14, 2023 15:07:20.399 [139696635247416] ERROR - [TranscodeOutputStream] Session appears to have died from under us
Sep 14, 2023 15:07:21.486 [139696593464120] INFO - [Req#2b8c/Transcode] Preparing driver icr for GPU CoffeeLake-S GT2 [UHD Graphics 630]
Sep 14, 2023 15:07:21.487 [139696593464120] INFO - [Req#2b8c/Transcode] Preparing driver imd for GPU CoffeeLake-S GT2 [UHD Graphics 630]
Sep 14, 2023 15:07:21.600 [139696587135800] ERROR - [Req#2bbb/Transcode/ce04d764-0994-4ff6-8a09-1606cf035162-392/8b9cc999-d412-4781-842d-bbf18c96b0ef] [AVHWDeviceContext @ 0x7f533df788c0] Failed to get number of OpenCL platforms: -1001.
Sep 14, 2023 15:07:21.600 [139696589245240] ERROR - [Req#2bcb/Transcode/ce04d764-0994-4ff6-8a09-1606cf035162-392/8b9cc999-d412-4781-842d-bbf18c96b0ef] [AVHWDeviceContext @ 0x7f533df788c0] Failed to get number of OpenCL platforms: -1001.
Sep 14, 2023 15:07:21.601 [139696591354680] ERROR - [Req#2bcc/Transcode/ce04d764-0994-4ff6-8a09-1606cf035162-392/8b9cc999-d412-4781-842d-bbf18c96b0ef] [Parsed_hwmap_2 @ 0x7f534557ae40] Failed to created derived device context: -19.
Sep 14, 2023 15:07:21.601 [139696593464120] ERROR - [Req#2bcd/Transcode/ce04d764-0994-4ff6-8a09-1606cf035162-392/8b9cc999-d412-4781-842d-bbf18c96b0ef] [Parsed_hwmap_2 @ 0x7f534557ae40] Failed to configure output pad on Parsed_hwmap_2
Sep 14, 2023 15:07:21.604 [139696580774712] ERROR - [Req#2bce/Transcode/ce04d764-0994-4ff6-8a09-1606cf035162-392/8b9cc999-d412-4781-842d-bbf18c96b0ef] Error reinitializing filters!
Sep 14, 2023 15:07:21.604 [139696587135800] ERROR - [Req#2bcf/Transcode/ce04d764-0994-4ff6-8a09-1606cf035162-392/8b9cc999-d412-4781-842d-bbf18c96b0ef] Failed to inject frame into filter network: No such device
Sep 14, 2023 15:07:21.604 [139696589245240] ERROR - [Req#2bd0/Transcode/ce04d764-0994-4ff6-8a09-1606cf035162-392/8b9cc999-d412-4781-842d-bbf18c96b0ef] Error while processing the decoded data for stream #0:0
Sep 14, 2023 15:07:23.689 [139696591354680] WARN - Range could not be satisfied 702 - 0 (total size=-1)

1.32.5.7210 will work for you if you want HW tonemapping back immediately.

request: Please turn DEBUG logging on when we’re testing/debugging. WARN/ERROR statements alone don’t help much but we did get lucky here

Oh I guess I turned on the wrong debugging on… oops

image

Also downgraded to 1.32.5.7349 and it works there. not sure if this is a beta build or what I couldnt find official repository of builds so found a random github that archives them.

Settings → Server_Name → General + Show Advanced

You can check the announcement thread to check beta vs public release.

How to get XML:

https://support.plex.tv/articles/201998867-investigate-media-information-and-formats/

How to generate a sample:

https://support.plex.tv/articles/201035968-generating-sample-files-from-media/

Sample (had to zip, wont let upload .mkv and upload file size limit is 8M):
Indiana Jones and the Dial of Destiny (2023)_Sample.zip (7.0 MB)

XML:

<Part accessible="1" exists="1" id="95169" key="/library/parts/95169/1694029793/file.mkv" duration="9267935" file="/mnt/sda/Films/Indiana_Jones/Indiana_Jones_and_the_Dial_of_Destiny_2023.mkv" size="3901442858" audioProfile="lc" container="mkv" videoProfile="main 10">
<Stream id="233903" streamType="1" default="1" codec="hevc" index="0" bitrate="3176" bitDepth="10" chromaLocation="topleft" chromaSubsampling="4:2:0" codedHeight="1608" codedWidth="3840" colorPrimaries="bt2020" colorRange="tv" colorSpace="bt2020nc" colorTrc="smpte2084" frameRate="23.976" height="1608" level="150" profile="main 10" refFrames="1" width="3840" displayTitle="4K HDR10 (HEVC Main 10)" extendedDisplayTitle="4K HDR10 (HEVC Main 10)"> </Stream>
<Stream id="233904" streamType="2" selected="1" default="1" codec="aac" index="1" channels="6" bitrate="449" language="English" languageTag="en" languageCode="eng" audioChannelLayout="5.1" profile="lc" samplingRate="48000" title="Surround" displayTitle="English (AAC 5.1)" extendedDisplayTitle="Surround (English AAC 5.1)"> </Stream>
<Stream id="233905" streamType="2" codec="ac3" index="2" channels="2" bitrate="192" language="Russian" languageTag="ru" languageCode="rus" audioChannelLayout="stereo" samplingRate="48000" title="Dub, MovieDalen" displayTitle="Russian (AC3 Stereo)" extendedDisplayTitle="Dub, MovieDalen (Russian AC3 Stereo)"> </Stream>
<Stream id="233906" streamType="3" selected="1" default="1" forced="1" codec="srt" index="3" bitrate="0" language="English" languageTag="en" languageCode="eng" displayTitle="English Forced (SRT)" extendedDisplayTitle="English Forced (SRT)"> </Stream>
<Stream id="233907" streamType="3" default="1" codec="srt" index="4" bitrate="0" language="English" languageTag="en" languageCode="eng" title="English Full" displayTitle="English (SRT)" extendedDisplayTitle="English Full (SRT)"> </Stream>
<Stream id="233908" streamType="3" default="1" forced="1" codec="srt" index="5" bitrate="0" language="Russian" languageTag="ru" languageCode="rus" displayTitle="Russian Forced (SRT)" extendedDisplayTitle="Russian Forced (SRT)"> </Stream>
<Stream id="233909" streamType="3" default="1" codec="srt" index="6" bitrate="0" language="Russian" languageTag="ru" languageCode="rus" displayTitle="Russian (SRT)" extendedDisplayTitle="Russian (SRT)"> </Stream>
</Part>

ALL:

From this point forward, please refer to the following thread as we recover from the problem.

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