Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
RESET_9999
Posts: 1853
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

if "%spanish%"=="YES" set lang=Spanish& set langDG=spa& set lmp4=sp& set lmkv=sp
to:
if "%spanish%"=="YES" set lang=Spanish& set langDG=spa& set lmp4=es& set lmkv=es
Thank you . I will make the change in the next version. :)
yossSP wrote:
Sun Jan 15, 2023 6:09 pm
I would want to launch a question:
Which conversion from a lossless 7.1 audio track is better? EAC3 5.1@1536kbps or EAC3 7.1@1024kbps.
It could be really noticiable the loss of quality from the reduced bitrate? I prefer to loose the extra channels if the lack of quality is noticiable.

PS: I'm aware of the limitation of not having dee.exe.
If you have a 7.1 audio system. Use 7.1 DD+ otherwise use 5.1 1536kbps.
The quality difference between 1024 and 1536kbps is VERY small.

I have DEE and can encode 7.1 @1536kbps but I think the quality sucks and I prefer FFmpeg and EAE. DEE does some DRC and it cannot be disabled (not to mention it also swaps channels by default).
audio test file: https://drive.google.com/file/d/1wRlklh ... share_link
https://ibb.co/f2w4MhG


@all
new test files for testing the red push and LLDV bugs.

red push doctor sleep still image with original DV metadata :https://drive.google.com/file/d/1PUwrol ... share_link
https://slow.pics/c/S9ruWxg8

LLDV bug, SM eagle beak with L2 metadata removed 1 by 1:https://drive.google.com/file/d/1qdHux6 ... share_link
https://slow.pics/c/4doOXG0u
On the C8, it's when you remove the trim chroma weight that makes it look darker yellow like in LLDV instead of bright yellow in TV-LED. On the C2 it looks dark yellow in TV-LED and LLDV, no bright yellow like the C8.

P5 P8 L1 L2 shield x800 c2 and chromecast comparison: https://www.youtube.com/watch?v=4f67ZD1rKpc
https://slow.pics/c/uTv89yEM
https://slow.pics/c/WDNLL8hi
https://slow.pics/c/4doOXG0u
chronomac
Posts: 17
Joined: Mon Dec 20, 2021 8:42 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by chronomac »

EDIT: Ignore post. Had a John Wick question. Didn't realize 1 and 2 were only in HDR10 and not DV.
nekno
Posts: 56
Joined: Tue Jun 23, 2020 4:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by nekno »

What are the correct ffmpeg options needed to demux an HDR10+ HEVC stream from an MKV file?

When demuxing DV video, I've gotten used to adding a bitstream filter:

Code: Select all

ffmpeg -i video.mkv -c:v copy -vbsf hevc_mp4toannexb -f hevc video.hevc
I understand from the docs that the BSF is automatic for HEVC and MPEG-TS output, but I picked it up from the dovi_tool sample commands.

If I demux an HDR10+ HEVC stream with or without the BSF option explicitly specified (using ffmpeg 5.1.2), the HEVC stream seems to get corrupted.

Several HEVC hardware decoders I've tested freeze at a scene change 17mins into the program, where perhaps there was an SEI NALU for some HDR10+ metadata that gets dropped and corrupts the output?

I'm trying to convert the HDR10+ to DV8 with hdr10plus_tool and dovi_tool.

Everything works and the resulting output decodes successfully with DV8 if I use mkvextract for the initial demux.

The HEVC stream immediately after demuxing with ffmpeg, before using any of the other tools, is immediately corrupt. It won't play past the scene change.

So why not just stick to mkvextract or tsMuxer? Because sometimes I want to use stdout from ffmpeg to pipe the video stream into another command, e.g., dovi_tool, and I'm not aware of another multipurpose demuxer that allows output to stdout. Is there an alternative?
Seraphimon956
Posts: 3
Joined: Thu Jan 12, 2023 4:47 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Seraphimon956 »

