Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
Post Reply
Angryunibrow
Posts: 104
Joined: Wed Nov 06, 2019 11:26 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Angryunibrow »

ATD555 wrote: Wed Mar 04, 2020 3:59 pm
mattmarsden wrote: Wed Mar 04, 2020 3:54 pm Thank you so much. Whats the best way to demux the hevc layers? Also what commands do we use in mp4muxer? Thanks!
To demux the HEVC files

Code: Select all

ffmpeg.exe -i bluray:\path\to\bluray -map 0:0 -c copy %userprofile%\Desktop\BL.hevc -map 0:1 -c copy %userprofile%\Desktop\EL.hevc
To use MP4Muxer

Code: Select all

mp4muxer_64bits.exe --dv-profile 7.06 --input-file %userprofile%\Desktop\BL.hevc --input-file %userprofile%\Desktop\EL.hevc --output-file %userprofile%\Desktop\mp4muxer_out.mp4
Any chance someone could put together a complete post with steps involved to use this new tool for single layer, plus adding in an Atmos track?
I'm interested in creating single layer files with Atmos to play on the Shield.

I'm using DVDFab now, but would like to try out this method.
baker99
Posts: 84
Joined: Wed Oct 30, 2019 7:05 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by baker99 »

Using a 1 minute test from Shazam! Single layer DV is produced with no obvious issues, I muxed in Atmos audio with the special tsmuxer build and everything seemed perfect on the shield. I'll let you guys compare the quality as I'm not great at spotting subtle differences. I'm holding off converting my whole library until you all confirm it's perfect.

WELL DONE yusesope !
mattmarsden
Posts: 88
Joined: Mon Sep 03, 2018 10:36 am

Re: Dolby Vision now possible through MP4 Mux.

Post by mattmarsden »

baker99 wrote: Wed Mar 04, 2020 4:57 pm Using a 1 minute test from Shazam! Single layer DV is produced with no obvious issues, I muxed in Atmos audio with the special tsmuxer build and everything seemed perfect on the shield. I'll let you guys compare the quality as I'm not great at spotting subtle differences. I'm holding off converting my whole library until you all confirm it's perfect.

WELL DONE yusesope !
What did you use to demux the layers? It crashes out when I add mine
baker99
Posts: 84
Joined: Wed Oct 30, 2019 7:05 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by baker99 »

Angryunibrow wrote: Wed Mar 04, 2020 4:53 pm
ATD555 wrote: Wed Mar 04, 2020 3:59 pm
mattmarsden wrote: Wed Mar 04, 2020 3:54 pm Thank you so much. Whats the best way to demux the hevc layers? Also what commands do we use in mp4muxer? Thanks!
To demux the HEVC files

Code: Select all

ffmpeg.exe -i bluray:\path\to\bluray -map 0:0 -c copy %userprofile%\Desktop\BL.hevc -map 0:1 -c copy %userprofile%\Desktop\EL.hevc
To use MP4Muxer

Code: Select all

mp4muxer_64bits.exe --dv-profile 7.06 --input-file %userprofile%\Desktop\BL.hevc --input-file %userprofile%\Desktop\EL.hevc --output-file %userprofile%\Desktop\mp4muxer_out.mp4
Any chance someone could put together a complete post with steps involved to use this new tool for single layer, plus adding in an Atmos track?
I'm interested in creating single layer files with Atmos to play on the Shield.

I'm using DVDFab now, but would like to try out this method.
A brief guide to yusesope's single layer DV tool

extract bl_el_rpu_builder.zip on a hard drive with plenty of space
Use ffmpeg to extract layers as follows
ffmpeg -ss 0 -i bluray:\path\to\bluray -t 60 -map 0:BL_STREAM_ID -c copy %userprofile%\Desktop\BL.hevc
ffmpeg -ss 0 -i bluray:\path\to\bluray -t 60 -map 0:EL_STREAM_ID -c copy %userprofile%\Desktop\EL.hevc

Run start_bl_el_rpu_builder.bat
drop in the BL then press enter
drop in the EL then press enter

