Dolby Vision now possible through MP4 Mux.

Please post here for issues related to UHD discs
dwalme
Posts: 19
Joined: Sat Dec 10, 2011 2:38 am

Re: Dolby Vision now possible through MP4 Mux.

Post by dwalme »

RESET_9999 wrote:
Mon Jun 20, 2022 2:10 pm
dwalme wrote:
Mon Jun 20, 2022 1:56 pm
If you measure HDR10 with MadVR can you inject HDR10Plus and DV at the same time?
At the same time no, there's only one mode that can inject HDR10plus. I don't have any hardware that supports HDR10plus so I don't care much about it personally.

If you have HDR10plus metadata, why do you want to measure HDR10 with madvr? Just convert HDR10plus to DoVi.
madvr dovi generation should only be used if you don't have any DV/hdr10plus source (or if the source luminance doesn't match).
In my example there is no HDR10+ information.

I am measuring many of my HDR10 movies with MadVR and creating DoVi Profile 8.1 files. Figured there would be no downside to also create HDR10+ metadata and inject at the same time for the most versatile files if that were possible.

I had a Samsung TV for a short time. HDR10+ would have been a benefit then.
realbabilu
Posts: 15
Joined: Sun May 15, 2022 4:23 am

Re: Dolby Vision now possible through MP4 Mux.

Post by realbabilu »

Hi @RESET99 and @yusesope
I was playing TrueHD sample lets say Dolby conductor sample lossless TrueHD https://thedigitaltheater.com/dolby-trailers/
I saw post 221 and yusesope https://forum.mrmc.tv/viewtopic.php?f=1 ... 310#p25425 thread to merge TrueHD into mp4 container.
For now, mp4 container is my best friend for smooth play and DV/Atmos detection.
it said it shall must done with mp4muxer for video stream+(aac/ec3/ac3/ac4) then mp4box for adding truehd + subs.
Since mp4muxer can't handle TrueHD muxing. Correct? That is question 1. What file extension if it can by mp4muxer.

Code: Select all

mp4muxer.exe -i Dolby_Conductor_Lossless_ATMOS-thedigitaltheater_Track01.h264 -o Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mp4                   
MP4Box.exe -add Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mp4:rate=0  -add "Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mkv_ - 2 - TrueHD (Atmos), 7.1 channels, 48kHz.thd":disable  -brand mp42isom -ab dby1 -no-iod Dolby_Conductor_Lossless_ATMOS-thedigitaltheater_TrueHD.mp4

Question :
2. Dovi Script can create TrueHD no ac3 to TrueHD+ac3 into single stream/file. WAY 6-3-3
However i cant mux the TrueHD+ac3 file with mp4box. It doesn't know what it is. right?
3. As i tested It will play if converted eac3to ac3 separately file, then muxed with TrueHD. anyway around?

Code: Select all

mp4muxer.exe -i Dolby_Conductor_Lossless_ATMOS-thedigitaltheater_Track01.h264 -i Dolby_Conductor_Lossless_ATMOS-thedigitaltheater_Track02.ac3  -o Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mp4                       
MP4Box.exe -add Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mp4:rate=0 -add dolby.ac3 -add "Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mkv_ - 2 - TrueHD (Atmos), 7.1 channels, 48kHz.thd":disable  -brand mp42isom -ab dby1 -no-iod Dolby_Conductor_Lossless_ATMOS-thedigitaltheater_TrueHD_AC3.mp4
Last edited by realbabilu on Tue Jun 21, 2022 4:32 am, edited 1 time in total.
RESET_9999
Posts: 887
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

realbabilu wrote:
Mon Jun 20, 2022 8:53 pm
Question :
2. Dovi Script can create TrueHD no ac3 to TrueHD+ac3 into single stream/file. WAY 6-3-3
You can mux lossless audio in MP4 with my script if you demux hevc/audio first:
MODE.M4 ===> MODE.1 ===> Workflow.1 ( 8-1-1)

IIRC, TrueHD track must not have an ac3 core to work.

Code: Select all

Format                                   : mp43
Codec ID                                 : mp43 (isom/mp43/dby1)
File size                                : 445 MiB
Duration                                 : 7 min 1 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 8 850 kb/s
Encoded date                             : UTC 2022-06-20 21:22:37
Tagged date                              : UTC 2022-06-20 21:22:37

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 / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : dvhe
Codec ID/Info                            : High Efficiency Video Coding with Dolby Vision
Duration                                 : 2 min 1 s
Bit rate                                 : 12.1 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.061
Stream size                              : 176 MiB (40%)
Writing library                          : x265 3.5+37+12-4e46995bc:[Windows][GCC 11.2.0][64 bit] 10bit
Encoding settings                        : cpuid=1111039 / frame-threads=3 / numa-pools=8 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x2160 / interlace=0 / total-frames=158908 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / repeat-headers / annexb / aud / no-eob / no-eos / hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=23 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / no-hist-scenecut / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=-2:-2 / no-sao / no-sao-non-deblock / rd=4 / selective-sao=0 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=15.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / min-vbv-fullness=50.0 / max-vbv-fullness=80.0 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / aq-bias-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=0 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 / chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1) / cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / hist-threshold=0.03 / no-opt-cu-delta-qp / no-aq-motion / hdr10 / hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / scenecut-aware-qp=0conformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass
Default                                  : No
Encoded date                             : UTC 2022-06-20 21:22:28
Tagged date                              : UTC 2022-06-20 21:22:38
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
Codec configuration box                  : hvcC+dvcC

