Severe banding with HDR movies and external .srt subtitles played on non-HDR TV

Hi I was happy too early after Infuse published the 5.6.11 which solved the bug introduced by Apple with tvOS 11.3 regarding the playback of HDR content on non-HDR TVs.
However I’ve stumbled upon another bug in this case (HDR on non-HDR TVs) but this time linked with external subtitles. I have a UHD HDR BluRay ripped on my NAS which I have bought from abroad (Amazon) hence it did not come with an embedded subtitle for my native language. I’ve googled the net, found a srt subtitle and adjusted it myself for the ripped movie. However everytime I play the movie with the external subtitle load I get severe black banding around the subtitle which sometimes even make the movie jerky while if I load an embedded PGS English subtitle everything is perfect. This only happens when I play this HDR movie on my non-HDR 1080p TV, if I play it on my SONY HDR TV everything looks perfect. I have attached 2 screenshots, one with the external srt loaded and banding visible and one with an embedded PGS subtitle where everything is perfect. Can you guys please have a look on this?

Hmm - is this affecting all SRT subtitles, or just a few?

Hi James and thanks for reply, I have downloaded another .srt subtitle for the same movie and there is no improvement, banding is still there. My guess is that might be something related to the movie. I only have 2 HDR movies for the moment (just building my collection and Amazon is painfully slow to deliver overseas) but the .srt subtitles for the second movie are displaying fine.

The one for which .srt display ok is the one for which I reencoded the movie for a lower size:

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Commercial name : HDR10
Format profile : Main 10@L5.1@High
Codec ID : V_MPEGH/ISO/HEVC
Duration : 2 h 12 min
Bit rate : 13.5 Mb/s
Width : 3 840 pixels
Height : 1 600 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.092
Stream size : 12.5 GiB (75%)
Writing library : x265 2.5+27-0e168bdeb48b:[Windows][GCC 6.2.1][64 bit] 10bit
Encoding settings : cpuid=1173503 / frame-threads=4 / numa-pools=20 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x1600 / interlace=0 / total-frames=191145 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=1 / keyint=24 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / no-strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=-3:-3 / no-sao / no-sao-non-deblock / rd=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / analysis-reuse-mode=0 / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=17.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / 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(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50) / max-cll=3173,484 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / opt-qp-pps / opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / hdr / hdr-opt / no-dhdr10-opt / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : BT.709
Mastering display luminance : min: 0.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level : 3173 cd/m2
Maximum Frame-Average Light Level : 484 cd/m2

The one for which the srt shows the severe banding is an exact copy of the stream from the UHD disk:

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Commercial name : HDR10
Format profile : Main 10@L5.1@High
Codec ID : V_MPEGH/ISO/HEVC
Duration : 1 h 44 min
Bit rate : 58.2 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
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.292
Stream size : 42.6 GiB (90%)
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : BT.709
Mastering display luminance : min: 0.0050 cd/m2, max: 1000 cd/m2

Hi again James,

I have asked a friend to borrow me 2 other UHD disks and it seems that my guess is confirmed:

  1. .srt subtitles creates heavy black banding and movie jerking on mkvs which are exact copy of the stream found on the UHD disk
  2. everything plays fine if the movie is re-encoded using x265
    all these happening only with HDR movies played on non-HDR TVs.

And I have attached also the print screens to prove my finding.

Hi James, did you managed to replicate the issue?

Not having any luck replicating this here. :frowning: Attached is a screenshot of a full 4K HDR video, with external SRT subtitles, played in 1080p SDR.

Would you be able to send in a sample video/subtitle you are seeing this with?

Thanks, I’ll upload one in couple of hours.

Hi again James, I have just uploaded the sample file through the link that you provided. Thanks a lot in advance and keep up the excellent job that you are doing!

Hi James,

Did you manage to replicate the issue with the sample that I have uploaded?

Hi again,

Checked with Infuse 5.7, the issue is still present: black band behind srt subtitles and jerky video.

5.7.1 was submitted to Apple today with a number of improvements for HDR subtitles, and this may help with what is going on here. :slight_smile:

Thanks a lot James, I will check when it’s released and report back.

Wow, that was quick, now 5.7.2 with on deck, can’t wait, great work.