Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
Tomas
Posts: 46
Joined: Tue Aug 11, 2020 7:47 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Tomas »

yusesope wrote:
Fri Oct 02, 2020 1:00 pm
Another weekend is about to begin so you have a little time to try "the things" I write :lol: :lol: :lol: !
This time it's up to profile 8.1!
I have updated the POST we refer to during this testing phase.
Find all the instructions there.

This update "fixes" what was previously called "-mode 2".

The new lines of code should allow you to convert a UHD-BD (both MEL and FEL) in a file Single Track Single Layer profile 8.1 (STSL dvhe.08.0x, BL + RPU, HDR10 compatible).

All devices, especially TVs with proprietary OS, capable of playing profile 8 files (and which have so far encountered problems with DV) could benefit from this update.

Before starting, to find out if your device is able to correctly reproduce profile 8, use the test files that Dolby provides on THIS page

Happy testing!
Please I wanted to ask there no longer need to be used after MUX_AND_CONVERT_TO_PROFILE_81, use DEMUX step?
Thank you for the advice.
hepe9
Posts: 71
Joined: Mon Jun 03, 2019 11:04 am

Re: Dolby Vision now possible through MP4 Mux.

Post by hepe9 »

yusesope wrote:
Fri Oct 02, 2020 1:00 pm
Another weekend is about to begin so you have a little time to try "the things" I write :lol: :lol: :lol: !
This time it's up to profile 8.1!
I have updated the POST we refer to during this testing phase.
Find all the instructions there.

This update "fixes" what was previously called "-mode 2".

The new lines of code should allow you to convert a UHD-BD (both MEL and FEL) in a file Single Track Single Layer profile 8.1 (STSL dvhe.08.0x, BL + RPU, HDR10 compatible).

All devices, especially TVs with proprietary OS, capable of playing profile 8 files (and which have so far encountered problems with DV) could benefit from this update.

Before starting, to find out if your device is able to correctly reproduce profile 8, use the test files that Dolby provides on THIS page

Happy testing!
Tried it in a Sony Xf90 and the default player doesn't play the demos, the exoplayer played it but has the same problem with the profile 7, red tones everywhere

Thanks anyway
blenky
Posts: 24
Joined: Fri Oct 02, 2020 12:29 am

Re: Dolby Vision now possible through MP4 Mux.

Post by blenky »

A correction is needed to the mp4muxer command line for profile 8.1. It should be one of the following (not sure which)

Code: Select all

mp4muxer -i path\to\BL_EL_RPU.hevc --dv-profile 8 --dv-bl-compatible-id 1 -o path\to\TEST_FILE.mp4


mp4muxer -i path\to\BL_EL_RPU.hevc --dv-profile 8 --dv-bl-compatible-id 2 -o path\to\TEST_FILE.mp4
whiplash1
Posts: 38
Joined: Sun Apr 19, 2020 7:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by whiplash1 »

Hi yusesope, I'm encountering an unusual problem using beta method 2. When I start demuxing the BL_EL_RPU file, it quits after a few seconds. And prompts me to press any key. However, task manager shows high RAM and Disk activity. So is it actually running? Any ideas on what could be causing it?

Update: There's something definitely wrong with the Demux.bat. I went through the thread and another person too has the same issue as mine. I checked with a shorter clip (6 mins), same issue.
The mux and convert to MEL went just fine, so did the ffmeg demuxing. And it is an FEL title. (Apocalypse Now Final Cut).
Last edited by whiplash1 on Sat Oct 03, 2020 8:52 am, edited 1 time in total.
lexyz
Posts: 120
Joined: Fri May 08, 2020 5:32 am

Re: Dolby Vision now possible through MP4 Mux.

Post by lexyz »

yusesope wrote:
Fri Oct 02, 2020 1:00 pm
This time it's up to profile 8.1!
I have updated the POST we refer to during this testing phase.
Find all the instructions there.
I've tested notrious MI:Fallout scene on Shield TV and ... nope, still reddish blocks.
Files are here https://gofile.io/d/JZUXU6

