Dolby Vision now possible through MP4 Mux.

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

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

I'm getting the same result :( ... I'm still going to try it on the oled tonight...

Image


EDIT:, nop, no go in the TV(which supports atmos and dts=x). no audio detected....
But it's still a step in the right direction. FFmpeg dev should be able to fix that.
Last edited by RESET_9999 on Tue Aug 27, 2019 11:10 am, edited 2 times in total.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
MastaG
Posts: 98
Joined: Thu Aug 08, 2019 11:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by MastaG »

RESET_9999 wrote: Mon Aug 26, 2019 6:47 pm I'm getting the same result :( ... im still going to try it on the oled tonight...

Image
Please keep us posted :)
MastaG
Posts: 98
Joined: Thu Aug 08, 2019 11:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by MastaG »

So I've compiled ffmpeg from git.

I now saved the truehd audio track from Alita to a new mp4 container.

Code: Select all

Input #0, mpegts, from 'bluray:./':
  Duration: 00:03:28.21, start: 11.646667, bitrate: 2251891 kb/s
  Program 1 
    Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
    Stream #0:1[0x1015]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
    Stream #0:2[0x1100]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 7.1, s32 (24 bit)
    Stream #0:3[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
....
It's the truehd one at 0:2.

So by simply doing:

Code: Select all

ffmpeg -i bluray:./ -map 0:2 -c copy -strict -2 ../alita_demux/truehd.mp4
It will mux the truehd track into a "new" container:

Code: Select all

Output #0, mp4, to '../alita_demux/truehd.mp4':
  Metadata:
    encoder         : Lavf58.31.104
    Stream #0:0: Audio: truehd (mlpa / 0x61706C6D), 48000 Hz, 7.1, s32 (24 bit)
Stream mapping:
  Stream #0:2 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 4540858kB time=02:01:57.31 bitrate=5083.7kbits/s speed=14.2x    
video:0kB audio:4506193kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.769282%
So now what?
I now use MP4Box to mux the truehd stream from the truehd.mp4 container into my DV mp4 container which I've created with dolby mp4muxer?
MastaG
Posts: 98
Joined: Thu Aug 08, 2019 11:40 am

Re: Dolby Vision now possible through MP4 Mux.

Post by MastaG »

Well I tried to add the truehd track with MP4Box.
So for the record:
alita.dv.mp4 - The DV movie created with Dolby's mp4muxer (from the base-layer and enhanced-layer), only contains the two video layers
truehd.mp4 - The TrueHD audio track muxed into a mp4 container with ffmpeg: ffmpeg -i bluray:./ -map 0:2 -c copy -strict -2 truehd.mp4
dolby.ac3 - The Dolby Digital 5.1 audio track saved with ffmpeg: ffmpeg -i bluray:./ -map 0:3 -c copy dolby.ac3

Code: Select all

MP4Box -add alita.dv.mp4:rate=0 -add truehd.mp4#audio:lang=en-US -add dolby.ac3#audio:lang=en-US -no-iod Alita.Battle.Angel.2019.DV.TrueHD.AC3.mp4

[iso file] Unknown box type hvcC in parent dvhe
[iso file] dvcC reserved bytes are not zero
[iso file] Unknown box type hvcC in parent dvhe
[iso file] dvcC reserved bytes are not zero
IsoMedia import alita.dv.mp4 - track ID 1 - Video (size 3840 x 2160)
[iso file] Unknown box type hvcC in parent dvhe           
[iso file] dvcC reserved bytes are not zero
IsoMedia import alita.dv.mp4 - track ID 2 - Video (size 1920 x 1080)
[iso file] Unknown box type mlpa in parent stsd           
[iso file] Unknown box type mlpa in parent stsd
IsoMedia import truehd.mp4 - track ID 1 - Audio (SR 0 - 2 channels)
AC3 import - sample rate 48000 - 5.1 channels             
Saving to Alita.Battle.Angel.2019.DV.TrueHD.AC3.mp4: 0.500 secs Interleaving
I think MP4Box somehow messed up:

Code: Select all

General
Complete name                            : Alita.Battle.Angel.2019.DV.TrueHD.AC3.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom)
File size                                : 41.9 GiB
Duration                                 : 2 h 1 min
Overall bit rate                         : 49.2 Mb/s
Encoded date                             : UTC 2019-08-27 09:08:56
Tagged date                              : UTC 2019-08-27 09:08:56

Video #1
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile A compatible
Codec ID                                 : hev1
Codec ID/Info                            : High Efficiency Video Coding
Duration                                 : 2 h 1 min
Bit rate                                 : 41.4 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.208
Stream size                              : 35.2 GiB (84%)
Default                                  : No
Encoded date                             : UTC 2019-08-08 13:26:09
Tagged date                              : UTC 2019-08-27 09:20:15
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
Maximum Content Light Level              : 233 cd/m2
Maximum Frame-Average Light Level        : 63 cd/m2
Codec configuration box                  : hvcC

