Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
Post Reply
whiplash1
Posts: 38
Joined: Sun Apr 19, 2020 7:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by whiplash1 »

pitrako wrote: Sun Sep 13, 2020 3:45 pm Is modded exoplayer with kodi able to play FEL?
Able to play FEL yes. But in HDR. Only MELs trigger DV for now with the modded exoplayer.
Last edited by whiplash1 on Sun Sep 13, 2020 6:00 pm, edited 2 times in total.
RayDawGGG
Posts: 12
Joined: Tue Aug 18, 2020 10:32 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RayDawGGG »

Saiyajin wrote: Sun Sep 13, 2020 8:00 am Hi.

Looks like my LG55CX (after latest firmware update) supports only DV profile 5 and 8 (did not get a chance to check profile 4), not profile 7.

Is there any way to convert profile 7 into either 5 or even better 8? Any tools available?
Converting a "profile" is unnecessary. You did not state what tools you're using to obtain profile 7. If it's MP4Muxer, just mux your content into profile 5 or 8. If tsMuxer is your tool, use
5.06 fix https://drive.google.com/file/d/1ezfsbV ... sp=sharing for profile 5
8.06 fix https://drive.google.com/file/d/1J2nqPx ... sp=sharing for profile 8
Saiyajin
Posts: 2
Joined: Sun Sep 13, 2020 7:24 am

Re: Dolby Vision now possible through MP4 Mux.

Post by Saiyajin »

RayDawGGG wrote: Sun Sep 13, 2020 6:05 pm
Saiyajin wrote: Sun Sep 13, 2020 8:00 am Hi.

Looks like my LG55CX (after latest firmware update) supports only DV profile 5 and 8 (did not get a chance to check profile 4), not profile 7.

Is there any way to convert profile 7 into either 5 or even better 8? Any tools available?
Converting a "profile" is unnecessary. You did not state what tools you're using to obtain profile 7. If it's MP4Muxer, just mux your content into profile 5 or 8. If tsMuxer is your tool, use
5.06 fix https://drive.google.com/file/d/1ezfsbV ... sp=sharing for profile 5
8.06 fix https://drive.google.com/file/d/1J2nqPx ... sp=sharing for profile 8
Much obliged.
pitrako
Posts: 17
Joined: Sun Sep 13, 2020 7:55 am

Re: Dolby Vision now possible through MP4 Mux.

Post by pitrako »

I tried extracting the base layer and the enhancement layer with eac3to, merging with yusesope's tool for BL_EL_RPU file, using tsmuxer to get .ts and I get just sound without image, why?

EDIT: I reset my TV and I tested again with the movie 1917 (has FEL too) ripped with DVDFab in MP4, at first It didn't work (wrong colors: purple, green...), I was bored and frustrated but I tried again after some time and the colors are correct now, someone knows If this is a known problem of this model (TV PUS7304)? MEL movies are always color correct.
kws53
Posts: 49
Joined: Sun May 04, 2014 9:09 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by kws53 »

Does anyone know what Windows video application will play a .ts file made using Yusesope's tool for "BL_EL_RPU.hevc" and muxed using 04.06fix tsmuxer version? VLC will NOT play the file.
kws53
Posts: 49
Joined: Sun May 04, 2014 9:09 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by kws53 »

Second .ts question - is there a "forced" flag available for SRT subtitles? I am in the process of converting my DV ISO's to .ts format (Yusesope tool+0406fix) for play through my Nvidia Pro Shield 2019 (from PLEX Server on Desktop), Denon AVR and OLED77CX. A number of them (MI 4 for example) have some English forced subtitles.
pitrako
Posts: 17
Joined: Sun Sep 13, 2020 7:55 am

Re: Dolby Vision now possible through MP4 Mux.

Post by pitrako »

I realised that If I turn off the TV the colors turns wrong again and If I want to watch the movie right I have to play first the Joker for example (MEL movie) and then switch to 1917 (FEL movie), all this in the internal native player, anyone knows what's might happening? Maybe the TV needs an update to fix this? Or the TV is defective?
MastaG
Posts: 98
Joined: Thu Aug 08, 2019 11:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by MastaG »

There's 04.06, 05.06 and 08.06 fixed versions of TSMuxer.