This leads me to think that the Shield issue is not FEL or MEL related, but that DoVi metadata is not properly handled by decoder
Thats why some FEL/MEL titles have no issues while other have.
But without proper tools it's impossible to catch a difference in meta.
Last edited by lexyz on Sat Oct 03, 2020 8:37 am, edited 1 time in total.
Bravia XF90, Shield TV Pro'19, UBP-X700
spezi
Posts: 12
Joined: Wed May 01, 2019 4:28 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by spezi »

yusesope, you've created MUX_AND_CONVERT_TO_PROFILE_81.bat in your new v0.0.4_BETA_TEST.

Code: Select all

python-3.7.6.amd64\python.exe src\app.py -mux -mode 2
but that's equal to mux.bat now.
I think you should delete -mode 2 in mux.bat so that mux.bat is the same as in earlier releases.
ghostshadow
Posts: 55
Joined: Sun Sep 13, 2020 10:25 am

Re: Dolby Vision now possible through MP4 Mux.

Post by ghostshadow »

blenky wrote:
Fri Oct 02, 2020 6:32 pm
Managed to get 8.1 working on Zidoo z9X by using tsmuxer to combine with Atmos audio from UHD to create ISO. Then created MKV with MakeMKV. Only thing is audio is out of sync. Need to offset audio ahead by about half a second.

Playback gets juddery after about 5 minutes - unwatchable at that point
hello, in your mediainfo in your audio track you have:
Delay relative to video : -2 s 836 ms
ghostshadow
Posts: 55
Joined: Sun Sep 13, 2020 10:25 am

Re: Dolby Vision now possible through MP4 Mux.

Post by ghostshadow »

Zidoo Z9x VS10 :
afss, post: 134440, member: 19783 wrote:BTW, I have placed this question on another thread, but in case Mark (or somebody else) knows the answer. How can we find out what the player is actually doing, while using LLDV ? I mean, I think I have properly converted a MEL DV bluray to MKV, and when I play it back on the Z10 pro, I am unable to verify if the conversion was sucessfull and the player is actually using the DV data on the file, or if it is simply treating it as HDR10.

On the OPPO 203, for instance, the info window shows how the source file is being interpreted as (DV, HDR10, SDR). Maybe there is a way somewhere to verify what the player is doing on the Zidoo as well.
Markswift2003, post: 134446, member: 21473 wrote:This is something I'm a bit unclear on too - As far as I know, the player natively supports Profiles 5, 8 & 9 which are all single base layers plus RPU (Reference Processing Unit = metadata interleaved in the video stream).

But as we know, Profile 7 encoding is now leaning more towards MEL than FEL and with the Enhancement Layer omitted, that is simply a standard 10-bit HDR10 stream with a Dolby RPU interleaved (plus HDR10 SEI for backwards compatibility).

So when VS10 is playing out P7 MEL it's either HDR10 with HDR10 SEI converted into P5 or it's HDR10 with Dolby RPU converted into P5 which would basically be a colour map from BT.2020 to IPT since the RPU is the same for both. It all comes down to how the PQ curve is produced on the output - in other words, the tone map.

Unless of course you do as we are doing and introduce BT.2020 primaries in the Dolby block in the EDID, in which case there's no colour map needed so nothing really changes.

I'd like to think it's the latter but as always Dolby are playing their cards very close to their chest and I can't find any technical docs regarding how VS10 deals with this but it would make sense that the RPU is used.
PapitaHD
Posts: 26
Joined: Sun Mar 01, 2020 10:31 am

Re: Dolby Vision now possible through MP4 Mux.

Post by PapitaHD »

yusesope wrote:
Fri Oct 02, 2020 1:00 pm
Another weekend is about to begin so you have a little time to try "the things" I write :lol: :lol: :lol: !
This time it's up to profile 8.1!
I have updated the POST we refer to during this testing phase.
Find all the instructions there.

This update "fixes" what was previously called "-mode 2".

The new lines of code should allow you to convert a UHD-BD (both MEL and FEL) in a file Single Track Single Layer profile 8.1 (STSL dvhe.08.0x, BL + RPU, HDR10 compatible).