Video #2
ID                                       : 2
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : Dolby Vision, Version 1.0, dvhe.07.06, EL+RPU / SMPTE ST 2086, HDR10 compatible
Codec ID                                 : dvhe
Codec ID/Info                            : High Efficiency Video Coding with Dolby Vision
Duration                                 : 2 h 1 min
Bit rate                                 : 2 135 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 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.043
Stream size                              : 1.82 GiB (4%)
Default                                  : No
Encoded date                             : UTC 2019-08-08 13:26:09
Tagged date                              : UTC 2019-08-27 09:20:15
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                                       : 3
Format                                   : mlpa
Codec ID                                 : mlpa
Duration                                 : 2 h 1 min
Bit rate                                 : 5 045 kb/s
Maximum bit rate                         : 9 828 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 158 kHz
Bit depth                                : 16 bits
Stream size                              : 4.30 GiB (10%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 1
Tagged date                              : UTC 2019-08-27 09:20:15

Audio #2
ID                                       : 4
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : ac-3
Duration                                 : 2 h 1 min
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Maximum bit rate                         : 676 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)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 558 MiB (1%)
Title                                    : ac3#audio:lang=en-US@GPAC0.8.0-revrelease
Language                                 : English
Service kind                             : Complete Main
Encoded date                             : UTC 2019-08-27 09:20:14
Tagged date                              : UTC 2019-08-27 09:20:15
As it reports the truehd (mlpa) track as 2-channels instead of 7.1

EDIT:
Here's the information regarding the truehd.mp4 container which contains the truehd track:

Code: Select all

General
Complete name                            : truehd.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/mp41)
File size                                : 4.33 GiB
Duration                                 : 2 h 1 min
Overall bit rate                         : 5 084 kb/s
Writing application                      : Lavf58.31.104

Audio
ID                                       : 1
Format                                   : mlpa
Codec ID                                 : mlpa
Duration                                 : 2 h 1 min
Bit rate                                 : 5 045 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 158 kHz
Bit depth                                : 16 bits
Stream size                              : 4.30 GiB (99%)
Default                                  : Yes
Alternate group                          : 1
So it looks like FFMpeg still needs some work as the codec ID should be: A_TRUEHD and it sohuld at least report 7.1 channels...
bl4ck
Posts: 17
Joined: Sun Jul 21, 2019 6:43 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by bl4ck »

@MastaG
What linux you use? maybe you can help me compile dlb_mp4base

I use 4.19.66-1-MANJARO x86_64 GNU/Linux and my error:

Code: Select all

linux_amd64]$ make mp4muxer_release
make: *** Brak reguł do zrobienia obiektu '../../../../dlb_mp4base/frontend/mp4_muxer_app.c', wymaganego przez 'obj/mp4muxer_release/mp4_muxer_app.o'. Stop.
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

bl4ck wrote: Wed Aug 28, 2019 11:28 am @MastaG
What linux you use? maybe you can help me compile dlb_mp4base

I use 4.19.66-1-MANJARO x86_64 GNU/Linux and my error:

Code: Select all

linux_amd64]$ make mp4muxer_release
make: *** Brak reguł do zrobienia obiektu '../../../../dlb_mp4base/frontend/mp4_muxer_app.c', wymaganego przez 'obj/mp4muxer_release/mp4_muxer_app.o'. Stop.
Did you run the "make" command inside the appropriate directory?

Code: Select all

git clone https://github.com/DolbyLaboratories/dlb_mp4base.git
cd dlb_mp4base/make/mp4muxer/linux_amd64
make mp4muxer_release
bl4ck
Posts: 17
Joined: Sun Jul 21, 2019 6:43 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by bl4ck »

Yep I tried git clone again now it is ok, thx.
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

bl4ck wrote: Wed Aug 28, 2019 3:40 pm Yep I tried git clone again now it is ok, thx.
You're welcome!
MastaG wrote: Tue Aug 27, 2019 9:42 am So it looks like FFMpeg still needs some work as the codec ID should be: A_TRUEHD and it sohuld at least report 7.1 channels...
A_TRUEHD is a codec tag used for the matroska container. I think the MPLA id is the right one. I don't know if out there there is a player that can start playing an audio track with this codec descriptor: if a device (like ours TVs) is unable to do so, it will need a firmware update (don't worry...it won't happen).

It seems to me that we're stuck at the same point...
mercwithamouth
Posts: 2
Joined: Thu Aug 29, 2019 8:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by mercwithamouth »

