Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
mattmarsden
Posts: 88
Joined: Mon Sep 03, 2018 10:36 am

Re: Dolby Vision now possible through MP4 Mux.

Post by mattmarsden »

Thank you so much. Whats the best way to demux the hevc layers? Also what commands do we use in mp4muxer? Thanks!
ATD555
Posts: 45
Joined: Fri Feb 28, 2020 4:04 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by ATD555 »

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
Last edited by ATD555 on Wed Mar 04, 2020 4:03 pm, edited 1 time in total.
baker99
Posts: 84
Joined: Wed Oct 30, 2019 7:05 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by baker99 »

yusesope wrote:
Wed Mar 04, 2020 3:36 pm
But how much do you guys write? :shock: :lol:

I don't know if there have been developments and I don't know if my tool to create a raw BL+EL+RPU file can still be useful or not but, as promised, you can find the tool HERE.

For those who do not want to use the command line, after unpacking the archive, click on the "start_bl_el_rpu_builder.bat" file and follow the instructions on the screen.
A "BL_EL_RPU.hevc" file will be created in the same folder of this program (so pay attention to how much free space you have left on the disk)

For those who want to use the command line (on Windows, MacOS and Linux), you can use your version of Python (with python >= 3) but you must first install "bitstring"

Code: Select all

pip install bitstring
Windows users can also use the interpreter present in the "python-3.7.6.amd64" folder.

To see the available options, run the source code (in the "src" folder) with the "-h" switch.

Code: Select all

python src/bl_el_rpu_builder.py -h

or(Windows users)

python-3.7.6.amd64\python.exe src\bl_el_rpu_builder.py -h

Hoping that everything works correctly (forgive any errors), I recommend you to mux the file obtained using mp4muxer (as far as I know it is the only program able to process the information present in the NAL relating to the Enhancement Layer).
Try both with profile 4 and with profile 7.

Happy testing everyone!
Wohoo thank you, will get testing
mattmarsden
Posts: 88
Joined: Mon Sep 03, 2018 10:36 am

Re: Dolby Vision now possible through MP4 Mux.

Post by mattmarsden »

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
Thanks for that, I was after the mp4muxer command for the new SL file that Yuescope's tool makes.
jesper1994
Posts: 17
Joined: Fri Oct 25, 2019 12:53 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by jesper1994 »

ATD555 wrote:
Wed Mar 04, 2020 3:38 pm
yusesope wrote:
Wed Mar 04, 2020 3:36 pm
But how much do you guys write? :shock: :lol:

I don't know if there have been developments and I don't know if my tool to create a raw BL+EL+RPU file can still be useful or not but, as promised, you can find the tool HERE.

For those who do not want to use the command line, after unpacking the archive, click on the "start_bl_el_rpu_builder.bat" file and follow the instructions on the screen.
A "BL_EL_RPU.hevc" file will be created in the same folder of this program (so pay attention to how much free space you have left on the disk)

For those who want to use the command line (on Windows, MacOS and Linux), you can use your version of Python (with python >= 3) but you must first install "bitstring"

Code: Select all

pip install bitstring
Windows users can also use the interpreter present in the "python-3.7.6.amd64" folder.

To see the available options, run the source code (in the "src" folder) with the "-h" switch.

Code: Select all

python src/bl_el_rpu_builder.py -h

or(Windows users)

python-3.7.6.amd64\python.exe src\bl_el_rpu_builder.py -h

Hoping that everything works correctly (forgive any errors), I recommend you to mux the file obtained using mp4muxer (as far as I know it is the only program able to process the information present in the NAL relating to the Enhancement Layer).
Try both with profile 4 and with profile 7.

Happy testing everyone!
Thank you! Thank you! Thank you!
So what is this tool doing? Normally I demux the BL and EL and audio (DTS HD) and remux them with mp4box. I always play dual layer DV with external hard drive on my oled c7. Does this tool improve something in my situation?
ATD555
Posts: 45
Joined: Fri Feb 28, 2020 4:04 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by ATD555 »

jesper1994 wrote:
Wed Mar 04, 2020 4:15 pm
ATD555 wrote:
Wed Mar 04, 2020 3:38 pm
yusesope wrote:
Wed Mar 04, 2020 3:36 pm
But how much do you guys write? :shock: :lol:

I don't know if there have been developments and I don't know if my tool to create a raw BL+EL+RPU file can still be useful or not but, as promised, you can find the tool HERE.

For those who do not want to use the command line, after unpacking the archive, click on the "start_bl_el_rpu_builder.bat" file and follow the instructions on the screen.
A "BL_EL_RPU.hevc" file will be created in the same folder of this program (so pay attention to how much free space you have left on the disk)

For those who want to use the command line (on Windows, MacOS and Linux), you can use your version of Python (with python >= 3) but you must first install "bitstring"

Code: Select all

pip install bitstring
Windows users can also use the interpreter present in the "python-3.7.6.amd64" folder.

To see the available options, run the source code (in the "src" folder) with the "-h" switch.

Code: Select all

python src/bl_el_rpu_builder.py -h

or(Windows users)

python-3.7.6.amd64\python.exe src\bl_el_rpu_builder.py -h

Hoping that everything works correctly (forgive any errors), I recommend you to mux the file obtained using mp4muxer (as far as I know it is the only program able to process the information present in the NAL relating to the Enhancement Layer).
Try both with profile 4 and with profile 7.

Happy testing everyone!
Thank you! Thank you! Thank you!
So what is this tool doing? Normally I demux the BL and EL and audio (DTS HD) and remux them with mp4box. I always play dual layer DV with external hard drive on my oled c7. Does this tool improve something in my situation?
If it is already working for you, then you shouldn't have to use the tool. This is to create a proper single layer DV file.
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
Post Reply