The tool will do it's magic

you will then see a file called BL_EL_RPU.hevc has been created

Using the special tsmuxer build from RESET_9999 post https://onedrive.live.com/?authkey=%21A ... ion=locate

drop BL_EL_RPU.hevc in
then drop either your m2ts file for the movie or the movie playlist file in tsmuxer
delete the two video tracks that are added from that file leaving only BL_EL_RPU.hevc
don't delete any audio files (unless you don't need specific tracks)
Press start muxing and wait
once complete you should have a single layer DV file which plays on the shield
baker99
Posts: 84
Joined: Wed Oct 30, 2019 7:05 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by baker99 »

mattmarsden wrote: Wed Mar 04, 2020 5:03 pm
baker99 wrote: Wed Mar 04, 2020 4:57 pm Using a 1 minute test from Shazam! Single layer DV is produced with no obvious issues, I muxed in Atmos audio with the special tsmuxer build and everything seemed perfect on the shield. I'll let you guys compare the quality as I'm not great at spotting subtle differences. I'm holding off converting my whole library until you all confirm it's perfect.

WELL DONE yusesope !
What did you use to demux the layers? It crashes out when I add mine
just ffmpeg
Angryunibrow
Posts: 104
Joined: Wed Nov 06, 2019 11:26 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Angryunibrow »

baker99 wrote: Wed Mar 04, 2020 5:14 pm
Angryunibrow wrote: Wed Mar 04, 2020 4:53 pm
ATD555 wrote: Wed Mar 04, 2020 3:59 pm

To demux the HEVC files

Code: Select all

ffmpeg.exe -i bluray:\path\to\bluray -map 0:0 -c copy %userprofile%\Desktop\BL.hevc -map 0:1 -c copy %userprofile%\Desktop\EL.hevc
To use MP4Muxer

Code: Select all

mp4muxer_64bits.exe --dv-profile 7.06 --input-file %userprofile%\Desktop\BL.hevc --input-file %userprofile%\Desktop\EL.hevc --output-file %userprofile%\Desktop\mp4muxer_out.mp4
Any chance someone could put together a complete post with steps involved to use this new tool for single layer, plus adding in an Atmos track?
I'm interested in creating single layer files with Atmos to play on the Shield.

I'm using DVDFab now, but would like to try out this method.
A brief guide to yusesope's single layer DV tool

extract bl_el_rpu_builder.zip on a hard drive with plenty of space
Use ffmpeg to extract layers as follows
ffmpeg -ss 0 -i bluray:\path\to\bluray -t 60 -map 0:BL_STREAM_ID -c copy %userprofile%\Desktop\BL.hevc
ffmpeg -ss 0 -i bluray:\path\to\bluray -t 60 -map 0:EL_STREAM_ID -c copy %userprofile%\Desktop\EL.hevc

Run start_bl_el_rpu_builder.bat
drop in the BL then press enter
drop in the EL then press enter

The tool will do it's magic

you will then see a file called BL_EL_RPU.hevc has been created

Using the special tsmuxer build from RESET_9999 post https://onedrive.live.com/?authkey=%21A ... ion=locate

drop BL_EL_RPU.hevc in
then drop either your m2ts file for the movie or the movie playlist file in tsmuxer
delete the two video tracks that are added from that file leaving only BL_EL_RPU.hevc
don't delete any audio files (unless you don't need specific tracks)
Press start muxing and wait
once complete you should have a single layer DV file which plays on the shield
This is what I needed, perfect - thank you.

Testing this out now!
baker99
Posts: 84
Joined: Wed Oct 30, 2019 7:05 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by baker99 »

Here's the mediainfo for the output just in case it helps anyone

Code: Select all

General
ID                                       : 1 (0x1)
Complete name                            : G:\Dolby Vision SL\shazam-test.ts
Format                                   : MPEG-TS
File size                                : 603 MiB
Duration                                 : 59 s 643 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 84.7 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.08.06, BL+RPU / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : 36
Duration                                 : 59 s 726 ms
Bit rate                                 : 80.0 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.402
Stream size                              : 570 MiB (95%)
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.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level              : 1351 cd/m2
Maximum Frame-Average Light Level        : 384 cd/m2