Audio #1
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                                 : mlpa
Duration                                 : 6 min 59 s
Bit rate mode                            : Variable
Bit rate                                 : 4 557 kb/s
Maximum bit rate                         : 7 887 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
Stream size                              : 228 MiB (51%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 1
Tagged date                              : UTC 2022-06-20 21:22:38
Number of dynamic objects                : 13
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

Audio #2
ID                                       : 3
Format                                   : E-AC-3 JOC
Format/Info                              : Enhanced AC-3 with Joint Object Coding
Commercial name                          : Dolby Digital Plus with Dolby Atmos
Codec ID                                 : ec-3
Duration                                 : 7 min 1 s
Bit rate mode                            : Constant
Bit rate                                 : 768 kb/s
Maximum bit rate                         : 811 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 38.6 MiB (9%)
Service kind                             : Complete Main
Default                                  : No
Encoded date                             : UTC 2022-06-20 21:22:28
Tagged date                              : UTC 2022-06-20 21:22:38
Complexity index                         : Not present / 16
Number of dynamic objects                : 15
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

Code: Select all

Main Menu
1) MODE.XP= XML & RPU injector
2) MODE.P5= Profile 5 input to Profile 8 HYBRID MAKER
3) MODE.P7= Profile 7 input (BD/MKV/Convert/Mux/Demux/Inject)
4) MODE.H=  HDR10(madVR) and HDR10plus to DoVi maker
5) MODE.B=  Batch muxer: MKV to TS (DV/DD+/SUB)
6) MODE.M=  MIXED: Remover/Audio/Playlist/MPV/Measurer/HDR10plus_injector and more...
7) MODE.F=  RPU Fixer/Editor/Reader/Extractor/Sync-Inspect/
8) MODE.M4= MP4_muxer(P5/P7/P8)
9) Exit

Choice? [1,2,3,4,5,6,7,8,9]?8
                                           *****************
                                           * CHOOSE A MODE *
                                           *****************
.
1) MODE.1= Single-Track (p5, p8, p7)
2) MODE.2= Dual-Track (p7)
3) MODE.3= Demuxer (p5, p8, p7)
4) MODE.4= back to main menu

Choice? [1,2,3,4]?1
                                           ********************
                                           * CHOOSE A WORFLOW *
                                           ********************

1) Workflow.1= ANY VIDEO + ANY AUDIO(lossless audio included) + SRT subtitle
2) Workflow.2= Bluray Disc to Profile 8 + AC3
3) Workflow.3= Bluray Disc to Profile 8 + EC3
4) Workflow.4= MKV Profile 7 to Profile 8 + AC3
5) Workflow.5= MKV Profile 7 to Profile 8 + EC3
6) Workflow.6= HDR10 or HDR10plus to DoVi Profile 8 + AC3
7) Workflow.7= HDR10 or HDR10plus to DoVi Profile 8 + EC3
8) Workflow.8= back to main menu

Choice? [1,2,3,4,5,6,7,8]?1
------------------------------------------------------------------------------------------------------
-- Input can be MKV/M2TS/TS/HEVC/H265 - SRT/AC3/EC3/AAC/DTS/DTSHD/TrueHD
-- Dual subtitles/audio support , If no subtitles/audio, just press enter to skip (PGS not supported)
-- Lossless audio muxing only works if your video/audio input are demuxed (hevc/h265/THD/DTS)
-- if input is MKV/TS/M2TS, audio will be lossy. demux it for lossless audio.
-- Do not use this workflow for the Profile 8 iTunes web-dl (they have fps header issues)
------------------------------------------------------------------------------------------------------
Un sous-répertoire ou un fichier D:\TEMP\ existe déjà.
Drag and drop your DoVi HEVC file and press enter...
D:\samples\P8.DTS.track_1_und.hevc
Drag and drop your audio file and press enter...
D:\samples\truehd.thd
Drag and drop your audio file #2 and press enter...
D:\samples\ec3.ec3
Drag and drop your SRT subtitle file(optional) and/or press enter...

Select a dolby vision profile (5,7 or 8) and press enter...
8
muxing into a MP4 DoVi file. Be patient, it can take a while. 40min+ on slow HDD!!!
mkvmerge v67.0.0 ('Under Stars') 64-bit
'D:\samples\truehd.thd': Using the demultiplexer for the format 'TrueHD'.
'D:\samples\truehd.thd' track 0: Using the output module for the format 'TrueHD'.
The file 'D:\TEMP\audio.mka' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Multiplexing took 3 seconds.
ffmpeg version 5.0.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Input #0, matroska,webm, from 'D:\TEMP\audio.mka':
  Metadata:
    encoder         : libebml v1.4.2 + libmatroska v1.6.4
  Duration: 00:06:59.90, start: 0.000000, bitrate: 4624 kb/s
  Stream #0:0(eng): Audio: truehd, 48000 Hz, 7.1, s32 (24 bit) (default)
    Metadata:
      BPS             : 4556864
      DURATION        : 00:06:59.904166080
      NUMBER_OF_FRAMES: 503885
      NUMBER_OF_BYTES : 239180708
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Output #0, mp4, to 'D:\TEMP\audio.mp4':
  Metadata:
    encoder         : Lavf59.16.100
  Stream #0:0(eng): Audio: truehd (mlpa / 0x61706C6D), 48000 Hz, 7.1, s32 (24 bit) (default)
    Metadata:
      BPS             : 4556864
      DURATION        : 00:06:59.904166080
      NUMBER_OF_FRAMES: 503885
      NUMBER_OF_BYTES : 239180708
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=  235563kB time=00:06:59.90 bitrate=4595.6kbits/s speed= 105x
video:0kB audio:233575kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.851134%
[iso file] Box "dec3" (start 35918) has 2 extra bytes
[iso file] Box "dec3" (start 35918) has 2 extra bytes
IsoMedia import DV.mp4 - track ID 1 - Video (size 3840 x 2160)
IsoMedia import audio.mp4 - track ID 1 - Audio (SR 48000 - 2 channels)
[iso file] Box "dec3" (start 35918) has 2 extra bytes
[iso file] Box "dec3" (start 35918) has 2 extra bytes
IsoMedia import DV.mp4 - track ID 2 - Audio (SR 48000 - 2 channels)
0.500 secs Interleaving
the script has completed...
Please forgive my English.
Sony x800m2 ----> Denon AVR ----> LG OLED C2 77"
DoVi.Test.Files / DoVi Scripts / Playback-Devices
realbabilu
Posts: 15
Joined: Sun May 15, 2022 4:23 am

Re: Dolby Vision now possible through MP4 Mux.

Post by realbabilu »

