Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

The weekend has come! It's time to experiment!

UPDATE 07/11/20
Added experimental support for BluRay folder and related playlists (more info HERE)

HERE you can find what I was working on last weekend.
This is v0.0.4 GAMMA "only for the brave" edition!
It is a partial job, there is no guarantee that it will work, but first of all I have to understand if I am proceeding on the right path and to do it I need to understand what is wrong. The tests that I can do alone are a limited number so "unity is strength": the more tests we do, the more errors we will discover and there will be more chances for me to be able to correct what doesn't work!

The new tool only works on Windows (for now): I'm sure that people who use Linux are ready to use their quadruple boot :mrgreen: or already have QEMU running in the background :lol: .
When I experiment on Windows I often use THESE virtual machines (fast and clean method). The login password is "Passw0rd!"


How does it work.
Given as input a Dual Track Dual Layer DoVi file (for now use the m2ts files present in the decrypted folders of your UHD-BDs), the tool should return a Single Track Dual Layer MKV file ready to be played on your devices.
During the process you have the possibility to choose all the audio tracks and subtitles you want!
Please, don't use movies like Gemini Man (with fps > 30).

The more practical ones can also test MKV and TS files (always DTDL) as input.


How to use
Three simple steps:
  • Build two working command lines and launch them in two separate Command Prompt windows
  • Wait
  • Patch the MKV obtained at the end of the first step


Step ONE
The first point is the most complicated for the less experienced: don't be afraid, it's all very simple. Follow the instructions. But please don't flood this thread with posts on how to use a command line. Read every single word and if you make any mistakes, read and reread again !!!!

To open a Command Prompt window I created a useful file: double click on "Open_Command_Prompt_HERE.bat".
Open two windows using the previous file twice.

Let's move on to the command lines.
The parts in blue are the only parts you need to edit. Leave the rest unchanged.
To paste a command line into Prompt, after copying it, right click inside the window with "black background".
One command line for each Prompt window.

First window and first command line
python-3.7.6.amd64\python.exe src\app.py -mux -exp \path\to\your\original\file.m2ts
As written, this command line will generate a FEL or MEL file.
If you have a FEL file and want a MEL file, add the -fel_to_mel switch before the -mux one.
If you have a FEL or MEL file and want an 8.1 profile file add the -mode 2 switch before the -mux one.
-mode 2 and -fel_to_mel cannot be used in the same command line.
If you want to skip HDR10+ metadata add the -skip_hdr10plus switch (the latter can be combined with either of the first two switches).
Simple, isn't it?

Second window and second command line
src\Gpac\gpac.exe -i pipe://video:ext=hevc:audelim=true -o stdout:ext=ts:pes_pack=none | src\FFmpeg\ffmpeg_win_x64.exe -hide_banner -y -i - -i \path\to\your\original\file.m2ts -map 0:0 -map 1:2 -c copy -bsf:v hevc_metadata=aud=insert -metadata title="Movie Title_________________________________________________________________________" \path\to\your\output\file.mkv
As written, this command line will generate an MKV file (the third blue line). The video comes from my tool; the audio instead comes from the original m2ts file (the first blue line ... the first audio is usually TrueHD/ATMOS).
This command line is related only to FFmpeg: if you want to create more complex files (more audio tracks, subtitles, etc... also coming from sources other than the original m2ts file) you have to learn how to use FFmpeg (in particular the -map switch. Take a look HERE ).
For now, if you are a beginner, do some simple tests (a video track and an audio track as indicated).
Why all those underscores? You'll find out in step three!
You need 73 underscores if you want to get a file with profile 7 (as is the case with the current command line) and 37 if you want a file with profile 8.

Code: Select all

#profile 7
Movie Title_________________________________________________________________________

#profile 8
Movie Title_____________________________________
Now follow me carefully: arrange the windows side by side, run the first command (the one with python) in the first window (by pressing ENTER) and then, quickly (please, quickly) run the second command in the second window in the same way!


Step TWO
You have to wait for the processes to complete.
If anything goes wrong, close everything and open Task Manager to permanently kill any remaining active processes.
If you don't know what the Task Manager is and you notice significant slowdowns then restart your computer!