Could somebody please invest some time in explaining what they actually fix (and for which device(s)) ?
And perhaps show what's changed in the source code so I can decide if I require this fix and build it myself based on the latest version of TSMuxer (which carries many improvements and corrections btw).
shawnc22
Posts: 637
Joined: Tue Jan 21, 2020 7:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by shawnc22 »

MastaG wrote: Wed Sep 16, 2020 9:50 pm There's 04.06, 05.06 and 08.06 fixed versions of TSMuxer.

Could somebody please invest some time in explaining what they actually fix (and for which device(s)) ?
And perhaps show what's changed in the source code so I can decide if I require this fix and build it myself based on the latest version of TSMuxer (which carries many improvements and corrections btw).
They're not really fixing anything. The 04.06 version is an old version (circa ~March/April) that assigned BL+EL+RPU streams as profile 4. The current version nightly assigns them as profile 6. The 05.06 version is I think a user modified version that forcibly assigns a BL+RPU stream as profile 5 instead of 8 for playback on AppleTVs. I don't know what the 08.06 version is, but if it's forcibly assigning streams as profile 8, then I wouldn't go near it. The current nightly correctly labels BL+RPU streams as profile 8 and that's about the only thing that should be labeled as profile 8.
DaMacFunkin
Posts: 314
Joined: Tue Oct 30, 2018 4:17 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by DaMacFunkin »

kws53 wrote: Wed Sep 16, 2020 6:37 pm Second .ts question - is there a "forced" flag available for SRT subtitles? I am in the process of converting my DV ISO's to .ts format (Yusesope tool+0406fix) for play through my Nvidia Pro Shield 2019 (from PLEX Server on Desktop), Denon AVR and OLED77CX. A number of them (MI 4 for example) have some English forced subtitles.
<movie name>.eng.forced.srt
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

Good afternoon everyone.
The weekend is approaching so it seemed appropriate to me to release something for you to play with.

I start by thanking @jcdr428 (from TsMuxeR a.k.a a5180007) who gave me the possibility to use and modify his code for parsing the NALU RPUs.

As anticipated some posts ago, maybe I found the way to "convert" a FEL file to MEL.
This latest innovation together with the previous idea of ​​combining the two layers (BL and EL_RPU) in a single track, should guarantee the possibility of playing any FEL UHD-BD backup on Android devices equipped with a Dolby Vision decoder and capable of playing THIS file (+ my ExoPlayer) or THIS file.

Fingers crossed!

Forgive immediately any error in the code but this time I'm just out of my comfort zone: the pure python implementation of the new idea would have resulted in an extension of the times from 20 minutes (with the CPU always at 100%) up to 60-80 minutes. I had to rewrite the new idea in C++, cutting the time down to less than 60 seconds. Theoretically therefore, you shouldn't notice any difference in timing compared to previous versions of my tool.
I don't have a mac and I can't (want :roll: ) compile my code for macOS users. For now the latter cannot use this version of my tool (the problem is easily solved if some of you with a mac compile my code).