RESET_9999 wrote:
Mon Jun 20, 2022 9:23 pm
realbabilu wrote:
Mon Jun 20, 2022 8:53 pm
Question :
2. Dovi Script can create TrueHD no ac3 to TrueHD+ac3 into single stream/file. WAY 6-3-3
You can mux lossless audio in MP4 with my script if you demux hevc/audio first:
MODE.M4 ===> MODE.1 ===> Workflow.1 ( 8-1-1)

IIRC, TrueHD track must not have an ac3 core to work.

Thank you, almost same as method 3 (ffmpeg + mp4box)
So TrueHD track must not have an ac3 core to muxed into mp4. mp4box keep asking filter for .thd+ac3 file in my test.

WAIT...
you have ..in 1.3.9

Code: Select all

if exist "%a-filepath%%a-filename%.ec3" if exist "%a2-filepath%%a2-filename%.thd+ac3" goto :AC3..THD
if exist "%a-filepath%%a-filename%.ac3" if exist "%a2-filepath%%a2-filename%.ac3+thd" goto :AC3..THD
if exist "%a-filepath%%a-filename%.thd+ac3" if exist "%a2-filepath%%a2-filename%.ac3" goto :THD..AC3
if exist "%a-filepath%%a-filename%.thd+ac3" if exist "%a2-filepath%%a2-filename%.ec3" goto :THD..AC3
if exist "%a-filepath%%a-filename%.ac3+thd" goto :lossless1a
if exist "%a-filepath%%a-filename%.thd+ac3" goto :lossless1a
let me try out. hmm you push to mkvmerge first then muxing it to mp4.
Works! on mp4be https://sourceforge.net/projects/mpcbe/
samples and result https://1fichier.com/?s7qphm7o9rhvreok8r67
truehd has ac3 core information is difficult to compare to truehd without ac3core with mediainfo app.

Code: Select all

General
Complete name                            : F:\TEST\DOLBY ATMOS\TRUEHD\test\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mkv_ - 2 - TrueHD (Atmos), 7.1 channels, 48kHz.thd
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
File size                                : 25.2 MiB
Overall bit rate mode                    : Variable

Audio
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Bit rate mode                            : Variable
Maximum bit rate                         : 8 817 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
Number of dynamic objects                : 15
Bed channel count                        : 1 channel
Bed channel configuration                : LFE




Code: Select all

                                      ****************************
                                      * DoVi_Scripts @RESET_9999 *
                                      ****************************
.
***************************************************************************************************************
 *The output folder by default is the "Dolby-Vision-Tools" Folder, you can change it by editing this bat file
 *Do not move the bat file out of the "Dolby-Vision-Tools" Folder. Make a shortcut instead.
 *Select a mode, a workflow. Drag and drop an input file and wait...
***************************************************************************************************************
.
                                           *****************
                                           * CHOOSE A MODE *
                                           *****************
.
Main Menu
1) MODE.XP= XML & RPU injector
2) MODE.P5= Profile 5 input to Profile 8 HYBRID MAKER
3) MODE.P7= Profile 7 input (BD/MKV/Convert/Mux/Demux/Inject)
4) MODE.H=  HDR10(madVR) and HDR10plus to DoVi maker
5) MODE.B=  Batch muxer: MKV to TS (DV/DD+/SUB)
6) MODE.M=  MIXED: Remover/Audio/Playlist/MPV/Measurer/HDR10plus_injector and more...
7) MODE.F=  RPU Fixer/Editor/Reader/Extractor/Sync-Inspect/
8) MODE.M4= MP4_muxer(P5/P7/P8)
9) Exit

Choice? [1,2,3,4,5,6,7,8,9]?8
                                           *****************
                                           * CHOOSE A MODE *
                                           *****************
.
1) MODE.1= Single-Track (p5, p8, p7)
2) MODE.2= Dual-Track (p7)
3) MODE.3= Demuxer (p5, p8, p7)
4) MODE.4= back to main menu

Choice? [1,2,3,4]?1
                                           ********************
                                           * CHOOSE A WORFLOW *
                                           ********************

1) Workflow.1= ANY VIDEO + ANY AUDIO(lossless audio included) + SRT subtitle
2) Workflow.2= Bluray Disc to Profile 8 + AC3
3) Workflow.3= Bluray Disc to Profile 8 + EC3
4) Workflow.4= MKV Profile 7 to Profile 8 + AC3
5) Workflow.5= MKV Profile 7 to Profile 8 + EC3
6) Workflow.6= HDR10 or HDR10plus to DoVi Profile 8 + AC3
7) Workflow.7= HDR10 or HDR10plus to DoVi Profile 8 + EC3
8) Workflow.8= back to main menu

Choice? [1,2,3,4,5,6,7,8]?1
------------------------------------------------------------------------------------------------------
-- Input can be MKV/M2TS/TS/HEVC/H265 - SRT/AC3/EC3/AAC/DTS/DTSHD/TrueHD
-- Dual subtitles/audio support , If no subtitles/audio, just press enter to skip (PGS :not supported)
-- Lossless audio muxing only works if your video/audio input are demuxed (hevc/h265/THD/DTS)
-- if input is MKV/TS/M2TS, audio will be lossy. demux it for lossless audio.
-- Do not use this workflow for the Profile 8 iTunes web-dl (they have fps header issues)
------------------------------------------------------------------------------------------------------
Drag and drop your DoVi HEVC file and press enter...
"D:\RUN\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mkv_ - 1 - h264, English, 1080p23.999.h264"
Drag and drop your audio file and press enter...
D:\RUN\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.thd+ac3
Drag and drop your audio file #2 and press enter...

Drag and drop your SRT subtitle file(optional) and/or press enter...

Select a dolby vision profile (5,7 or 8) and press enter...
8
muxing into a MP4 DoVi file. Be patient, it can take a while. 40min+ on slow HDD!!!
Output file had been existed, please using '--overwrite' if you want to overwrite it