Step THREE
FFmpeg (as well as mkvtoolnix) cannot generate files with DoVi. He needs a little help.

I found a way! Remember all those underscores from earlier? I need them to create a void that I can fill with my precious Bytes :mrgreen: !
Open the "MKV_Patcher.bat" file, drag and drop the MKV file obtained in step ONE, press ENTER and, when prompted, enter 7 if you are creating a FEL\MEL file or 8 in the case of an 8.1 profile file. Other values ​​are not allowed!
The process will become automatic in the future: it will understand what type of file you created in step ONE and will behave accordingly!


SAMPLES
HERE


Happy Testing!
Last edited by yusesope on Sat Nov 07, 2020 2:20 pm, edited 3 times in total.
blenky
Posts: 24
Joined: Fri Oct 02, 2020 12:29 am

Re: Dolby Vision now possible through MP4 Mux.

Post by blenky »

@yusesope I followed your steps in the post above to the letter.

I ran through the steps twice to create 8.1 profile and the second created MEL from FEL.

The first I added '-mode 2' into first script and type 8 in final step.

The second I added fel_to_mel to first script and typed 7 in final step

However the resultant files play back in HDR10 on my Zidoo Z9X.


Media info of 8.1 profile file below

Code: Select all

General
Unique ID                                : 85570055583739472865028318079082573192 (0x406031781F223E48541393937F542D88)
Complete name                            : Y:\1917.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 61.6 GiB
Duration                                 : 1 h 58 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 74.1 Mb/s
Movie name                               : 1917______________________________________________________________________________________________________
Writing application                      : Lavf58.45.100
Writing library                          : Lavf58.45.100
ErrorDetectionType                       : Per level 1

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.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 58 min
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
Default                                  : Yes
Forced                                   : No
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.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 168 cd/m2
SEI_rbsp_stop_one_bit                    : Missing