Audio
ID                                       : 4352 (0x1100)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3 MLP FBA 16-ch
Format/Info                              : Audio Coding 3 + Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Muxing mode                              : Stream extension
Codec ID                                 : 131
Duration                                 : 59 s 617 ms
Bit rate mode                            : Variable
Bit rate                                 : 448 kb/s
Maximum bit rate                         : 5 931 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 3.18 MiB (1%)
Service kind                             : Complete Main
Number of dynamic objects                : 15
Bed channel count                        : 1 channel
Bed channel configuration                : LFE
Angryunibrow
Posts: 104
Joined: Wed Nov 06, 2019 11:26 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Angryunibrow »

baker99 wrote: Wed Mar 04, 2020 5:34 pm Here's the mediainfo for the output just in case it helps anyone

Code: Select all

General
ID                                       : 1 (0x1)
Complete name                            : G:\Dolby Vision SL\shazam-test.ts
Format                                   : MPEG-TS
File size                                : 603 MiB
Duration                                 : 59 s 643 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 84.7 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.08.06, BL+RPU / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : 36
Duration                                 : 59 s 726 ms
Bit rate                                 : 80.0 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.402
Stream size                              : 570 MiB (95%)
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.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level              : 1351 cd/m2
Maximum Frame-Average Light Level        : 384 cd/m2

Audio
ID                                       : 4352 (0x1100)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3 MLP FBA 16-ch
Format/Info                              : Audio Coding 3 + Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Muxing mode                              : Stream extension
Codec ID                                 : 131
Duration                                 : 59 s 617 ms
Bit rate mode                            : Variable
Bit rate                                 : 448 kb/s
Maximum bit rate                         : 5 931 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 3.18 MiB (1%)
Service kind                             : Complete Main
Number of dynamic objects                : 15
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

How did you get this - dvhe.08.06

Mine output as 7.06
baker99
Posts: 84
Joined: Wed Oct 30, 2019 7:05 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by baker99 »

I have no idea, are you using the tsmuxer build from RESET_9999's post? I think I read something in the tsmuxer forum about it reporting 08.06 for some reason, I think it should be saying 07.06
RESET_9999
Posts: 2421
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

the file looks exactly like DVDFAB single layer remuxed in tsmuxer ( dv 5.6 become dv 8.6). EL is gone.
so unless yusesope did something different, I dont see how this will be any different (colors) than dvdfab SL.


Code: Select all

 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.08.06, BL+RPU / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : 36
Duration                                 : 4 min 59 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
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.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 644 cd/m2


EDIT: but using mp4muxer the EL remain in the file

Code: Select all

Video
ID                                       : 1
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 / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : hev1
Codec ID/Info                            : High Efficiency Video Coding
Duration                                 : 4 min 59 s
Bit rate                                 : 31.7 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.159
Stream size                              : 1.11 GiB (100%)
Default                                  : No
Encoded date                             : UTC 2020-03-04 17:46:37
Tagged date                              : UTC 2020-03-04 17:46:37
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.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 644 cd/m2
Codec configuration box                  : hvcC+dvcC+hvcE
Last edited by RESET_9999 on Wed Mar 04, 2020 5:47 pm, edited 1 time in total.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
Angryunibrow
Posts: 104
Joined: Wed Nov 06, 2019 11:26 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Angryunibrow »

baker99 wrote: Wed Mar 04, 2020 5:44 pm I have no idea, are you using the tsmuxer build from RESET_9999's post? I think I read something in the tsmuxer forum about it reporting 08.06 for some reason, I think it should be saying 07.06
Yes, please confirm I did it correct.

I dropped the tsMuxeR.exe in the TsMuxer folder, removing the "original" one.
And then I click on the tsMuxerGUI.exe (2.6.12) and I'm assuming its using the modified tsMuxeR.exe

