Dolby Vision now possible through MP4 Mux.
Re: Dolby Vision now possible through MP4 Mux.
EDIT: Ignore post. Had a John Wick question. Didn't realize 1 and 2 were only in HDR10 and not DV.
Re: Dolby Vision now possible through MP4 Mux.
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:
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?
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
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?
-
- Posts: 3
- Joined: Thu Jan 12, 2023 4:47 pm
Re: Dolby Vision now possible through MP4 Mux.
Thank you, now I can confirm it. The mistake I did (for quite some time now and I regret not having understood it before ) 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.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
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 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)
I wonder, in your case the TV too shows that is receiving Atmos content? That info would be really helpful, thank you very much.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.
Last edited by Seraphimon956 on Tue Jan 17, 2023 6:01 pm, edited 2 times in total.
-
- Posts: 1891
- Joined: Mon Aug 05, 2019 7:12 pm
Re: Dolby Vision now possible through MP4 Mux.
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 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.I'm trying to convert the HDR10+ to DV8 with hdr10plus_tool and dovi_tool.
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
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.
Sorry for my English.
DoVi_Scripts / DoVi Playback Devices / Movies HDR-DV Plot / Screenshot Comparisons
DoVi_Scripts / DoVi Playback Devices / Movies HDR-DV Plot / Screenshot Comparisons
Re: Dolby Vision now possible through MP4 Mux.
Ok, thanks for the feedback @RESET_9999, I'll discard definitively DEE use.RESET_9999 wrote: ↑Sun Jan 15, 2023 6:37 pmIf you have a 7.1 audio system. Use 7.1 DD+ otherwise use 5.1 1536kbps.yossSP wrote: ↑Sun Jan 15, 2023 6:09 pmI 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.
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
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).
-
- Posts: 19
- Joined: Sat Dec 19, 2020 9:42 pm
Re: Dolby Vision now possible through MP4 Mux.
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
Re: Dolby Vision now possible through MP4 Mux.
After a few more tests, the definitive code to detect spanish tracks is the next one:RESET_9999 wrote: ↑Sun Jan 15, 2023 6:37 pmThank you . I will make the change in the next version.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
Code: Select all
if "%spanish%"=="YES" set lang=Spanish& set langDG=spa& set lmp4=es-ES& set lmkv=es
Re: Dolby Vision now possible through MP4 Mux.
https://www.audiosciencereview.com/foru ... 51/page-14RESET_9999 wrote: ↑Sun Jan 15, 2023 1:45 pmnop 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.
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.
Re: Dolby Vision now possible through MP4 Mux.
@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.
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.
-
- Posts: 1891
- Joined: Mon Aug 05, 2019 7:12 pm
Re: Dolby Vision now possible through MP4 Mux.
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 pmAfter 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
thanks guys!sw5163 wrote: ↑Tue Jan 17, 2023 5:41 pmhttps://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.
Yes I wont share the tools pack anymore.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
@New dovi_script users, PM to get info on where to get the tools.
Sorry for my English.
DoVi_Scripts / DoVi Playback Devices / Movies HDR-DV Plot / Screenshot Comparisons
DoVi_Scripts / DoVi Playback Devices / Movies HDR-DV Plot / Screenshot Comparisons
Re: Dolby Vision now possible through MP4 Mux.
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
Re: Dolby Vision now possible through MP4 Mux.
@quietvoid
Please can you share your Kodi 20 build?
Many thanks
Please can you share your Kodi 20 build?
Many thanks
Re: Dolby Vision now possible through MP4 Mux.
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?
Re: Dolby Vision now possible through MP4 Mux.
No, only the RPU metadata is converted to profile 8.1.
This is mostly useful for people who can't play profile 7 FEL (FireTV devices show a blank screen).
I'm not sure of other useful scenarios, other than maybe stability for other devices.