mkvmerge v67.0.0 ('Under Stars') 64-bit
'D:\RUN\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.thd+ac3': Using the demultiplexer for the format 'TrueHD'.
'D:\RUN\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.thd+ac3' track 0: Using the output module for the format 'TrueHD'.
The file 'D:\mov\Dolby-Vision-Tools\audio.mka' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Multiplexing took 0 seconds.
ffmpeg version 5.0.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Input #0, matroska,webm, from 'D:\mov\Dolby-Vision-Tools\audio.mka':
  Metadata:
    encoder         : libebml v1.4.2 + libmatroska v1.6.4
  Duration: 00:00:40.13, start: 0.000000, bitrate: 5341 kb/s
  Stream #0:0(eng): Audio: truehd, 48000 Hz, 7.1, s32 (24 bit) (default)
    Metadata:
      BPS             : 5273043
      DURATION        : 00:00:40.133327136
      NUMBER_OF_FRAMES: 48160
      NUMBER_OF_BYTES : 26452882
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Output #0, mp4, to 'D:\mov\Dolby-Vision-Tools\audio.mp4':
  Metadata:
    encoder         : Lavf59.16.100
  Stream #0:0(eng): Audio: truehd (mlpa / 0x61706C6D), 48000 Hz, 7.1, s32 (24 bit) (default)
    Metadata:
      BPS             : 5273043
      DURATION        : 00:00:40.133327136
      NUMBER_OF_FRAMES: 48160
      NUMBER_OF_BYTES : 26452882
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=   26024kB time=00:00:40.13 bitrate=5312.0kbits/s speed= 311x
video:0kB audio:25833kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.740430%
IsoMedia import Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mkv_ - 1 - h264, English, 1080p23.999_DoVi.mp4 - track ID 1 - Video (size 1920 x 1080)
IsoMedia import audio.mp4 - track ID 1 - Audio (SR 48000 - 2 channels)
0.500 secs Interleaving
Missing argument value for -add - please check usage
the script has completed...
Press any key to continue . . .
Strange ... Missing argument value for -add - please check usage, but it created a file.

There is a bug for long or spaced folder using 8-1-1 as input file.

Code: Select all

                                      ****************************
                                      * DoVi_Scripts @RESET_9999 *
                                      ****************************
.
***************************************************************************************************************
 *The output folder by default is the "Dolby-Vision-Tools" Folder, you can change it by editing this bat file
 *Do not move the bat file out of the "Dolby-Vision-Tools" Folder. Make a shortcut instead.
 *Select a mode, a workflow. Drag and drop an input file and wait...
***************************************************************************************************************
.
                                           *****************
                                           * CHOOSE A MODE *
                                           *****************
.
Main Menu
1) MODE.XP= XML & RPU injector
2) MODE.P5= Profile 5 input to Profile 8 HYBRID MAKER
3) MODE.P7= Profile 7 input (BD/MKV/Convert/Mux/Demux/Inject)
4) MODE.H=  HDR10(madVR) and HDR10plus to DoVi maker
5) MODE.B=  Batch muxer: MKV to TS (DV/DD+/SUB)
6) MODE.M=  MIXED: Remover/Audio/Playlist/MPV/Measurer/HDR10plus_injector and more...
7) MODE.F=  RPU Fixer/Editor/Reader/Extractor/Sync-Inspect/
8) MODE.M4= MP4_muxer(P5/P7/P8)
9) Exit

Choice? [1,2,3,4,5,6,7,8,9]?8
                                           *****************
                                           * CHOOSE A MODE *
                                           *****************
.
1) MODE.1= Single-Track (p5, p8, p7)
2) MODE.2= Dual-Track (p7)
3) MODE.3= Demuxer (p5, p8, p7)
4) MODE.4= back to main menu

Choice? [1,2,3,4]?1
                                           ********************
                                           * CHOOSE A WORFLOW *
                                           ********************

1) Workflow.1= ANY VIDEO + ANY AUDIO(lossless audio included) + SRT subtitle
2) Workflow.2= Bluray Disc to Profile 8 + AC3
3) Workflow.3= Bluray Disc to Profile 8 + EC3
4) Workflow.4= MKV Profile 7 to Profile 8 + AC3
5) Workflow.5= MKV Profile 7 to Profile 8 + EC3
6) Workflow.6= HDR10 or HDR10plus to DoVi Profile 8 + AC3
7) Workflow.7= HDR10 or HDR10plus to DoVi Profile 8 + EC3
8) Workflow.8= back to main menu

Choice? [1,2,3,4,5,6,7,8]?1
------------------------------------------------------------------------------------------------------
-- Input can be MKV/M2TS/TS/HEVC/H265 - SRT/AC3/EC3/AAC/DTS/DTSHD/TrueHD
-- Dual subtitles/audio support , If no subtitles/audio, just press enter to skip (PGS :not supported)
-- Lossless audio muxing only works if your video/audio input are demuxed (hevc/h265/THD/DTS)
-- if input is MKV/TS/M2TS, audio will be lossy. demux it for lossless audio.
-- Do not use this workflow for the Profile 8 iTunes web-dl (they have fps header issues)
------------------------------------------------------------------------------------------------------
Drag and drop your DoVi HEVC file and press enter...
"F:\TEST\DOLBY ATMOS\TRUEHD\test\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mkv_ - 1 - h264, English, 1080p23.999.h264"
Drag and drop your audio file and press enter...
"F:\TEST\DOLBY ATMOS\TRUEHD\test\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.thd+ac3"
Drag and drop your audio file #2 and press enter...

Drag and drop your SRT subtitle file(optional) and/or press enter...

Select a dolby vision profile (5,7 or 8) and press enter...
8
muxing into a MP4 DoVi file. Be patient, it can take a while. 40min+ on slow HDD!!!
Output file had been existed, please using '--overwrite' if you want to overwrite it