All devices, especially TVs with proprietary OS, capable of playing profile 8 files (and which have so far encountered problems with DV) could benefit from this update.

Before starting, to find out if your device is able to correctly reproduce profile 8, use the test files that Dolby provides on THIS page

Happy testing!
As usual, amazing work yusesope! Thanks a lot!
I've tested the new SL method with several FEL and MEL titles and all of them worked perfectly both on M9702 and C8's internal player.
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

mike admin wrote:
Fri Oct 02, 2020 1:26 pm
I wonder if it is actually a profile 8 stream at all.
I hope Spears and his friend Munsil don't use my tool to create their BDs :D .
I therefore assume that the stream was obtained with certified software.
According to this logic it must necessarily be a MEL stream profile 7.
mike admin wrote:
Fri Oct 02, 2020 1:26 pm
Interesting. What happens if we just discard the EL layer in this case? Do you think it is safe?
What Happens? A Dolby Engineer Dies :lol: :lol: :lol: !
Seriously, this is my idea:
If you decide to mark the stream as profile 7, the hardware decoder will process everything through two distinct Threads (one for EL and the other for BL) sharing, simultaneously, the information contained in the same RPU. In the case of BL, the mapping parameters (for the color component cmp) are used to predict the final HDR stream. In the case of EL, the inverse quantization parameters are used to process the EL signal. Clearly, in the case of a FEL stream, a decoding is needed otherwise, in the case of a MEL, hardcoded informations are used (decoding is therefore not necessary). Finally, the BL-derived HDR stream is added to the inverse quantized signal of EL to recreate the original HDR stream.
For the operation to be "thread-safe" it is necessary that the two streams (EL and BL) are perfectly aligned. The RPU they share does not contain any spatial references and does not contain any IDs. This is why it is important that the NALUs of EL (even if practically empty in the case of MEL) are maintained. The "context" of RPU is deduced from the "surrounding environment" common to BL and EL.
So, in this case, I don't think it's safe to remove EL.
I hope I’ve made myself clear.

The other option is to mark the stream as profile 8: you have to delete EL and modify the RPUs (e.g. el_spatial_resampling_filter_flag should be set to false).
We will find out in the future what other parameters will need to be changed!
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

ghostshadow wrote:
Fri Oct 02, 2020 2:53 pm
I'm testing this on Sunday
Let us know!

iamTa wrote:
Fri Oct 02, 2020 4:12 pm
What's the benefit of Single Track Single Layer Profile 8.1?
The choice depends on what are the characteristics of your device.
  • The device plays Dual Track Dual Layer FEL\MEL films -> you don't need my tool (e.g Sony X700)
  • The device plays Single Track Dual Layer FEL\MEL films -> use MUX.bat and DEMUX.bat (e.g Shield 2019)
  • The device plays only Single Track Dual Layer MEL films -> use MUX_AND_CONVERT_TO_MEL.bat and DEMUX_AND_CONVERT_TO_MEL.bat in case of FEL films. Use MUX.bat and DEMUX.bat in the case of MEL films. (e.g Fire Stick 4K)
  • The device does not play neither FEL nor MEL Single Track Dual Layer films -> use MUX_AND_CONVERT_TO_PROFILE_81.bat
quietvoid wrote:
Fri Oct 02, 2020 5:29 pm
I've tried the new -mode 2 with a FEL title (Atomic Blonde) and it plays on the Firestick 4K, while previous default (profile 7) just plays a black screen. So that's good news.
That's with an MKV (1.15.3) and ExoPlayer.

Unless it's automatically using -fel_to_mel when using, I didn't look.

The Dolby 8.1 sample also plays in DV as well using ExoPlayer, but not on the C8 internal player.
The tool created 8.1 plays well after mp4muxer --dv-profile 8 on the internal player but not Kodi or ExoPlayer (playback failed).
Thanks for the feedback


blenky wrote:
Fri Oct 02, 2020 6:32 pm
Managed to get 8.1 working on Zidoo z9X by using tsmuxer to combine with Atmos audio from UHD to create ISO. Then created MKV with MakeMKV. Only thing is audio is out of sync. Need to offset audio ahead by about half a second.