You just have to remux the original m2ts to a new m2ts(or ts) with tsmuxer to get DV. Your new m2ts will have the proper flag
Thank you, now I can confirm it. The mistake I did (for quite some time now and I regret not having understood it before :roll: ) was to play the m2ts inside the BDMV folder without using the AVCHD virtual folder procedure. I did that to save the hassle of putting back every time the BDMV folder of each ripped disk at the USB root of the X700, at the cost of losing chapter selection and forced subtitles. I thought that since the DV flags were applied to the m2ts of the BDMV folder I created with tsmuxer, it was safe to start playing the muxed file navigating to the STREAM folder and simply playing the m2ts from there. Instead, if one wishes to do that, the output of tsmuxer must be uniquely a ts or m2ts file. The BDMV folder outputs DV content only when played with the AVCHD method, otherwise it will keep playing base HDR10 content without the enhancement layer.
I don't have a CX to know how audio is treated, but you're expecting the CX to pass the TrueHD audio through to an audio device via eARC? What does the device say it's decoding? My understanding is that the CX does not have a TrueHD decoder to play back the audio on the TV. The Atmos support is limited to an EAC3 decoder. Supported codecs: AC4, AC3 (Dolby Digital), EAC3, HE-AAC, AAC, MP2, MP3, PCM, WMA, apt-X (refer to manual)
That is the strange thing. I had plans to buy a Denon AVR for enjoying Atmos content, and I thought I could confirm that the Atmos track within the BDMV folder I created was a THD+AC3 core. The LG CX supposedly supports Atmos decoding, although naturally there is no real benefit in using the TV internal speakers. Several times I played MEL movies (Profile 8.1) using the poor internal TV player and the TV indeed showed the Atmos label whenever the given file had a TrueHD track. But it seems that DV FEL contents with Atmos track will make the label appear only when they are in the form of .ts file, even if the x700 actually shows that the track played is TrueHD. So I think that the BDMV folders I created are correctly muxed and this is just a visual bug of the LG CX. When I will purchase an AVR I hope the content I have created in the past will be fully compatible.
I send my video+audio from the X700 through an AVR to a TV, and the AVR plays and decodes and shows the info for TrueHD Atmos when the audio stream is properly muxed with an AC3 core.
I wonder, in your case the TV too shows that is receiving Atmos content? That info would be really helpful, thank you very much.
Last edited by Seraphimon956 on Tue Jan 17, 2023 6:01 pm, edited 2 times in total.
RESET_9999
Posts: 1853
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

nekno wrote:
Mon Jan 16, 2023 4:17 am
What are the correct ffmpeg options needed to demux an HDR10+ HEVC stream from an MKV file?
I don't have an answer for you but I too have a lot of issues with ffmpeg when i demux so i avoid it at all cost.

this best and most reliable way IMO is :
-mkvextract for mkv
-tsmuxer for ts/m2ts
-dgdemux for bluray disc
I'm trying to convert the HDR10+ to DV8 with hdr10plus_tool and dovi_tool.
I dont think converting HDR10plus to DV is a good idea and I'm even thinking of removing it from my script. The HDR10plus max_PQ numbers just dont make sense, always much brighter than what DV and HDR10 are.
example: https://slow.pics/c/a3EFaZTC
there are other examples buried in here: https://drive.google.com/drive/u/1/fold ... KFJwFxnDt-

I even tested to generate HDR10plus in resolve and got the same "too bright peak" compared to what the actual content is:
https://slow.pics/c/4v8Qvafz

Seraphimon956 wrote:
Mon Jan 16, 2023 5:39 pm
None of the LG TVs can decode Atmos from TrueHD.
I dont know the behavior on the internal LG player but using the PLEX app, the lossless audio gets converted on the fly to DD+ or opus 7.1 and it breaks DV support in the process.
yossSP
Posts: 54
Joined: Tue Feb 16, 2021 7:42 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yossSP »

RESET_9999 wrote:
Sun Jan 15, 2023 6:37 pm
yossSP wrote:
Sun Jan 15, 2023 6:09 pm
I would want to launch a question:
Which conversion from a lossless 7.1 audio track is better? EAC3 5.1@1536kbps or EAC3 7.1@1024kbps.
It could be really noticiable the loss of quality from the reduced bitrate? I prefer to loose the extra channels if the lack of quality is noticiable.

PS: I'm aware of the limitation of not having dee.exe.
If you have a 7.1 audio system. Use 7.1 DD+ otherwise use 5.1 1536kbps.
The quality difference between 1024 and 1536kbps is VERY small.

I have DEE and can encode 7.1 @1536kbps but I think the quality sucks and I prefer FFmpeg and EAE. DEE does some DRC and it cannot be disabled (not to mention it also swaps channels by default).
audio test file: https://drive.google.com/file/d/1wRlklh ... share_link
https://ibb.co/f2w4MhG
Ok, thanks for the feedback @RESET_9999, I'll discard definitively DEE use.
My Onkyo AV Receiver is 7.1 capable but it's connected to a 5.0 speaker setup, so for me it's necesary to downmix always to 5.0, but I will try to use DD+ 7.1@1024, because of the very small quality difference with DD+ 5.1@1536 and beacause I think that is preferible to keep all the original channels and let my Onkyo downmix better than do it via software (Fmpeg + EAE).
DylanValenti
Posts: 10
Joined: Sat Dec 19, 2020 9:42 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by DylanValenti »

I'm trying to install the script but I can't find a place to get the tools folder. Without it I keep getting "The system cannot find the path specified". Any ideas? @RESET_9999
yossSP
Posts: 54
Joined: Tue Feb 16, 2021 7:42 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yossSP »

RESET_9999 wrote:
Sun Jan 15, 2023 6:37 pm
if "%spanish%"=="YES" set lang=Spanish& set langDG=spa& set lmp4=sp& set lmkv=sp
to:
if "%spanish%"=="YES" set lang=Spanish& set langDG=spa& set lmp4=es& set lmkv=es
Thank you . I will make the change in the next version. :)
After a few more tests, the definitive code to detect spanish tracks is the next one:

Code: Select all

if "%spanish%"=="YES" set lang=Spanish& set langDG=spa& set lmp4=es-ES& set lmkv=es
sw5163
Posts: 140
Joined: Sat Jun 25, 2022 7:28 am