mkvmerge v67.0.0 ('Under Stars') 64-bit
Error: The file 'F:\TEST\DOLBY' could not be opened for reading: open file error.
ffmpeg version 5.0.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
D:\mov\Dolby-Vision-Tools\audio.mka: No such file or directory
IsoMedia import Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mkv_ - 1 - h264, English, 1080p23.999_DoVi.mp4 - track ID 1 - Video (size 1920 x 1080)
[Importer] Cannot load filter for input file "D:\mov\Dolby-Vision-Tools\audio.mp4"
Failure while importing media: Requested URL is not valid or cannot be found
Error importing D:\mov\Dolby-Vision-Tools\audio.mp4: Requested URL is not valid or cannot be found
Missing argument value for -add - please check usage
Could Not Find D:\mov\Dolby-Vision-Tools\audio.mp4
Could Not Find D:\mov\Dolby-Vision-Tools\audio.mka
the script has completed...
Press any key to continue . . .
realbabilu
Posts: 15
Joined: Sun May 15, 2022 4:23 am

Re: Dolby Vision now possible through MP4 Mux.

Post by realbabilu »

realbabilu wrote:
Tue Jun 21, 2022 4:32 am
RESET_9999 wrote:
Mon Jun 20, 2022 9:23 pm
realbabilu wrote:
Mon Jun 20, 2022 8:53 pm
Question :
2. Dovi Script can create TrueHD no ac3 to TrueHD+ac3 into single stream/file. WAY 6-3-3
You can mux lossless audio in MP4 with my script if you demux hevc/audio first:
MODE.M4 ===> MODE.1 ===> Workflow.1 ( 8-1-1)

IIRC, TrueHD track must not have an ac3 core to work.

Thank you, almost same as method 3 (ffmpeg + mp4box)
So TrueHD track must not have an ac3 core to muxed into mp4. mp4box keep asking filter for .thd+ac3 file in my test.

WAIT...
you have ..in 1.3.9

Code: Select all

if exist "%a-filepath%%a-filename%.ec3" if exist "%a2-filepath%%a2-filename%.thd+ac3" goto :AC3..THD
if exist "%a-filepath%%a-filename%.ac3" if exist "%a2-filepath%%a2-filename%.ac3+thd" goto :AC3..THD
if exist "%a-filepath%%a-filename%.thd+ac3" if exist "%a2-filepath%%a2-filename%.ac3" goto :THD..AC3
if exist "%a-filepath%%a-filename%.thd+ac3" if exist "%a2-filepath%%a2-filename%.ec3" goto :THD..AC3
if exist "%a-filepath%%a-filename%.ac3+thd" goto :lossless1a
if exist "%a-filepath%%a-filename%.thd+ac3" goto :lossless1a
let me try out. hmm you push to mkvmerge first then muxing it to mp4.
Works! on mp4be https://sourceforge.net/projects/mpcbe/
samples and result https://1fichier.com/?8y2fbbcqdm5zn0e29ptc
truehd has ac3 core information is difficult to compare to truehd without ac3core with mediainfo app.
However i think the result kick out the ac3core out of truehd since the size is same .thd+ac3 + .hevc = .thd + .hevc

Code: Select all

General
Complete name                            : F:\TEST\DOLBY ATMOS\TRUEHD\test\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mkv_ - 2 - TrueHD (Atmos), 7.1 channels, 48kHz.thd
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
File size                                : 25.2 MiB
Overall bit rate mode                    : Variable

Audio
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Bit rate mode                            : Variable
Maximum bit rate                         : 8 817 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
Number of dynamic objects                : 15
Bed channel count                        : 1 channel
Bed channel configuration                : LFE




Code: Select all

                                      ****************************
                                      * DoVi_Scripts @RESET_9999 *
                                      ****************************
.
***************************************************************************************************************
 *The output folder by default is the "Dolby-Vision-Tools" Folder, you can change it by editing this bat file
 *Do not move the bat file out of the "Dolby-Vision-Tools" Folder. Make a shortcut instead.
 *Select a mode, a workflow. Drag and drop an input file and wait...
***************************************************************************************************************
.
                                           *****************
                                           * CHOOSE A MODE *
                                           *****************
.
Main Menu
1) MODE.XP= XML & RPU injector
2) MODE.P5= Profile 5 input to Profile 8 HYBRID MAKER
3) MODE.P7= Profile 7 input (BD/MKV/Convert/Mux/Demux/Inject)
4) MODE.H=  HDR10(madVR) and HDR10plus to DoVi maker
5) MODE.B=  Batch muxer: MKV to TS (DV/DD+/SUB)
6) MODE.M=  MIXED: Remover/Audio/Playlist/MPV/Measurer/HDR10plus_injector and more...
7) MODE.F=  RPU Fixer/Editor/Reader/Extractor/Sync-Inspect/
8) MODE.M4= MP4_muxer(P5/P7/P8)
9) Exit

Choice? [1,2,3,4,5,6,7,8,9]?8
                                           *****************
                                           * CHOOSE A MODE *
                                           *****************
.
1) MODE.1= Single-Track (p5, p8, p7)
2) MODE.2= Dual-Track (p7)
3) MODE.3= Demuxer (p5, p8, p7)
4) MODE.4= back to main menu

Choice? [1,2,3,4]?1
                                           ********************
                                           * CHOOSE A WORFLOW *
                                           ********************

1) Workflow.1= ANY VIDEO + ANY AUDIO(lossless audio included) + SRT subtitle
2) Workflow.2= Bluray Disc to Profile 8 + AC3
3) Workflow.3= Bluray Disc to Profile 8 + EC3
4) Workflow.4= MKV Profile 7 to Profile 8 + AC3
5) Workflow.5= MKV Profile 7 to Profile 8 + EC3
6) Workflow.6= HDR10 or HDR10plus to DoVi Profile 8 + AC3
7) Workflow.7= HDR10 or HDR10plus to DoVi Profile 8 + EC3
8) Workflow.8= back to main menu

Choice? [1,2,3,4,5,6,7,8]?1
------------------------------------------------------------------------------------------------------
-- Input can be MKV/M2TS/TS/HEVC/H265 - SRT/AC3/EC3/AAC/DTS/DTSHD/TrueHD
-- Dual subtitles/audio support , If no subtitles/audio, just press enter to skip (PGS :not supported)
-- Lossless audio muxing only works if your video/audio input are demuxed (hevc/h265/THD/DTS)
-- if input is MKV/TS/M2TS, audio will be lossy. demux it for lossless audio.
-- Do not use this workflow for the Profile 8 iTunes web-dl (they have fps header issues)
------------------------------------------------------------------------------------------------------
Drag and drop your DoVi HEVC file and press enter...
"D:\RUN\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mkv_ - 1 - h264, English, 1080p23.999.h264"
Drag and drop your audio file and press enter...
D:\RUN\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.thd+ac3
Drag and drop your audio file #2 and press enter...