Playback gets juddery after about 5 minutes - unwatchable at that point
If you create a ts or mp4 file (profile 8.1 in both cases) does the same problem arise?
Ps: you don't need any special version of TsMuxeR. Use the programs you find in the post with the instructions.


blenky wrote:
Sat Oct 03, 2020 12:20 am
A correction is needed to the mp4muxer command line for profile 8.1. It should be one of the following (not sure which)
You are right. I just corrected the command line. It was Friday ... I was already drunk ... :mrgreen:


chros wrote:
Fri Oct 02, 2020 7:09 pm
I tested them + 1 small conversion on oppo clone, all of them plays fine! Thank you!!! :)
................................
- 2 mins ts FEL->MEL sample: Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible
Did you mean UHD-BD -> profile 8?
FEL -> MEL is something else!
Thanks for the feedback!


Tomas wrote:
Fri Oct 02, 2020 8:32 pm
Please I wanted to ask there no longer need to be used after MUX_AND_CONVERT_TO_PROFILE_81, use DEMUX step?
Thank you for the advice.
I don't think I understand your question!
However, after using MUX_AND_CONVERT_TO_PROFILE_81.bat no DEMUX step is necessary.
hepe9 wrote:
Sat Oct 03, 2020 12:01 am
Tried it in a Sony Xf90 and the default player doesn't play the demos, the exoplayer played it but has the same problem with the profile 7, red tones everywhere

Thanks anyway
Sorry man, your tv is really out of luck!

whiplash1 wrote:
Sat Oct 03, 2020 1:28 am
Hi yusesope, I'm encountering an unusual problem using beta method 2
.....
There's something definitely wrong with the Demux.bat.
Can you upload this BL_EL_RPU which is giving you problems?

lexyz wrote:
Sat Oct 03, 2020 8:35 am
..................
This leads me to think that the Shield issue is not FEL or MEL related, but that DoVi metadata is not properly handled by decoder
Very interesting. Let us know if the problem also occurs with other titles!

spezi wrote:
Sat Oct 03, 2020 8:37 am
yusesope, you've created MUX_AND_CONVERT_TO_PROFILE_81.bat in your new v0.0.4_BETA_TEST.

Code: Select all

python-3.7.6.amd64\python.exe src\app.py -mux -mode 2
but that's equal to mux.bat now.
I think you should delete -mode 2 in mux.bat so that mux.bat is the same as in earlier releases.
You are absolutely right. I forgot the switch there during one of my tests!

For all those who didn't understand what @spezi said, please re-download the test version again from THIS POST (I just edited it).

Thank you @spezi!!


PapitaHD wrote:
Sat Oct 03, 2020 9:41 am
I've tested the new SL method with several FEL and MEL titles and all of them worked perfectly both on M9702 and C8's internal player.
Thanks to you for your time.
The fact that the internal player of the LG has no problems is very important!
whiplash1
Posts: 38
Joined: Sun Apr 19, 2020 7:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by whiplash1 »

yusesope wrote:
Sat Oct 03, 2020 9:54 am
ghostshadow wrote:
Fri Oct 02, 2020 2:53 pm
I'm testing this on Sunday
Let us know!

iamTa wrote:
Fri Oct 02, 2020 4:12 pm
What's the benefit of Single Track Single Layer Profile 8.1?
The choice depends on what are the characteristics of your device.
  • The device plays Dual Track Dual Layer FEL\MEL films -> you don't need my tool (e.g Sony X700)
  • The device plays Single Track Dual Layer FEL\MEL films -> use MUX.bat and DEMUX.bat (e.g Shield 2019)
  • The device plays only Single Track Dual Layer MEL films -> use MUX_AND_CONVERT_TO_MEL.bat and DEMUX_AND_CONVERT_TO_MEL.bat in case of FEL films. Use MUX.bat and DEMUX.bat in the case of MEL films. (e.g Fire Stick 4K)
  • The device does not play neither FEL nor MEL Single Track Dual Layer films -> use MUX_AND_CONVERT_TO_PROFILE_81.bat