UPDATE 02/10/20
I added the possibility to "convert" a UHD-BD (MEL or FEL, it doesn't matter) into a profile 8.1 file (Single Track Single Layer)

UPDATE 16/10/20
Thanks to @quietvoid it is now possible to discard HDR10+ metadata in case your device (ex: FireStick 4k) does not like DoVi + HDR10+.
Those who want to skip HDR10+ metadata have to edit all ".bat" files (right click -> edit) by adding the -skip_hdr10plus switch

UPDATE 17/10/20
Added Experimental Muxer
More details HERE

HERE is the new version (FEL to MEL + UHD-BD to 8.1 + SKIP HDR10+ + Experimental Muxer) (I don't update my original post because I wait for your tests first).
These are the steps I followed to make the test videos that some of you tried a few days ago (once again HERE).
You need FFmpeg (the executable is in the bin folder), this version of TsMuxeR, this version of mp4muxer and MakeMKV (v1.15.3). Before testing an entire film I advise you to work with 120 second cuts.
  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
    • In the case of a Single Track Dual Layer DV file (e.g. mkv, ts, mp4 file previously modified using MakeMKV and/or TsMuxeR and/or my tool)
      • Extract the BL_EL_RPU.hevc file

        Code: Select all

        ffmpeg -i path\to\the\file.mp4 -ss 0 -t 120 -map 0:0 -c copy path\to\BL_EL_RPU.hevc
      • Using my tool, double click on the DEMUX_AND_CONVERT_TO_MEL.bat file and follow the instructions on the screen.
        You will get a BL.hevc file and a EL_RPU.hevc file
      • Using my tool, double click on the MUX.bat file (and NOT MUX_AND_CONVERT_TO_MEL.bat) 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):
        Right after using DEMUX_AND_CONVERT_TO_MEL.bat, 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
  2. UHD-BD TO PROFILE 8.1

    You can use both UHD-BD MEL and FEL
    • 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_PROFILE_81.bat file and follow the instructions on the screen.
        You will get a BL_EL_RPU.hevc file.
        Actually, the file does not contain EL (it's just BL+RPU).
        BL_EL_RPU is just the filename !!!
        Let's put it this way, you are too lazy to use the command line and I am too lazy to add lines of code for the purpose of renaming a file :mrgreen: !
      • 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 8 --dv-bl-compatible-id 1 -o path\to\TEST_FILE.mp4
        EXTRA (MKV):
        Simply, create an ISO using BL_EL_RPU and TsMuxeR.
        Open the ISO with MakeMKV
    • In the case of a Single Track Dual Layer DV file (e.g. mkv, ts, mp4 file previously modified using MakeMKV and/or TsMuxeR and/or my tool)
      • Extract the BL_EL_RPU.hevc file

        Code: Select all

        ffmpeg -i path\to\the\file.mp4 -ss 0 -t 120 -map 0:0 -c copy path\to\BL_EL_RPU.hevc
      • Using my tool, double click on the DEMUX.bat file and follow the instructions on the screen.
        You will get a BL.hevc file and a EL_RPU.hevc file
      • Using my tool, double click on the MUX_AND_CONVERT_TO_PROFILE_81.bat file and follow the instructions on the screen.
        You will get a BL_EL_RPU.hevc file. Regarding the name BL_EL_RPU, the same considerations apply as before!
      • 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 8 --dv-bl-compatible-id 1 -o path\to\TEST_FILE.mp4
        EXTRA (MKV):
        Simply, create an ISO using BL_EL_RPU and TsMuxeR.
        Open the ISO with MakeMKV


To avoid problems, if you can, use my version of ExoPlayer (HERE).

Happy testing!
Last edited by yusesope on Sat Oct 17, 2020 11:20 am, edited 13 times in total.
kws53
Posts: 49
Joined: Sun May 04, 2014 9:09 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by kws53 »

DaMacFunkin wrote: Thu Sep 17, 2020 10:16 am <movie name>.eng.forced.srt
Thank you for the response. So using tsmuxer to mux my MI4.HEVC, MI4.AC3, and MI4.eng.forced.srt together into MI4.ts will result in PLEX playing the subtitles automatically?
kws53
Posts: 49
Joined: Sun May 04, 2014 9:09 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by kws53 »

shawnc22 wrote: Wed Sep 16, 2020 10:06 pm They're not really fixing anything. The 04.06 version is an old version (circa ~March/April) that assigned BL+EL+RPU streams as profile 4. The current version nightly assigns them as profile 6. The 05.06 version is I think a user modified version that forcibly assigns a BL+RPU stream as profile 5 instead of 8 for playback on AppleTVs. I don't know what the 08.06 version is, but if it's forcibly assigning streams as profile 8, then I wouldn't go near it. The current nightly correctly labels BL+RPU streams as profile 8 and that's about the only thing that should be labeled as profile 8.
What would you recommend using for BL+EL+RPU.hevc made from Yusesope's tool with a Shield Pro 2019? I'm currently using 0406fix but currently have no way of verifying its efficacy as my 77CX is enroute. Are you suggesting using the 06.06fix (or as an alternative, the current nightly) for my purposes?
pitrako
Posts: 17
Joined: Sun Sep 13, 2020 7:55 am

Re: Dolby Vision now possible through MP4 Mux.

Post by pitrako »

yusesope wrote: Thu Sep 17, 2020 2:59 pm Good afternoon everyone.
The weekend is approaching so it seemed appropriate to me to release something for you to play with.

I start by thanking @jcdr428 (from TsMuxeR a.k.a a5180007) who gave me the possibility to use and modify his code for parsing the NALU RPUs.

As anticipated some posts ago, maybe I found the way to "convert" a FEL file to MEL.
This latest innovation together with the previous idea of ​​combining the two layers (BL and EL_RPU) in a single track, should guarantee the possibility of playing any FEL UHD-BD backup on Android devices equipped with a Dolby Vision decoder and capable of playing THIS file (+ my ExoPlayer) or THIS file.

Fingers crossed!

Forgive immediately any error in the code but this time I'm just out of my comfort zone: the pure python implementation of the new idea would have resulted in an extension of the times from 20 minutes (with the CPU always at 100%) up to 60-80 minutes. I had to rewrite the new idea in C++, cutting the time down to less than 60 seconds. Theoretically therefore, you shouldn't notice any difference in timing compared to previous versions of my tool.
I don't have a mac and I can't (want :roll: ) compile my code for macOS users. For now the latter cannot use this version of my tool (the problem is easily solved if some of you with a mac compile my code).


HERE is the new version (I don't update my original post because I wait for your tests first) and these are the steps I followed to make the test videos that some of you tried a few days ago (once again HERE).
You need FFmpeg (the executable is in the bin folder) and this version of mp4muxer. Before testing an entire film I advise you to work with 120 second cuts.

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 an mp4 file

    Code: Select all

    mp4muxer -i path\to\BL_EL_RPU.hevc --dv-profile 7 -o path\to\TEST_FILE.mp4

In the case of a Single Track Dual Layer DV file (e.g. mkv, ts, mp4 file previously modified using MakeMKV and/or TsMuxeR and/or my tool)
  • Extract the BL_EL_RPU.hevc file

    Code: Select all

    ffmpeg -i path\to\the\file.mp4 -ss 0 -t 120 -map 0:0 -c copy path\to\BL_EL_RPU.hevc
  • Using my tool, double click on the DEMUX_AND_CONVERT_TO_MEL.bat file and follow the instructions on the screen.
    You will get a BL.hevc file and a EL_RPU.hevc file
  • Using my tool, double click on the MUX.bat file (and NOT MUX_AND_CONVERT_TO_MEL.bat) and follow the instructions on the screen.
    You will get a BL_EL_RPU.hevc 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


To avoid problems, if you can, use my version of ExoPlayer (HERE).

I purposely didn't use TsMuxeR because the final output wouldn't have profile 7.
If my gimmick works maybe @jcdr428 can modify TsMuxeR once again to make files with profile 7 thus eliminating all those versions (04.fix, 06.fix, 08.fix) that are circulating and that only confuse ideas.

Happy testing!
Exception in thread Thread-5:SIS: 0.0% BL_EL_RPU WRITING: 0.0% (BL AUs: 244 EL AUs: 571)
Traceback (most recent call last):
File "D:\Dolby Vision\v0.0.4_BETA\python-3.7.6.amd64\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "src\app.py", line 395, in run
self.cpp_lib = self.init_cpp_lib()
File "src\app.py", line 342, in init_cpp_lib
cpp_lib = cdll.LoadLibrary(cpp_lib_path)
File "D:\Dolby Vision\v0.0.4_BETA\python-3.7.6.amd64\lib\ctypes\__init__.py", line 442, in LoadLibrary
return self._dlltype(name)
File "D:\Dolby Vision\v0.0.4_BETA\python-3.7.6.amd64\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Cannot find the specified module

BL_ANALYSIS: 0.0% EL_ANALYSIS: 0.0% BL_EL_RPU WRITING: 0.0% (BL AUs: 509 EL AUs: 571)

Error for me and stuck.
Last edited by pitrako on Thu Sep 17, 2020 4:27 pm, edited 2 times in total.
quietvoid
Posts: 377
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

yusesope wrote: Thu Sep 17, 2020 2:59 pmIt goes without saying that these tests must be done on FEL titles. Do not use titles that are already MEL !!!!!
Just tried this and it works on the FireTV Stick 4K.

On archlinux, my steps (starting from a mode1 muxed BL_EL_RPU.hevc file):
Mux to mkv, split to make smaller.
Demux to hevc.
python app.py -lbf 50 -demux -fel_to_mel -if video.hevc
python app.py -lbf 50 -mux -bl BL.hevc -el EL_RPU.hevc
mp4muxer_64bits -i BL_EL_RPU.hevc --dv-profile 7 -o test.mp4

And it plays in Dolby Vision with ExoPlayer. :)
PS: there should probably be an indication or something to stop instead of just "Wait...", the default -lbf value just hanged because the file sample is small.
Post Reply