Drag and drop your SRT subtitle file(optional) and/or press enter...

Select a dolby vision profile (5,7 or 8) and press enter...
8
muxing into a MP4 DoVi file. Be patient, it can take a while. 40min+ on slow HDD!!!
Output file had been existed, please using '--overwrite' if you want to overwrite it

mkvmerge v67.0.0 ('Under Stars') 64-bit
'D:\RUN\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.thd+ac3': Using the demultiplexer for the format 'TrueHD'.
'D:\RUN\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.thd+ac3' track 0: Using the output module for the format 'TrueHD'.
The file 'D:\mov\Dolby-Vision-Tools\audio.mka' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Multiplexing took 0 seconds.
ffmpeg version 5.0.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Input #0, matroska,webm, from 'D:\mov\Dolby-Vision-Tools\audio.mka':
  Metadata:
    encoder         : libebml v1.4.2 + libmatroska v1.6.4
  Duration: 00:00:40.13, start: 0.000000, bitrate: 5341 kb/s
  Stream #0:0(eng): Audio: truehd, 48000 Hz, 7.1, s32 (24 bit) (default)
    Metadata:
      BPS             : 5273043
      DURATION        : 00:00:40.133327136
      NUMBER_OF_FRAMES: 48160
      NUMBER_OF_BYTES : 26452882
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Output #0, mp4, to 'D:\mov\Dolby-Vision-Tools\audio.mp4':
  Metadata:
    encoder         : Lavf59.16.100
  Stream #0:0(eng): Audio: truehd (mlpa / 0x61706C6D), 48000 Hz, 7.1, s32 (24 bit) (default)
    Metadata:
      BPS             : 5273043
      DURATION        : 00:00:40.133327136
      NUMBER_OF_FRAMES: 48160
      NUMBER_OF_BYTES : 26452882
      _STATISTICS_WRITING_APP: mkvmerge v67.0.0 ('Under Stars') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=   26024kB time=00:00:40.13 bitrate=5312.0kbits/s speed= 311x
video:0kB audio:25833kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.740430%
IsoMedia import Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mkv_ - 1 - h264, English, 1080p23.999_DoVi.mp4 - track ID 1 - Video (size 1920 x 1080)
IsoMedia import audio.mp4 - track ID 1 - Audio (SR 48000 - 2 channels)
0.500 secs Interleaving
Missing argument value for -add - please check usage
the script has completed...
Press any key to continue . . .
Strange ... Missing argument value for -add - please check usage, but it created a file.

There is a bug for long or spaced folder using 8-1-1 as input file.

Code: Select all

                                      ****************************
                                      * DoVi_Scripts @RESET_9999 *
                                      ****************************
.
***************************************************************************************************************
 *The output folder by default is the "Dolby-Vision-Tools" Folder, you can change it by editing this bat file
 *Do not move the bat file out of the "Dolby-Vision-Tools" Folder. Make a shortcut instead.
 *Select a mode, a workflow. Drag and drop an input file and wait...
***************************************************************************************************************
.
                                           *****************
                                           * CHOOSE A MODE *
                                           *****************
.
Main Menu
1) MODE.XP= XML & RPU injector
2) MODE.P5= Profile 5 input to Profile 8 HYBRID MAKER
3) MODE.P7= Profile 7 input (BD/MKV/Convert/Mux/Demux/Inject)
4) MODE.H=  HDR10(madVR) and HDR10plus to DoVi maker
5) MODE.B=  Batch muxer: MKV to TS (DV/DD+/SUB)
6) MODE.M=  MIXED: Remover/Audio/Playlist/MPV/Measurer/HDR10plus_injector and more...
7) MODE.F=  RPU Fixer/Editor/Reader/Extractor/Sync-Inspect/
8) MODE.M4= MP4_muxer(P5/P7/P8)
9) Exit

Choice? [1,2,3,4,5,6,7,8,9]?8
                                           *****************
                                           * CHOOSE A MODE *
                                           *****************
.
1) MODE.1= Single-Track (p5, p8, p7)
2) MODE.2= Dual-Track (p7)
3) MODE.3= Demuxer (p5, p8, p7)
4) MODE.4= back to main menu

Choice? [1,2,3,4]?1
                                           ********************
                                           * CHOOSE A WORFLOW *
                                           ********************

1) Workflow.1= ANY VIDEO + ANY AUDIO(lossless audio included) + SRT subtitle
2) Workflow.2= Bluray Disc to Profile 8 + AC3
3) Workflow.3= Bluray Disc to Profile 8 + EC3
4) Workflow.4= MKV Profile 7 to Profile 8 + AC3
5) Workflow.5= MKV Profile 7 to Profile 8 + EC3
6) Workflow.6= HDR10 or HDR10plus to DoVi Profile 8 + AC3
7) Workflow.7= HDR10 or HDR10plus to DoVi Profile 8 + EC3
8) Workflow.8= back to main menu

Choice? [1,2,3,4,5,6,7,8]?1
------------------------------------------------------------------------------------------------------
-- Input can be MKV/M2TS/TS/HEVC/H265 - SRT/AC3/EC3/AAC/DTS/DTSHD/TrueHD
-- Dual subtitles/audio support , If no subtitles/audio, just press enter to skip (PGS :not supported)
-- Lossless audio muxing only works if your video/audio input are demuxed (hevc/h265/THD/DTS)
-- if input is MKV/TS/M2TS, audio will be lossy. demux it for lossless audio.
-- Do not use this workflow for the Profile 8 iTunes web-dl (they have fps header issues)
------------------------------------------------------------------------------------------------------
Drag and drop your DoVi HEVC file and press enter...
"F:\TEST\DOLBY ATMOS\TRUEHD\test\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mkv_ - 1 - h264, English, 1080p23.999.h264"
Drag and drop your audio file and press enter...
"F:\TEST\DOLBY ATMOS\TRUEHD\test\Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.thd+ac3"
Drag and drop your audio file #2 and press enter...