quietvoid wrote:
Fri Oct 02, 2020 5:29 pm
I've tried the new -mode 2 with a FEL title (Atomic Blonde) and it plays on the Firestick 4K, while previous default (profile 7) just plays a black screen. So that's good news.
That's with an MKV (1.15.3) and ExoPlayer.

Unless it's automatically using -fel_to_mel when using, I didn't look.

The Dolby 8.1 sample also plays in DV as well using ExoPlayer, but not on the C8 internal player.
The tool created 8.1 plays well after mp4muxer --dv-profile 8 on the internal player but not Kodi or ExoPlayer (playback failed).
Thanks for the feedback


blenky wrote:
Fri Oct 02, 2020 6:32 pm
Managed to get 8.1 working on Zidoo z9X by using tsmuxer to combine with Atmos audio from UHD to create ISO. Then created MKV with MakeMKV. Only thing is audio is out of sync. Need to offset audio ahead by about half a second.

Playback gets juddery after about 5 minutes - unwatchable at that point
If you create a ts or mp4 file (profile 8.1 in both cases) does the same problem arise?
Ps: you don't need any special version of TsMuxeR. Use the programs you find in the post with the instructions.


blenky wrote:
Sat Oct 03, 2020 12:20 am
A correction is needed to the mp4muxer command line for profile 8.1. It should be one of the following (not sure which)
You are right. I just corrected the command line. It was Friday ... I was already drunk ... :mrgreen:


chros wrote:
Fri Oct 02, 2020 7:09 pm
I tested them + 1 small conversion on oppo clone, all of them plays fine! Thank you!!! :)
................................
- 2 mins ts FEL->MEL sample: Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible
Did you mean UHD-BD -> profile 8?
FEL -> MEL is something else!
Thanks for the feedback!


Tomas wrote:
Fri Oct 02, 2020 8:32 pm
Please I wanted to ask there no longer need to be used after MUX_AND_CONVERT_TO_PROFILE_81, use DEMUX step?
Thank you for the advice.
I don't think I understand your question!
However, after using MUX_AND_CONVERT_TO_PROFILE_81.bat no DEMUX step is necessary.
hepe9 wrote:
Sat Oct 03, 2020 12:01 am
Tried it in a Sony Xf90 and the default player doesn't play the demos, the exoplayer played it but has the same problem with the profile 7, red tones everywhere

Thanks anyway
Sorry man, your tv is really out of luck!

whiplash1 wrote:
Sat Oct 03, 2020 1:28 am
Hi yusesope, I'm encountering an unusual problem using beta method 2
.....
There's something definitely wrong with the Demux.bat.
Can you upload this BL_EL_RPU which is giving you problems?

lexyz wrote:
Sat Oct 03, 2020 8:35 am
..................
This leads me to think that the Shield issue is not FEL or MEL related, but that DoVi metadata is not properly handled by decoder
Very interesting. Let us know if the problem also occurs with other titles!

spezi wrote:
Sat Oct 03, 2020 8:37 am
yusesope, you've created MUX_AND_CONVERT_TO_PROFILE_81.bat in your new v0.0.4_BETA_TEST.

Code: Select all

python-3.7.6.amd64\python.exe src\app.py -mux -mode 2
but that's equal to mux.bat now.
I think you should delete -mode 2 in mux.bat so that mux.bat is the same as in earlier releases.
You are absolutely right. I forgot the switch there during one of my tests!

For all those who didn't understand what @spezi said, please re-download the test version again from THIS POST (I just edited it).

Thank you @spezi!!


PapitaHD wrote:
Sat Oct 03, 2020 9:41 am
I've tested the new SL method with several FEL and MEL titles and all of them worked perfectly both on M9702 and C8's internal player.
Thanks to you for your time.
The fact that the internal player of the LG has no problems is very important!
Hi yusesope, problem is I'm getting varied results from the file. After many tries, it finally demuxed using 0.0.4 beta. This is the shorter clip btw. However I've had no luck demuxing the larger file. Can't upload that because it's too big! 71 GB. My question is, can I demux the larger BL_EL_RPU file using ffmeg again? I'm currently demuxing it with ffmpeg as we speak, however there's two lines in the command window that are worrying me.
There's two lines saying - Skipping NAL unit 63 and Skipping NAL unit 63.

