CCwGTV 4k HDR HEVC sometimes transcodes to H264 and sometimes direct plays

I’ve noticed odd behavior with some of my media on a CCwGTV.

I have two different 4k HDR HEVC video files that have very similar details:

Red Notice:

Media

  • Duration 1:57:59
  • Bitrate 1618 kbps
  • Width 3840
  • Height 2160
  • Aspect Ratio 1.78
  • Video Resolution 4K
  • Container MKV
  • Video Frame Rate 24p
  • Audio Profile lc
  • Video Profile main 10

Part

  • Duration 1:57:59
  • File Red.Notice.mkv
  • Size 1.33 GB
  • Audio Profile lc
  • Container MKV
  • Video Profile main 10

Codec HEVC

  • Bitrate 1618 kbps
  • Bit Depth 10
  • Chroma Location left
  • Chroma Subsampling 4:2:0
  • Coded Height 2160
  • Coded Width 3840
  • Color Primaries bt2020
  • Color Range tv
  • Color Space bt2020nc
  • Color Trc smpte2084
  • Frame Rate 24 fps
  • Height 2160
  • Level 5.0
  • Profile main 10
  • Ref Frames 1
  • Scan Type progressive
  • Width 3840
  • Display Title 4K HDR10 (HEVC Main 10)
  • Extended Display Title 4K HDR10 (HEVC Main 10)

Codec AAC

  • Channels 6
  • Language English
  • Language Tag en
  • Audio Channel Layout 5.1
  • Profile lc
  • Sampling Rate 48000 Hz
  • Display Title English (AAC 5.1)
  • Extended Display Title English (AAC 5.1)

Codec SRT

  • Language English
  • Language Tag en
  • Display Title English (SRT)
  • Extended Display Title English (SRT)

Harry Potter:

Media

  • Duration 2:32:21
  • Bitrate 1560 kbps
  • Width 3840
  • Height 2160
  • Aspect Ratio 1.78
  • Video Resolution 4K
  • Container MKV
  • Video Frame Rate 24p
  • Audio Profile lc
  • Video Profile main 10

Part

  • Duration 2:32:21
  • File Harry.Potter.and.the.Sorcerers.Stone.mkv
  • Size 1.66 GB
  • Audio Profile lc
  • Container MKV
  • Video Profile main 10

Codec HEVC

  • Bitrate 1560 kbps
  • Language English
  • Language Tag en
  • Bit Depth 10
  • Chroma Location left
  • Chroma Subsampling 4:2:0
  • Coded Height 2160
  • Coded Width 3840
  • Color Primaries bt2020
  • Color Range tv
  • Color Space bt2020nc
  • Color Trc smpte2084
  • Frame Rate 23.976 fps
  • Height 2160
  • Level 5.0
  • Profile main 10
  • Ref Frames 1
  • Title MPEG-H HEVC Video / 60681 kbps / 2160p / 23.976 fps / 16:9 / Main 10 Profile 5.1 High / 4:2:0 / 10 bits / HDR / BT.2020
  • Width 3840
  • Display Title 4K HDR10 (HEVC Main 10)
  • Extended Display Title MPEG-H HEVC Video / 60681 kbps / 2160p / 23.976 fps / 16:9 / Main 10 Profile 5.1 High / 4:2:0 / 10 bits / HDR / BT.2020

Codec AAC

  • Channels 8
  • Bitrate 4342 kbps
  • Language English
  • Language Tag en
  • Audio Channel Layout 7.1
  • Profile lc
  • Sampling Rate 48000 Hz
  • Title DTS:X/DTS-HD Master Audio / 7.1-X / 48 kHz / 4342 kbps / 24-bit
  • Display Title English (AAC 7.1)
  • Extended Display Title DTS:X/DTS-HD Master Audio / 7.1-X / 48 kHz / 4342 kbps / 24-bit (English AAC)

Here is what the playback session on a CCwGTV looks like according to Tautulli:

Red Notice:

Harry Potter:

When I start playing Red Notice, it tries to direct play everything, but it stutters, and eventually freezes, and then the streams get transcoded as shown above. This is with subtitles off. If subtitles are on, then whether it tries to burn it or not, playback freezes every few seconds (but the transcode session looks similar).

I’ve attached the logs for Red Notice.
Red Notice.log (293.6 KB)

I didn’t save the logs for Harry Potter when it direct played, but I just tried again and it now has the same situation as Red Notice:

Harry Potter.log (276.6 KB)

If I play either of these on an actual Google TV (not a Chromecast) it direct streams the video.

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

What???
image

It should not be transcoding that high. Can you post the XML info for these videos?

I don’t have those files anymore, but the same thing happened on a different file that I put below.