Audio
ID                                       : 2
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Codec ID                                 : A_TRUEHD
Duration                                 : 1 h 58 min
Bit rate mode                            : Variable
Maximum bit rate                         : 7 158 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 1 200.000 FPS (40 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Default                                  : Yes
Forced                                   : No
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE
Media info of FEL to MEL

Code: Select all

General
Unique ID                                : 319733252171936484108131698166622884465 (0xF08A626BCD421651424781590BD09271)
Complete name                            : D:\Newsbin\1917.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 67.5 GiB
Duration                                 : 1 h 58 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 81.3 Mb/s
Movie name                               : 1917__________________________________________________________________
Writing application                      : Lavf58.45.100
Writing library                          : Lavf58.45.100
ErrorDetectionType                       : Per level 1

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, Blu-ray compatible / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 58 min
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
Default                                  : Yes
Forced                                   : No
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.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 168 cd/m2

Audio
ID                                       : 2
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Codec ID                                 : A_TRUEHD
Duration                                 : 1 h 58 min
Bit rate mode                            : Variable
Maximum bit rate                         : 7 158 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 1 200.000 FPS (40 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Default                                  : Yes
Forced                                   : No
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

TheChief
Posts: 2
Joined: Sat Oct 17, 2020 7:19 am

Re: Dolby Vision now possible through MP4 Mux.

Post by TheChief »

Smthng gone wrong:

Code: Select all

Traceback (most recent call last):
  File "S:\_Out\MKV_DV\python-3.7.6.amd64\lib\site-packages\bitstring.py", line 833, in _initialise
    init_without_length_or_offset[k](self, v)
KeyError: 'uint'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "src\MKV_patcher.py", line 233, in <module>
    patched_data = mkv_patcher.inject_dolby_vision(dolby_vision_data)
  File "src\MKV_patcher.py", line 207, in inject_dolby_vision
    self.init_elements()
  File "src\MKV_patcher.py", line 149, in init_elements
    el_property["size"] = self.read_variable_size_int()
  File "src\MKV_patcher.py", line 128, in read_variable_size_int
    parsedValue = BitArray(uint=(self.mkv_data[pos:pos + 8] & (~self.get_len_mark(length))).uint,length=length)
  File "src\MKV_patcher.py", line 117, in get_len_mark
    return BitArray(uint=1 << (8 - int(length / 8)),length=8)
  File "S:\_Out\MKV_DV\python-3.7.6.amd64\lib\site-packages\bitstring.py", line 3059, in __new__
    y = Bits.__new__(BitArray, auto, length, offset, **kwargs)
  File "S:\_Out\MKV_DV\python-3.7.6.amd64\lib\site-packages\bitstring.py", line 812, in __new__
    x._initialise(auto, length, offset, **kwargs)
  File "S:\_Out\MKV_DV\python-3.7.6.amd64\lib\site-packages\bitstring.py", line 838, in _initialise
    init_with_length_only[k](self, v, length)
  File "S:\_Out\MKV_DV\python-3.7.6.amd64\lib\site-packages\bitstring.py", line 1388, in _setuint
    raise CreationError(msg, uint, length, (1 << length) - 1)
bitstring.CreationError: 256 is too large an unsigned integer for a bitstring of length 8. The allowed range is [0, 255].
daddy
Posts: 77
Joined: Sat Jul 06, 2019 8:17 am

Re: Dolby Vision now possible through MP4 Mux.

Post by daddy »

I think it would first be necessary to define which are the reliable players for DV.
Is the shield a reliable player ?
Is the Z9X a reliable player that actually displays the DV contained in a DV file ? Has anyone compared the Z9X DV image to an original dvhe.07.06 image ?
lexyz
Posts: 120
Joined: Fri May 08, 2020 5:32 am

Re: Dolby Vision now possible through MP4 Mux.

Post by lexyz »

daddy wrote:
Sat Oct 17, 2020 7:26 am
Is the shield a reliable player ?
No, it's not, until "red push" is fixed
Bravia XF90, Shield TV Pro'19, UBP-X700
blenky
Posts: 24
Joined: Fri Oct 02, 2020 12:29 am

Re: Dolby Vision now possible through MP4 Mux.

Post by blenky »

daddy wrote:
Sat Oct 17, 2020 7:26 am
I think it would first be necessary to define which are the reliable players for DV.
Is the shield a reliable player ?
Is the Z9X a reliable player that actually displays the DV contained in a DV file ? Has anyone compared the Z9X DV image to an original dvhe.07.06 image ?
I have had success with the Z9X displaying DV using previous methods on here.
rick131
Posts: 1
Joined: Sat Oct 17, 2020 8:18 am

Re: Dolby Vision now possible through MP4 Mux.

Post by rick131 »

Hi. Is there a way to get a green screen on LG Oled 2016 screens (B6, C6, E6 and G6)? Most movies are 1000 nits movies :(
Will I get rid of the green screen using firestick4k?
Over 200 pages hard to read :(
greetings
ghostshadow
Posts: 55
Joined: Sun Sep 13, 2020 10:25 am

Re: Dolby Vision now possible through MP4 Mux.

Post by ghostshadow »

daddy wrote:
Sat Oct 17, 2020 7:26 am
I think it would first be necessary to define which are the reliable players for DV.
Is the shield a reliable player ?
Is the Z9X a reliable player that actually displays the DV contained in a DV file ? Has anyone compared the Z9X DV image to an original dvhe.07.06 image ?
I compared on the zidoo z9x an original HDR10 image and transformed DV image (profile 8). And there is a difference, so I think the DV data is actually processed
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

blenky wrote:
Fri Oct 16, 2020 7:02 pm
@yusesope I followed your steps in the post above to the letter.
.........................................
However the resultant files play back in HDR10 on my Zidoo Z9X.
Thanks for trying!
It amazes me that it is even recognized as a valid file.
Unfortunately a few bytes are lost along the way during the process and I really don't understand what happens to them ...
I will continue to work on it ....

quietvoid wrote:
Sun Oct 11, 2020 1:49 pm
Maybe a good starting point is to just accept a MKV (in addition to raw that exists already) and be able to output the raw converted HEVC file. That on its own would save a lot of time (demuxing MKV, demuxing BL/EL, converting/remuxing 8.1), and might be simpler to do.
In the meantime I have further updated the test version (v0.0.4 BETA in the usual POST).

MUX_EXPERIMENTAL.bat accepts as input a DTDL file (ex: m2ts) and returns a HEVC stream (saving you a lot of time).
I left the instructions inside (right click -> edit): modify it according to your needs.
The only precaution: -mode is become, only in this case, -mode_exp

If you want to try it, I kindly ask you to import the HEVC file into MkvToolNix, add the audio tracks, subtitles, etc... and then, in the "Output" tab, fill in the "File title" box by entering the title you want followed by 73 underscores in the case of a profile 7 file or by 37 underscores in the case of a profile 8.

Code: Select all

#profile 7
Movie Title_________________________________________________________________________

#profile 8
Movie Title_____________________________________

After generating the file, use my "MKV_Patcher.bat" (takes you 0.1 seconds).
yusesope wrote:
Fri Oct 16, 2020 1:37 pm
Open the "MKV_Patcher.bat" file, drag and drop the MKV file obtained in step ONE, press ENTER and, when prompted, enter 7 if you are creating a FEL\MEL file or 8 in the case of an 8.1 profile file. Other values ​​are not allowed!
The process will become automatic in the future: it will understand what type of file you created in step ONE and will behave accordingly!
Is the patched file played with Dolby Vision?
Thank you.


For those using the command line, pay attention to the switches (take a look at the help).
For those who use linux, remember to give the correct permissions to the version of ffmpeg that I have attached!

Code: Select all

chmod +x src/FFmpeg/ffmpeg_lin_x64
The script require also psutil

Code: Select all

python3 -m pip install psutil
Manixx2020beyound
Posts: 127
Joined: Thu Oct 08, 2020 5:19 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Manixx2020beyound »

blenky wrote:
Fri Oct 16, 2020 7:02 pm
@yusesope I followed your steps in the post above to the letter.

I ran through the steps twice to create 8.1 profile and the second created MEL from FEL.

The first I added '-mode 2' into first script and type 8 in final step.

The second I added fel_to_mel to first script and typed 7 in final step

However the resultant files play back in HDR10 on my Zidoo Z9X.


Media info of 8.1 profile file below

Code: Select all

General
Unique ID                                : 85570055583739472865028318079082573192 (0x406031781F223E48541393937F542D88)
Complete name                            : Y:\1917.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 61.6 GiB
Duration                                 : 1 h 58 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 74.1 Mb/s
Movie name                               : 1917______________________________________________________________________________________________________
Writing application                      : Lavf58.45.100
Writing library                          : Lavf58.45.100
ErrorDetectionType                       : Per level 1

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.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 58 min
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
Default                                  : Yes
Forced                                   : No
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.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 168 cd/m2
SEI_rbsp_stop_one_bit                    : Missing

Audio
ID                                       : 2
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Codec ID                                 : A_TRUEHD
Duration                                 : 1 h 58 min
Bit rate mode                            : Variable
Maximum bit rate                         : 7 158 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 1 200.000 FPS (40 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Default                                  : Yes
Forced                                   : No
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE
Media info of FEL to MEL

Code: Select all

General
Unique ID                                : 319733252171936484108131698166622884465 (0xF08A626BCD421651424781590BD09271)
Complete name                            : D:\Newsbin\1917.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 67.5 GiB
Duration                                 : 1 h 58 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 81.3 Mb/s
Movie name                               : 1917__________________________________________________________________
Writing application                      : Lavf58.45.100
Writing library                          : Lavf58.45.100
ErrorDetectionType                       : Per level 1

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, Blu-ray compatible / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 58 min
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
Default                                  : Yes
Forced                                   : No
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.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 168 cd/m2

Audio
ID                                       : 2
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Codec ID                                 : A_TRUEHD
Duration                                 : 1 h 58 min
Bit rate mode                            : Variable
Maximum bit rate                         : 7 158 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 1 200.000 FPS (40 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Default                                  : Yes
Forced                                   : No
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

Did u edit hdr10 plus this would only play hdr10/hdr10 plus
I have both uhd hdr10+ & dv tv feed at the same time hdr10/dv tv plays same file in hdr10 only while the other hdr10+/dv tv triggers hdr10 plus
Hdr10plus is the issue here I think.
codeXRes
Posts: 20
Joined: Mon Jan 20, 2020 1:10 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by codeXRes »

The latest Plex Beta is not playing my old Profile 6 TS rips. Profile 4/7 in TS/MKV working though. Any one else noticed this? :roll:
blenky
Posts: 24
Joined: Fri Oct 02, 2020 12:29 am

Re: Dolby Vision now possible through MP4 Mux.

Post by blenky »

Manixx2020beyound wrote:
Sat Oct 17, 2020 12:36 pm
blenky wrote:
Fri Oct 16, 2020 7:02 pm
@yusesope I followed your steps in the post above to the letter.

I ran through the steps twice to create 8.1 profile and the second created MEL from FEL.

The first I added '-mode 2' into first script and type 8 in final step.

The second I added fel_to_mel to first script and typed 7 in final step

However the resultant files play back in HDR10 on my Zidoo Z9X.


Media info of 8.1 profile file below

Code: Select all

General
Unique ID                                : 85570055583739472865028318079082573192 (0x406031781F223E48541393937F542D88)
Complete name                            : Y:\1917.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 61.6 GiB
Duration                                 : 1 h 58 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 74.1 Mb/s
Movie name                               : 1917______________________________________________________________________________________________________
Writing application                      : Lavf58.45.100
Writing library                          : Lavf58.45.100
ErrorDetectionType                       : Per level 1

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.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 58 min
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
Default                                  : Yes
Forced                                   : No
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.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 168 cd/m2
SEI_rbsp_stop_one_bit                    : Missing

Audio
ID                                       : 2
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Codec ID                                 : A_TRUEHD
Duration                                 : 1 h 58 min
Bit rate mode                            : Variable
Maximum bit rate                         : 7 158 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 1 200.000 FPS (40 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Default                                  : Yes
Forced                                   : No
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE
Media info of FEL to MEL

Code: Select all

General
Unique ID                                : 319733252171936484108131698166622884465 (0xF08A626BCD421651424781590BD09271)
Complete name                            : D:\Newsbin\1917.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 67.5 GiB
Duration                                 : 1 h 58 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 81.3 Mb/s
Movie name                               : 1917__________________________________________________________________
Writing application                      : Lavf58.45.100
Writing library                          : Lavf58.45.100
ErrorDetectionType                       : Per level 1

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, Blu-ray compatible / SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 58 min
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
Default                                  : Yes
Forced                                   : No
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.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 168 cd/m2

Audio
ID                                       : 2
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Codec ID                                 : A_TRUEHD
Duration                                 : 1 h 58 min
Bit rate mode                            : Variable
Maximum bit rate                         : 7 158 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 1 200.000 FPS (40 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Default                                  : Yes
Forced                                   : No
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

Did u edit hdr10 plus this would only play hdr10/hdr10 plus
I have both uhd hdr10+ & dv tv feed at the same time hdr10/dv tv plays same file in hdr10 only while the other hdr10+/dv tv triggers hdr10 plus
Hdr10plus is the issue here I think.
I did not try to remove HDR10+. I will try that and see what happens
jlpsvk
Posts: 50
Joined: Thu Sep 06, 2018 11:33 am

Re: Dolby Vision now possible through MP4 Mux.

Post by jlpsvk »

ok... some shit is happening...

JOKER UHD with MEL...

after "convert to 81" and then demux, EL_RPU is about halfsize... and when I am trying remux again to 8.1, if fails.

Code: Select all

Exception in thread Thread-5:SIS: 0.0%    BL_EL_RPU WRITING: 0.0%    (BL AUs: 516     EL AUs: 1)
Traceback (most recent call last):
  File "c:\ysst\python-3.7.6.amd64\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "src\app.py", line 929, in run
    self.write(access_unit)
  File "src\app.py", line 912, in write
    nalu.data.prepend("0x00000001")
AttributeError: 'int' object has no attribute 'prepend'
BL_ANALYSIS: 0.0%    EL_ANALYSIS: 0.0%    BL_EL_RPU WRITING: 0.0%    (BL AUs: 516     EL AUs: 1)
BL_ANALYSIS: 0.0%    EL_ANALYSIS: 0.0%    BL_EL_RPU WRITING: 0.0%    (BL AUs: 516     EL AUs: 1)
and one more question... do I need convert FEL to MEL first and then "convert to 8.1" or "convert to 8.1" converts FEL to MEL automatically?

and is it possible to demux the 8.1 profile????
blenky
Posts: 24
Joined: Fri Oct 02, 2020 12:29 am

Re: Dolby Vision now possible through MP4 Mux.

Post by blenky »

yusesope wrote:
Sat Oct 17, 2020 11:19 am
In the meantime I have further updated the test version (v0.0.4 BETA in the usual POST).

MUX_EXPERIMENTAL.bat accepts as input a DTDL file (ex: m2ts) and returns a HEVC stream (saving you a lot of time).
I left the instructions inside (right click -> edit): modify it according to your needs.
The only precaution: -mode is become, only in this case, -mode_exp

If you want to try it, I kindly ask you to import the HEVC file into MkvToolNix, add the audio tracks, subtitles, etc... and then, in the "Output" tab, fill in the "File title" box by entering the title you want followed by 73 underscores in the case of a profile 7 file or by 37 underscores in the case of a profile 8.

Code: Select all

#profile 7
Movie Title_________________________________________________________________________

#profile 8
Movie Title_____________________________________

After generating the file, use my "MKV_Patcher.bat" (takes you 0.1 seconds).
yusesope wrote:
Fri Oct 16, 2020 1:37 pm
Open the "MKV_Patcher.bat" file, drag and drop the MKV file obtained in step ONE, press ENTER and, when prompted, enter 7 if you are creating a FEL\MEL file or 8 in the case of an 8.1 profile file. Other values ​​are not allowed!
The process will become automatic in the future: it will understand what type of file you created in step ONE and will behave accordingly!
Is the patched file played with Dolby Vision?
Thank you.


For those using the command line, pay attention to the switches (take a look at the help).
For those who use linux, remember to give the correct permissions to the version of ffmpeg that I have attached!

Code: Select all

chmod +x src/FFmpeg/ffmpeg_lin_x64
The script require also psutil

Code: Select all

python3 -m pip install psutil
OK I got hold of your 0.0.4 beta package and did the following
  • Ran MUX_EXPERIMENTAL.bat adding in the main M2TS file from the movie 1917. I updated the script within the .bat file to

    Code: Select all

    python-3.7.6.amd64\python.exe src\app.py -mode_exp 2 -skip_hdr10plus -mux_exp
  • Imported the resultant HEVC file into latest version of MKVToolNix and added film title followed by 37 underscores. I added the M2TS file from 1917 into MKVToolNix excluding everything except Atmos audio and one subtitle track.
  • ran MKV_Patcher.bat dropping in the MKV file created and typed 8.
Unfortunately the end result MKV file does not play at all. It freezes with black screen

mediainfo below. What am I doing wrong?

Code: Select all

General
Unique ID                                : 12818517988367686864411367271213056704 (0x9A4C1BB4327FCBFB039476A7A2042C0)
Complete name                            : Y:\1917.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 61.5 GiB
Duration                                 : 1 h 58 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 74.1 Mb/s
Movie name                               : 1917
Encoded date                             : UTC 2020-10-17 19:57:07
Writing application                      : mkvmerge v51.0.0 ('I Wish') 64-bit
Writing library                          : libebml v1.4.0 + libmatroska v1.6.2

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.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 58 min
Bit rate                                 : 70.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.353
Stream size                              : 58.3 GiB (95%)
Default                                  : Yes
Forced                                   : No
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.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 168 cd/m2

Audio
ID                                       : 2
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Codec ID                                 : A_TRUEHD
Duration                                 : 1 h 58 min
Bit rate mode                            : Variable
Bit rate                                 : 3 810 kb/s
Maximum bit rate                         : 7 158 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 1 200.000 FPS (40 SPF)
Compression mode                         : Lossless
Delay relative to video                  : 17 ms
Stream size                              : 3.17 GiB (5%)
Language                                 : English
Default                                  : Yes
Forced                                   : No
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

Text
ID                                       : 3
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 45 min
Bit rate                                 : 28.0 kb/s
Count of elements                        : 2202
Stream size                              : 21.2 MiB (0%)
Language                                 : English
Default                                  : Yes
Forced                                   : No

kazuma
Posts: 186
Joined: Fri Nov 08, 2019 9:51 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by kazuma »

man, so many pages already... there is not a better soluction for the LG C9 than the command>profile 7 i suppose so far?
Post Reply