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
863 stars 144 forks source link

Dolby Vision 5's stream_type shall be private stream 0x06 #662

Closed moveman closed 1 year ago

moveman commented 1 year ago

According to dolby spec https://professional.dolby.com/siteassets/content-creation/dolby-vision-for-content-creators/dolby-vision-bitstreams-in-mpeg-2-transport-stream-multiplex-v1.2.pdf section "3.1.2 Primary Dolby Vision PID Carrying a Non-SDR and Non-HDR Compliant BL substream", Dolby Vision Profile 5 shall be a private stream with stream_type set to 0x06 in PMT. Currently it is set to 0x24, like any other HEVC stream.

jcdr428 commented 1 year ago

It is the case, see https://github.com/justdan96/tsMuxer/blob/223a02fae0880039d819a94f7b6e9058a8d1e2b1/tsMuxer/tsMuxer.cpp#L296.

This is for non-Blu-ray m2ts. For Blu-ray muxing, stream_type is 0x24 hevc.

moveman commented 1 year ago

Hi @jcdr428, I also saw this code but it does not work. The output stream type is still set to 0x24. I put my HEVC ES and the meta file here: https://drive.google.com/drive/folders/1MM2LaQ6yjpwj-e0rAPLq5yVbYcu9ugWt?usp=sharing You could try to mux it and you will find the output stream type is not 0x06.

The comment say the second DV track must be stream_type 0x06. But for my case, it is Dolby Vision 5 ES and has only one track. Probably it does not fall into the same case.

jcdr428 commented 1 year ago

Ok, I' ll see how to solve it.

jcdr428 commented 1 year ago

@moveman please try tomorrow's release.

Edit: I am mitigated about this fix: you can have a DV profile 5 which is marked as non-SDR and non-HDR by the BL_compatibility flag, however is still compatible. In the case of the hevc you supplied, it is compatible with SDR and can be read by a non-DV player. However changing the stream_type to 0x06 "PRIVATE" makes it unreadable by a non-DV player.

moveman commented 1 year ago

Hi @jcdr428, I also felt upset when changing stream_type to 0x06 because player such as VLC player will not be able to play the video. I am not sure if we can pass the Dolby Certification if we do not do that.

jcdr428 commented 1 year ago

@moveman exactly. So what do you think, better to leave stream_type as 0x24, or as 0x06 ?

moveman commented 1 year ago

Hi @jcdr428, @ValZapod, up to now I did not yet find a dolby cert test that verifiy this stream type 0x06. I have also checked on LG C1 and stream type 0x24 DV5 TS can be played without problem. If changing to 0x06 is a concern, we can suspend this issue first. I will reopen this issue later if the TS cannot pass dolby cert. Thanks.

jcdr428 commented 1 year ago

@moveman see issue #673. I will revert to stream_type 0x24 until you get more info on Dolby cert.