It seems like there are actually 2 issues:

  1. The crazy high bitrate as described above
  2. If I force nvenc/nvdec by using HardwareDevicePath="/dev/dri/renderD129" in Preferences.xml then the media is direct played, which causes the ccwgtv to freeze every second (I’m assuming because the TV is not HDR, and playing back HDR content is causing issues). If I then force subtitles to be burned, it reverts to the behavior from #1
<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="2" librarySectionTitle="TV Shows" librarySectionUUID="93945e1b-ced2-4936-a382-b4da580fdca0" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1663263195">
  <Video ratingKey="66753" key="/library/metadata/66753" parentRatingKey="66736" grandparentRatingKey="66735" guid="plex://episode/622f595ff395de75897a1ab5" parentGuid="plex://season/606ee67a38270f002c06cbcf" grandparentGuid="plex://show/5d9c09154eefaa001f5e7cd2" type="episode" title="Adrift" grandparentKey="/library/metadata/66735" parentKey="/library/metadata/66736" librarySectionTitle="TV Shows" librarySectionID="2" librarySectionKey="/library/sections/2" grandparentTitle="The Lord of the Rings: The Rings of Power" parentTitle="Season 1" contentRating="TV-14" summary="Galadriel finds a new ally; Elrond faces a cold reception from an old friend; Nori endeavors to help a Stranger; Arondir searches for answers while Bronwyn warns her people of a threat." index="2" parentIndex="1" audienceRating="6.4" viewCount="1" skipCount="1" lastViewedAt="1663316824" thumb="/library/metadata/66753/thumb/1663332459" art="/library/metadata/66735/art/1662110922" parentThumb="/library/metadata/66736/thumb/1662110922" grandparentThumb="/library/metadata/66735/thumb/1662110922" grandparentArt="/library/metadata/66735/art/1662110922" duration="4022443" originallyAvailableAt="2022-09-01" addedAt="1662122366" updatedAt="1663332459" audienceRatingImage="themoviedb://image.rating" chapterSource="media">
    <Media id="99699" duration="4022443" bitrate="1899" width="3840" height="1600" aspectRatio="2.35" audioChannels="6" audioCodec="aac" videoCodec="hevc" videoResolution="4k" container="mkv" videoFrameRate="24p" audioProfile="lc" videoProfile="main 10">
      <Part accessible="1" exists="1" id="124468" key="/library/parts/124468/1662122361/file.mkv" duration="4022443" file="/disks/storage/plex_tv/The Lord Of The Rings The Rings Of Power/Season 1/The.Lord.of.the.Rings.The.Rings.of.Power.S01E02.Adrift.2160p.AMZN.WEB-DL.DDP5.1.HDR.H.265-NTb.x265.fdk.mkv" size="954964625" audioProfile="lc" container="mkv" deepAnalysisVersion="6" requiredBandwidths="7877,6481,5122,4366,4366,4366,4366,4366" videoProfile="main 10">
        <Stream id="299534" streamType="1" default="1" codec="hevc" index="0" bitrate="1899" bitDepth="10" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="1600" codedWidth="3840" colorPrimaries="bt2020" colorRange="tv" colorSpace="bt2020nc" colorTrc="smpte2084" frameRate="24.000" height="1600" level="150" profile="main 10" refFrames="1" requiredBandwidths="7387,5992,4633,3892,3892,3892,3892,3892" scanType="progressive" width="3840" displayTitle="4K HDR10 (HEVC Main 10)" extendedDisplayTitle="4K HDR10 (HEVC Main 10)"> </Stream>
        <Stream id="299537" streamType="2" selected="1" default="1" codec="aac" index="3" channels="6" bitrate="576" language="English" languageTag="en" languageCode="eng" audioChannelLayout="5.1" profile="lc" requiredBandwidths="489,489,489,489,489,489,489,489" samplingRate="48000" displayTitle="English (AAC 5.1)" extendedDisplayTitle="English (AAC 5.1)"> </Stream>
        <Stream id="299535" streamType="3" selected="1" default="1" codec="srt" index="1" bitrate="0" language="English" languageTag="en" languageCode="eng" requiredBandwidths="1,1,1,1,1,1,1,1" displayTitle="English (SRT)" extendedDisplayTitle="English (SRT)"> </Stream>
        <Stream id="299536" streamType="3" codec="srt" index="2" bitrate="0" language="English" languageTag="en" languageCode="eng" requiredBandwidths="1,1,1,1,1,1,1,1" title="SDH" displayTitle="English (SRT)" extendedDisplayTitle="SDH (English SRT)"> </Stream>
      </Part>
    </Media>
  </Video>
</MediaContainer>

Can you provide the server log for playing back this video?

I’ll try it again tomorrow night to get clean logs. Some of my users don’t listen when I tell them to stop streaming so I can test something :smile:

Haha. No need to have them stop. Just let me know what video you tested and the approximate time so I can find it in the log.