Have a look here -
https://ibb.co/BKbhj34
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

whiplash1 wrote:
Sat Oct 03, 2020 10:12 am
........I've had no luck demuxing the larger file.
ffmpeg is useless in this situation.
Unfortunately without a sample I can't tell you what's wrong!

Can you upload a cut where the problem is present?
whiplash1 wrote:
Sat Oct 03, 2020 1:28 am
I checked with a shorter clip (6 mins), same issue.
Does this clip still have the problem? Can you upload it (should only be 2GB)?
whiplash1
Posts: 38
Joined: Sun Apr 19, 2020 7:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by whiplash1 »

yusesope wrote:
Sat Oct 03, 2020 11:24 am
whiplash1 wrote:
Sat Oct 03, 2020 10:12 am
........I've had no luck demuxing the larger file.
ffmpeg is useless in this situation.
Unfortunately without a sample I can't tell you what's wrong!

Can you upload a cut where the problem is present?
whiplash1 wrote:
Sat Oct 03, 2020 1:28 am
I checked with a shorter clip (6 mins), same issue.
Does this clip still have the problem? Can you upload it (should only be 2GB)?
No, the shorter clip demuxed fine after a few tries. Actually it was from a different mt2s. However, the main title m2ts demuxed fine, muxes fine too into mux_and_convert_to_FEL.bat. But problems arise during demuxing it after that. I played the m2ts file using vlc, it plays just fine, all chapters/audio tracks/subtitles track, all fine. So I'm not sure where exactly lies the problem :(

Edit: Nevermind, I'm a retard. I just saw your replies. My device plays ONLY STDL MEL files, so for FEL title like Apocalypse Now I should have used Mux and convert to MEL.bat and then followed up with Demux and convert to MEL.bat. I had been using just Mux and convert to MEL.bat followed by Demux.bat. I'm now doing it over again. Will post results soon.
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

whiplash1 wrote:
Sat Oct 03, 2020 11:44 am
I should have used Mux and convert to MEL.bat and then followed up with Demux and convert to MEL.bat....
No my friend!
You cannot use MUX_AND_CONVERT_TO_MEL.bat and DEMUX_AND_CONVERT_TO_MEL.bat on the same file!
You would end up doing a mess ...
Please follow these instructions:
yusesope wrote:
Thu Sep 17, 2020 2:59 pm
  1. FEL TO MEL

    It goes without saying that these tests must be done on FEL titles. Do not use titles that are already MEL !!!!!
    • In the case of a Dual Track Dual Layer DV file (e.g. an m2ts file in the BDMV\STREAM folder)
      • Extract the base layer and the enhancement layer

        Code: Select all

        ffmpeg -i path\to\the\file.m2ts -ss 0 -t 120 -map 0:0 -c copy path\to\BL.hevc
        ffmpeg -i path\to\the\file.m2ts -ss 0 -t 120 -map 0:1 -c copy path\to\EL.hevc
      • Using my tool, double click on the MUX_AND_CONVERT_TO_MEL.bat file and follow the instructions on the screen.
        You will get a BL_EL_RPU.hevc file
      • Create a TS file using the BL_EL_RPU.hevc file and TsMuxeR

        EXTRA (MP4):
        In case TsMuxeR does not return a working file, create an mp4 file

        Code: Select all

        mp4muxer -i path\to\BL_EL_RPU.hevc --dv-profile 7 -o path\to\TEST_FILE.mp4
        EXTRA (MKV):
        Using my tool, double click on "DEMUX.bat" and drag and drop BL_EL_RPU.hevc
        You will get a BL.hevc file and a EL_RPU.hevc file
        Import the two BL.hevc (as first) and EL_RPU.hevc (as second) into TsMuxeR and create an ISO file.
        Open the ISO with MakeMKV
Post Reply