Drag and drop your SRT subtitle file(optional) and/or press enter...

Select a dolby vision profile (5,7 or 8) and press enter...
8
muxing into a MP4 DoVi file. Be patient, it can take a while. 40min+ on slow HDD!!!
Output file had been existed, please using '--overwrite' if you want to overwrite it

mkvmerge v67.0.0 ('Under Stars') 64-bit
Error: The file 'F:\TEST\DOLBY' could not be opened for reading: open file error.
ffmpeg version 5.0.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
D:\mov\Dolby-Vision-Tools\audio.mka: No such file or directory
IsoMedia import Dolby_Conductor_Lossless_ATMOS-thedigitaltheater.mkv_ - 1 - h264, English, 1080p23.999_DoVi.mp4 - track ID 1 - Video (size 1920 x 1080)
[Importer] Cannot load filter for input file "D:\mov\Dolby-Vision-Tools\audio.mp4"
Failure while importing media: Requested URL is not valid or cannot be found
Error importing D:\mov\Dolby-Vision-Tools\audio.mp4: Requested URL is not valid or cannot be found
Missing argument value for -add - please check usage
Could Not Find D:\mov\Dolby-Vision-Tools\audio.mp4
Could Not Find D:\mov\Dolby-Vision-Tools\audio.mka
the script has completed...
Press any key to continue . . .
RESET_9999
Posts: 887
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

right I forgot, you can input thd+ac3 and the script will remove the core.
As for the missing --add, yes i forgot the add something in the end of that workflow and it try to add subtitle. I also forgot to delete one temp file.
I know i have some code clean up to do in that mode.
Please forgive my English.
Sony x800m2 ----> Denon AVR ----> LG OLED C2 77"
DoVi.Test.Files / DoVi Scripts / Playback-Devices
dwalme
Posts: 19
Joined: Sat Dec 10, 2011 2:38 am

Re: Dolby Vision now possible through MP4 Mux.

Post by dwalme »

Found another issue with the script. I was testing the removal of HDR10plus. (MODE.M->MODE.1->Workflow.1)

I end up with a 0 byte *_HDR10plus_removed.hevc file in the output folder.

Code: Select all

1) Workflow.1= Remove HDR10plus
2) Workflow.2= Remove Dolby Vision
3) Workflow.3= Back to main menu

Choice? [1,2,3]?1
Drag and drop an MKV HDR10 file and press enter...C:\D\Dolby-Vision-Tools\HDR10plus-tv.mkv
Extracting track 0 with the CodecID 'V_MPEGH/ISO/HEVC' to the file 'I:\TEMP\HDR.hevc'. Container format: HEVC/H.265 elementary stream
Progress: 100%
Reordering metadata... Done.
Parsing RPU file...
Error: No NALU start codes found in the file. Maybe not a valid RPU?
the script has completed...
Press any key to continue . . .
RESET_9999
Posts: 887
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

dwalme wrote:
Thu Jun 23, 2022 1:30 am
Found another issue with the script.
I don't know, it's working on my end. Did you try to manually remove hdr10plus without the script? maybe your file has a problem?
or maybe your file doesnt have DV? this mode is for input that has both HDR10plus and DV.

Code: Select all

1) Workflow.1= Remove HDR10plus
2) Workflow.2= Remove Dolby Vision
3) Workflow.3= Back to main menu

Choice? [1,2,3]?1
Drag and drop an MKV HDR10 file and press enter..."D:\samples\hdr10-plus(THD SRT).mkv"
Extracting track 0 with the CodecID 'V_MPEGH/ISO/HEVC' to the file 'D:\TEMP\HDR.hevc'. Container format: HEVC/H.265 elementary stream
Progress: 100%
Reordering metadata... Done.
Parsing RPU file...
Processing input video for frame order info...

Warning: Input file already has RPUs, they will be replaced.
Rewriting file with interleaved RPU NALs..
the script has completed...
Appuyez sur une touche pour continuer...
Please forgive my English.
Sony x800m2 ----> Denon AVR ----> LG OLED C2 77"
DoVi.Test.Files / DoVi Scripts / Playback-Devices
dwalme
Posts: 19
Joined: Sat Dec 10, 2011 2:38 am

Re: Dolby Vision now possible through MP4 Mux.

Post by dwalme »

RESET_9999 wrote:
Thu Jun 23, 2022 1:48 am
dwalme wrote:
Thu Jun 23, 2022 1:30 am
Found another issue with the script.
I don't know, it's working on my end. Did you try to manually remove hdr10plus without the script? maybe your file has a problem?
or maybe your file doesnt have DV? this mode is for input that has both HDR10plus and DV.

Code: Select all

1) Workflow.1= Remove HDR10plus
2) Workflow.2= Remove Dolby Vision
3) Workflow.3= Back to main menu

Choice? [1,2,3]?1
Drag and drop an MKV HDR10 file and press enter..."D:\samples\hdr10-plus(THD SRT).mkv"
Extracting track 0 with the CodecID 'V_MPEGH/ISO/HEVC' to the file 'D:\TEMP\HDR.hevc'. Container format: HEVC/H.265 elementary stream
Progress: 100%
Reordering metadata... Done.
Parsing RPU file...
Processing input video for frame order info...

Warning: Input file already has RPUs, they will be replaced.
Rewriting file with interleaved RPU NALs..
the script has completed...
Appuyez sur une touche pour continuer...

My fault then. This particular file does not have DV. I didn’t realize this only worked for files that were both hdr10+ and DV.
RESET_9999
Posts: 887
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

yeah my bad too, I'll add a warning in the next version.
Please forgive my English.
Sony x800m2 ----> Denon AVR ----> LG OLED C2 77"
DoVi.Test.Files / DoVi Scripts / Playback-Devices
realbabilu
Posts: 15
Joined: Sun May 15, 2022 4:23 am