Two people are watching that same video with different settings on different players so it gets very confusing.

I removed HardwareDevicePath="/dev/dri/renderD129" so I could test all the different scenarios.

What I could get from the log is that it’s getting a -1 error from VAAPI (still not sure what’s going on there; possibly a device issue because intel_gpu_top isn’t finding any iGPU either) and falling back to nvenc/nvdec.

If I leave everything as is (quality set to original, no subtitles) then it tries to direct play, which causes the freezing every second. Sometimes after a few seconds it transcodes x265 4K HDR → x264 4K SDR, and then it works fine, but sometimes it doesn’t and just keeps freezing.

In the scenario where it starts transcoding, if I turn on subtitles it burns them (even though my setting is to only burn subtitles for image formats), has a high bitrate, and buffers every ~30 seconds.

In the scenario where it freezes every second without subtitles, if I try to change the quality for that session to something other than original (and I can only choose 560p or lower; no 4k, 1080, or 720 options), the stream immediately ends, and the file is marked as having been watched.

If I change the player’s quality settings to 20mpbs then it transcodes, but everything works fine with a higher bitrate, but not as high as before.

I’ll get the logs for each of these scenarios ASAP (likely Sat night or Sunday).

Sent logs privately

Can you send me the xml info for that video too?

<Media id="99699" duration="4022443" bitrate="1899" width="3840" height="1600" aspectRatio="2.35" audioChannels="6" audioCodec="aac" videoCodec="hevc" videoResolution="4k" container="mkv" videoFrameRate="24p" audioProfile="lc" videoProfile="main 10">
<Part accessible="1" exists="1" id="124468" key="/library/parts/124468/1662122361/file.mkv" duration="4022443" file="/disks/storage/plex_tv/The Lord Of The Rings The Rings Of Power/Season 1/The.Lord.of.the.Rings.The.Rings.of.Power.S01E02.Adrift.2160p.AMZN.WEB-DL.DDP5.1.HDR.H.265-NTb.x265.fdk.mkv" size="954964625" audioProfile="lc" container="mkv" deepAnalysisVersion="6" requiredBandwidths="7877,6481,5122,4366,4366,4366,4366,4366" videoProfile="main 10">
<Stream id="299534" streamType="1" default="1" codec="hevc" index="0" bitrate="1899" bitDepth="10" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="1600" codedWidth="3840" colorPrimaries="bt2020" colorRange="tv" colorSpace="bt2020nc" colorTrc="smpte2084" frameRate="24.000" height="1600" level="150" profile="main 10" refFrames="1" requiredBandwidths="7387,5992,4633,3892,3892,3892,3892,3892" scanType="progressive" width="3840" displayTitle="4K HDR10 (HEVC Main 10)" extendedDisplayTitle="4K HDR10 (HEVC Main 10)"> </Stream>
<Stream id="299537" streamType="2" selected="1" default="1" codec="aac" index="3" channels="6" bitrate="576" language="English" languageTag="en" languageCode="eng" audioChannelLayout="5.1" profile="lc" requiredBandwidths="489,489,489,489,489,489,489,489" samplingRate="48000" displayTitle="English (AAC 5.1)" extendedDisplayTitle="English (AAC 5.1)"> </Stream>
<Stream id="299535" streamType="3" selected="1" default="1" codec="srt" index="1" bitrate="0" language="English" languageTag="en" languageCode="eng" requiredBandwidths="1,1,1,1,1,1,1,1" displayTitle="English (SRT)" extendedDisplayTitle="English (SRT)"> </Stream>
<Stream id="299536" streamType="3" codec="srt" index="2" bitrate="0" language="English" languageTag="en" languageCode="eng" requiredBandwidths="1,1,1,1,1,1,1,1" title="SDH" displayTitle="English (SRT)" extendedDisplayTitle="SDH (English SRT)"> </Stream>
</Part>
</Media>

Can yo play that file again right now and see if it’s different? Get me that log if it still doesn’t work right.

Still playing at a high bitrate. Sending logs now.

In case I haven’t mentioned before, this seems to be happening exclusively on a ccwgtv connected to a 4k non HDR TV.

Thanks. Would you be able to get me the android logs from the Google device?

Sending privately

Sorry for the delay. Something odd is going on when you play videos at original quality. For some odd reason the app is requesting a really high bitrate from PMS. i.e. it’s upscaling the video. But it’s picking a really high bitrate so your server is having issues keeping up. I can’t recreate the issue. My guess is there is something odd with the way your videos are being encoded so that PMS can’t analyze it properly. When it needs to transcode, it just ends up picking a high value to ensure it’s not losing any quality.

Do you have a smallish file (<1GB) that causes this issue so I can pass it along to the devs to look at?

No worries, thanks for all the help.

The whole file is about 900mb. Can I upload it here?