Re: Dolby Vision now possible through MP4 Mux.

Post by sw5163 »

RESET_9999 wrote:
Sun Jan 15, 2023 1:45 pm
nop i dont think so. If it ever happens it will be from there: https://forum.doom9.org/showthread.php?t=184364
the best you can do i think (but never tried) is to take the metadata from an existing DD+ atmos 768kbps track and encode a new 1536kbps DD+ atmos track in DEE + cavernize using the TrueHD and DDP track metadata.
https://www.audiosciencereview.com/foru ... 51/page-14
I think you can get "Fixed" eac3 atmos from TrueHD atmos now, if you somehow have Dolby Encoding Engine and Dolby Reference Player.

Use https://gist.github.com/Plazik/e950267c ... 879aaa3d5d atmos_decode.py to decode TrueHD+atmos to 16 channel WAV and put those tracks in DEE.

Although the dynamic object data will be lost but you can actually get 7.1.4 or 9.1.6. Just configure the output when decoding.

I would also like to ask if there is a way to merge 12 single channel WAV files into 7.1.4 multi-channel PCM or WAV.
I tried FFmpeg's amerge but I don't know how to merge the over head channel.
To be honest, I don't know anything about audio encoding, and I have no idea what I'm doing.
Videoman
Posts: 1
Joined: Wed Jan 18, 2023 12:59 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Videoman »

@RESET_9999

Hello and many thanks for your excellent script that can be of great value to many people.

I'd appreciate it if you (or anyone else) could help me out with exactly what changes (in detail) I need to make to the script to get the output as outlined below, as I've tried a few different things but haven't quite made it yet.

Input is MKV-container from 4K UHD disk ripped with MakeMKV, that contains:
- DoVi P7 video file
- Multiple audio files, sometimes in English, sometimes in Norwegian, sometimes in Swedish
- One or multiple PGS subtitles, usually in Norwegian, sometimes in English og Swedish

I like the output to be:
- DoVi P8.1 video file
- All input audio files untouched/passthrough
- All input subtitles untouched/passthrough
- Muxed together in a MKV-container

Thank you in advance.
RESET_9999
Posts: 1853
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Videoman wrote:
Wed Jan 18, 2023 1:26 pm
I like the output to be:
- DoVi P8.1 video file
- All input audio files untouched/passthrough
- All input subtitles untouched/passthrough
- Muxed together in a MKV-container
Thank you in advance.
Edit the bat file at line 22 -----> "set MUX=NO"
and line 19 ----> "set container=MKV"

then at the end of the workflow 4-2, you will have the option to mux any audio/sub you want in mkvtoolnix.

yossSP wrote:
Tue Jan 17, 2023 4:47 pm
After a few more tests, the definitive code to detect spanish tracks is the next one:

Code: Select all

if "%spanish%"=="YES" set lang=Spanish& set langDG=spa& set lmp4=es-ES& set lmkv=es
sw5163 wrote:
Tue Jan 17, 2023 5:41 pm
https://www.audiosciencereview.com/foru ... 51/page-14
I think you can get "Fixed" eac3 atmos from TrueHD atmos now, if you somehow have Dolby Encoding Engine and Dolby Reference Player.
thanks guys! :)

I'm trying to install the script but I can't find a place to get the tools folder. Without it I keep getting "The system cannot find the path specified". Any ideas? @RESET_9999
Yes I wont share the tools pack anymore.

@New dovi_script users, PM to get info on where to get the tools.
fervidace
Posts: 1
Joined: Wed Jan 18, 2023 11:46 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by fervidace »

anyone know how to get the tools for the dovi scripts? I cant find reference on where to get them anywhere. i would pm @RESET_9999 but im new to the forum and cant send PMs
ragico
Posts: 257
Joined: Fri Feb 15, 2019 1:09 am

Re: Dolby Vision now possible through MP4 Mux.

Post by ragico »

@quietvoid
Please can you share your Kodi 20 build?
Many thanks
quietvoid
Posts: 371
Joined: Sun Apr 19, 2020 4:15 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by quietvoid »

ragico wrote:
Thu Jan 19, 2023 2:52 pm
@quietvoid
Please can you share your Kodi 20 build?
Many thanks
I don't have any new one as my latest added on the fly DoVi converting for profile 7, FEL.
It's v21 though, and not really ready.
danbez
Posts: 13
Joined: Tue Nov 27, 2018 6:08 am

Re: Dolby Vision now possible through MP4 Mux.

Post by danbez »

quietvoid wrote:
Thu Jan 19, 2023 5:54 pm
ragico wrote:
Thu Jan 19, 2023 2:52 pm
@quietvoid
Please can you share your Kodi 20 build?
Many thanks
I don't have any new one as my latest added on the fly DoVi converting for profile 7, FEL.
It's v21 though, and not really ready.
Can you share more details about the plan for this conversion, @quietvoid. It sounds really interesting. Are you using DoViBaker to achieve that on-the-fly conversion of FEL?
Post Reply