Re: Dolby Vision now possible through MP4 Mux.

Post by realbabilu »

I got unique situation.

Usually Profile 5 need Dolby Vision proper detection with Dolby Vision TV or color will be strange, this is dvhe 05.09
example from dolby http://media.developer.dolby.com/DolbyV ... 00kbps.mp4
So if i convert to mkv, usually my TV false to detect Dolby vision, coloring it false as purple, AND also my SDR PC monitor got it wrong.
So it need to be muxed as mp4 with dolby mp4muxer, and played as mp4 in DV TV to get it detected right and coloring right.


I got sample dvhe Profile 05.06 color limited while it backwards....
I uploded 30s here https://1fichier.com/?gat31olgv9yjtn2iyc2o
The color on SDR PC is right.
While i remuxed to profile 5 with mp4muxer to enable Dolby Vision and Atmos detection, it colors wrong....purple..
1. What can be wrong with this? Its possible the encoder wrong? or just my DV tv is un-capable?
2. Does anyone has other 05.06 sample?
3. What if there is wrong profile typed when muxing ?
sw5163
Posts: 8
Joined: Sat Jun 25, 2022 7:28 am

Dual layer FEL dolby vision to Apple compatible BL+RPU

Post by sw5163 »

First of all, thanks so much for quietvoid's and yusesope's amazing tool.
Sorry in advance if this has been posted or wrong.
I think it is possible to convert dual layer FEL to Apple compatible BL+RPU.

1. Extract bl.hevc and el.hevc from source
ffmpeg -i FEL_test_for_AVS.m2ts -c copy -map 0:0 bl.hevc -map 0:1 -c copy el.hevc

2. Mux and convert to P8 (it seems Apple indeed doesn't support FEL)
dovi_tool --edit-config fel_to_p81.json mux --bl bl.hevc --el el.hevc --discard

fel_to_p81.json
{
"mode": 2,
"remove_mapping": true
}

The result has similar RPU as in Apple's strange screensaver. (Thanks ValZapod)

According to quietvoid:
‘"remove_mapping" is useful for converting to profile 8.1 from FEL, where the video was preprocessed beforehand (like processing FEL).
Otherwise, the RPU would cause an additional mapping/processing on playback, so double the processing which is wrong.’
And without it, the result will end up with awful green screen.
https://user-images.githubusercontent.c ... 8510d9.PNG

3. Use mp4muxer from https://github.com/DolbyLaboratories
mp4muxer -i BL_RPU.hevc --dv-profile 5 --dvh1flag 0

This end up with a BL+RPU HDR10 based profile 5 mp4 just like their screensaver.
dvh1flag for Apple compatibility.
I know profile 5 shouldn't have HDR10 bl but it tricks Apple's native player to play dolby vision.

Sample mp4 as follow
https://drive.google.com/file/d/1kJTUMb ... sp=sharing
The birghtness around 28 and 40 second flicker, so it is dolby vision.

Original m2ts is from
https://www.avsforum.com/threads/dune-p ... t-60582530
Also Apple seems to ignore level 5 RPU data.

Do anyone know if there’s a better way to do it?
And can someone test the quality on iOS devices between FEL converted this way and proper streaming profile 5,thanks.
evilmatcher
Posts: 25
Joined: Fri Apr 24, 2020 9:17 am

Re: Dolby Vision now possible through MP4 Mux.

Post by evilmatcher »

I need some help on converting my copy of Saving Private Ryan ST-DL MKV (made with Makemkv 1.16.3) to DT-DL .ts format to play in my x800m2.

The video part works fine on the x800m2 and triggers DV on my TV and plays as it should, but I have no sound.

I have used the RESET_9999 script v.1.3.8 with Mode p7 --> Mode.3 --> workflow.1 and 2 and put the pieces back together in a TS-container with TSmuxer with same result.

My Denon receiver shows Atmos with the MKV-version, but I have no sound when played from the x800m2.

The mediainfo on both the MKV and TS version shows an Atmos True HD audiotrack. Please see the attached txt-files. When i press Info on my LG TV, it shows the DV video and a Dolby Digital+ 5.1 audiotrack.

Any suggestions to what i have missed?
Attachments
Mediainfo SVP TS.txt
(5.04 KiB) Downloaded 5 times
Mediainfo SVP MKV.txt
(6.47 KiB) Downloaded 4 times
RESET_9999
Posts: 887
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

Well, I guess your AVR doesnt like the silent AC3 core TrueHD tracks. Very strange because I also have a Denon AVR and it plays those fine. Your file looks as it should.

you'll have to do the audio separately:
MODE.M ---> MODE.3 ---> Workflow 1 ( or 3 if your mkv doesnt have an ac3 track)

sw5163 wrote:
Sat Jun 25, 2022 7:51 am
I think it is possible to convert dual layer FEL to Apple compatible BL+RPU.
Appletv only support real profile 5 from streaming services which you cannot get from profile 7 rip.
Please forgive my English.
Sony x800m2 ----> Denon AVR ----> LG OLED C2 77"
DoVi.Test.Files / DoVi Scripts / Playback-Devices
evilmatcher
Posts: 25
Joined: Fri Apr 24, 2020 9:17 am

Re: Dolby Vision now possible through MP4 Mux.

Post by evilmatcher »

RESET_9999 wrote:
Sun Jun 26, 2022 12:53 pm
Well, I guess your AVR doesnt like the silent AC3 core TrueHD tracks. Very strange because I also have a Denon AVR and it plays those fine. Your file looks as it should.

you'll have to do the audio separately:
MODE.M ---> MODE.3 ---> Workflow 1 ( or 3 if your mkv doesnt have an ac3 track)
Is it possible that it is the TS-muxer that f.cks up? I have ripped Dune (2021) today from the disc (backup from disc and remux to TS) and exactly same happens. Dolby vision is fine, but the audio track is suddenly DD+. The mediainfo on the TS-file is Dolby TrueHD Atmos though.

I have tried the TS-muxer version I downloaded myself, but also the version from the DOVI tools. Same result.
Post Reply