I used DVDFab's UHD Copy to burn a movie file onto a blank Blu-ray disc yesterday and, as it turns out, it keeps the Dolby Vision AND the lossless Dolby Atmos track. I downloaded Rocketman (found an HEVC upload of it, which is the entire disc including Dolby Vision), and after burning a copy onto the blank disc, I played it on my Sony UBP-X700 Blu-ray player. Sure enough, this popped up. I have yet to test a rip of one of my 4K Blu-rays, but I'm sure it'll work roughly the same.
Attachments
20190829_161047.jpg
20190829_161047.jpg (876.11 KiB) Viewed 41251 times
Redhawk2000
Posts: 32
Joined: Sun Dec 09, 2018 10:26 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Redhawk2000 »

Just a lurker here just paying attention to see if this ever really works fully. Sorry to ask a quick hijacking question but I wonder if it might be answered by what is necessary in the efforts of those trying to figure this out: Is it possible with freeware (or cheapware) to convert lpcm (actually flac) to Dolby true HD losslessly? Obviously wouldn't have Atmos metadata. Thanks.
RESET_9999
Posts: 2421
Joined: Mon Aug 05, 2019 7:12 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by RESET_9999 »

mercwithamouth wrote: Thu Aug 29, 2019 9:02 pm I used DVDFab's UHD Copy to burn a movie file onto a blank Blu-ray disc yesterday and, as it turns out, it keeps the Dolby Vision AND the lossless Dolby Atmos track. I downloaded Rocketman (found an HEVC upload of it, which is the entire disc including Dolby Vision), and after burning a copy onto the blank disc, I played it on my Sony UBP-X700 Blu-ray player. Sure enough, this popped up. I have yet to test a rip of one of my 4K Blu-rays, but I'm sure it'll work roughly the same.
I do the same when a movie fit a BD-50 but almost all the movies are larger than that(even without all the audio and menu) and triple-layer BD-R are very expensive. yes, you can encode it to fit a BD-50 or even a BD-25 but it's not an option when you only want to watch the best quality possible.
Sorry for my English.
G5 / AM6B+ / Denon 7.2.4
DoVi_Scripts
DoVi Playback Devices
Woodstock
Posts: 10973
Joined: Sun Jul 24, 2011 11:21 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Woodstock »

Redhawk2000 wrote: Thu Aug 29, 2019 10:38 pm Is it possible with freeware (or cheapware) to convert lpcm (actually flac) to Dolby true HD losslessly?
Freeware, no. Dolby TrueHD is proprietary, and there is no current free alternative to buying a license from Dolby.
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

RESET_9999 wrote: Fri Aug 30, 2019 2:29 am triple-layer BD-R are very expensive. yes, you can encode it to fit a BD-50 or even a BD-25 but it's not an option when you only want to watch the best quality possible.
I agree
Redhawk2000 wrote: Thu Aug 29, 2019 10:38 pm Is it possible with freeware (or cheapware) to convert lpcm (actually flac) to Dolby true HD losslessly?
Perhaps you'd be interested in the DTS-HD Master Audio format (DTS-HD MA == TrueHD). It's not freeware but, for "testing purpose" :wink: , it could be totally free.
Redhawk2000
Posts: 32
Joined: Sun Dec 09, 2018 10:26 pm

Re: Dolby Vision now possible through MP4 Mux.

Post by Redhawk2000 »

yusesope wrote: Fri Aug 30, 2019 10:01 amPerhaps you'd be interested in the DTS-HD Master Audio format (DTS-HD MA == TrueHD). It's not freeware but, for "testing purpose" :wink: , it could be totally free.
That would be just fine, actually. What would that option be?
yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision now possible through MP4 Mux.

Post by yusesope »

Redhawk2000 wrote: Fri Aug 30, 2019 4:03 pm That would be just fine, actually. What would that option be?
What you need:
eac3to (search for "eac3to videohelp")
JAVA SE (search for "jPortable_6_Update_31.1_online.paf sourceforge")
DTS-HD Master Audio Suite (warez link removed)

DTS-HD Master Audio Suite is the tool you're looking for. In order for it to work, you have to install Java SE. I suggest you use the portable version (jPortable) and keep your PC clean. Run the paf.exe and select a destination directory (don't move the folder once created). You must also update the PATH environment variable by adding to it " the\directory\you\chose\Java\bin" (If you don't know how to do, search for "Add to the PATH on Windows 10").

Now, the first thing you must do is to convert your FLAC file to XX mono WAV tracks (where XX is the number of channels). The command line for that is:

Code: Select all

eac3to input.flac output.wavs
Every wav will be renamed whit the correct channel label.

Once you have demuxed your original track, you must import the XX mono WAV tracks using DTS-HD Master Audio Suite. Choose the best settings and start the encoding process.
You're done!
Post Reply