justdan96 / tsMuxer

tsMuxer is a transport stream muxer for remuxing/muxing elementary streams, EVO/VOB/MPG, MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264/AVC, H.265/HEVC, VC-1, MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD.
Apache License 2.0
836 stars 140 forks source link

Remux STDL Dolby Vision from MKV doesn't work #450

Closed MastaG closed 2 years ago

MastaG commented 2 years ago

Hi,

I can use yusesope's tool, to merge both BL+EL layers from the original bluray disc into a single hevc file. When I open this hevc file and mux this into a .TS file, it will trigger DV on my LG TV.

This is a bit cumbersome as the python tool is a bit slow and it requires extra space to first extract both layers form the disc, then merge them togerther into a single file.

I can also use makemkv to create a MKV file straight from the same disc. It will also combine both DV layers into a single track/pid.

However when I remux the MKV produced by makemkv into a .TS file, this will not trigger DV on my TV. I've tried a few discs, but it just doesn't work.

If I compare the mediainfo from the .TS file created using the .hevc file from yusesope's tool and the .TS file created from the MKV (from makemkv) the only difference I can see is that the latter has a language tag inside the video pid. This is the .TS file created from the MKV file:

General
ID                                       : 1 (0x1)
Complete name                            : test_mux_mmkv_AC3.ts
Format                                   : MPEG-TS
File size                                : 66.7 GiB
Duration                                 : 2 h 10 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 73.0 Mb/s
Maximum Overall bit rate                 : 35.5 Mb/s

Video
ID                                       : 4117 (0x1015)
Menu ID                                  : 1 (0x1)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : Dolby Vision, Version 1.0, dvhe.07.06, BL+EL+RPU, Blu-ray compatible / SMPTE ST 2086,HDR10 compatible
Codec ID                                 : 36
Duration                                 : 2 h 10 min
Bit rate                                 : 68.8 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
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.346
Stream size                              : 62.8 GiB (94%)
Language                                 : English
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0010 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 358 cd/m2

Audio
ID                                       : 4352 (0x1100)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Format settings                          : Dolby Surround EX
Codec ID                                 : 129
Duration                                 : 2 h 10 min
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 599 MiB (1%)
Language                                 : English
Service kind                             : Complete Main

Any ideas?

MastaG commented 2 years ago

Here's the first 200MB from the .TS file created using the hevc file from yusesope's tool: https://mega.nz/file/X09DXKYS#MSncO4lcoGK8Rj2jC7VS7CrpsyEqgDnGlIbTKto-CQg

Here's the first 200MV from the .TS file created by remuxing the MKV created by makemkv (from the same disc): https://mega.nz/file/mkkBWQBQ#tlh2drUG55mhotsVdL5QwzE_yN4CsigoCNR0MrwZUj8

Like I said before, both contain the dual layer DV as a single track, only the first one was extracted and merged using yusesope's python tool and the second one was remuxed from makemkv. I'd like to know if it's possible to see why the second one doesn't work, because makemkv can merge both layers much faster.

jcdr428 commented 2 years ago

This is not an issue related to tsMuxer. MakeMKV simply forgets to add the Access Unit Delimiters -which yusesope tool does correctly.

MastaG commented 2 years ago

Ah thanks for explaining bro. Should I report this to the makemkv devs then?

jcdr428 commented 2 years ago

Yes, Mike should be able to fix this.