Yes?
baker99
Posts: 84
Joined: Wed Oct 30, 2019 7:05 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by baker99 »

Angryunibrow wrote: Wed Mar 04, 2020 5:47 pm
baker99 wrote: Wed Mar 04, 2020 5:44 pm I have no idea, are you using the tsmuxer build from RESET_9999's post? I think I read something in the tsmuxer forum about it reporting 08.06 for some reason, I think it should be saying 07.06
Yes, please confirm I did it correct.

I dropped the tsMuxeR.exe in the TsMuxer folder, removing the "original" one.
And then I click on the tsMuxerGUI.exe (2.6.12) and I'm assuming its using the modified tsMuxeR.exe

Yes?
Yes that's all I did, unless I mixed up my versions of tsmuxer somehow, there seem to be quite a few around now!
mattmarsden
Posts: 88
Joined: Mon Sep 03, 2018 10:36 am

Re: Dolby Vision now possible through MP4 Mux.

Post by mattmarsden »

I get this error:

Please, drag and drop here the the Base Layer HEVC file and press ENTER:
C:\mp4\BL.hevc

Please, drag and drop here the the Enhancement Layer HEVC file and press ENTER
C:\mp4\EL.hevc

You did not specify an output file.
The BL_EL_RPU.hevc file will be created in the program folder.
(C:\temp\dv)


Exception in thread Thread-3:
Traceback (most recent call last):
File "C:\temp\dv\python-3.7.6.amd64\lib\threading.py", line 926, in _bootstr
_inner
self.run()
File "src\bl_el_rpu_builder.py", line 238, in run
self.output_queue.put((bl_nal_offset,bl_nal_size,el_nal_offset,el_nal_size

UnboundLocalError: local variable 'el_nal_offset' referenced before assignment
Angryunibrow
Posts: 104
Joined: Wed Nov 06, 2019 11:26 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Angryunibrow »

baker99 wrote: Wed Mar 04, 2020 5:49 pm
Angryunibrow wrote: Wed Mar 04, 2020 5:47 pm
baker99 wrote: Wed Mar 04, 2020 5:44 pm I have no idea, are you using the tsmuxer build from RESET_9999's post? I think I read something in the tsmuxer forum about it reporting 08.06 for some reason, I think it should be saying 07.06
Yes, please confirm I did it correct.

I dropped the tsMuxeR.exe in the TsMuxer folder, removing the "original" one.
And then I click on the tsMuxerGUI.exe (2.6.12) and I'm assuming its using the modified tsMuxeR.exe

Yes?
Yes that's all I did, unless I mixed up my versions of tsmuxer somehow, there seem to be quite a few around now!
Updated Mediainfo, now shows 08.06 - so mine matches what you did also.
Angryunibrow
Posts: 104
Joined: Wed Nov 06, 2019 11:26 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Angryunibrow »

RESET_9999 wrote: Wed Mar 04, 2020 5:45 pm the file looks exactly like DVDFAB single layer remuxed in tsmuxer ( dv 5.6 become dv 8.6). EL is gone.
so unless yusesope did something different, I dont see how this will be any different (colors) than dvdfab SL.


Code: Select all

 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.08.06, BL+RPU / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : 36
Duration                                 : 4 min 59 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
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.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 644 cd/m2


EDIT: but using mp4muxer the EL remain in the file

Code: Select all

Video
ID                                       : 1
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 / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : hev1
Codec ID/Info                            : High Efficiency Video Coding
Duration                                 : 4 min 59 s
Bit rate                                 : 31.7 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.159
Stream size                              : 1.11 GiB (100%)
Default                                  : No
Encoded date                             : UTC 2020-03-04 17:46:37
Tagged date                              : UTC 2020-03-04 17:46:37
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.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 644 cd/m2
Codec configuration box                  : hvcC+dvcC+hvcE
I guess we need someone to do some comparisons with a couple of the "trouble" movies like Hereditary and Joker where we have seen the color shift.
Post Reply