Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th January 2019, 13:56   #1  |  Link
vanden
Registered User
 
Join Date: Sep 2007
Posts: 104
.thd to .thd+ac3 bit depth

Hello,

I have a problem with a TrueHD Atmos 7.1 track from a MKV.
I want to remux it to ISO bluray with TSMuxer ... but we have to add the AC3 track for TSMuxer accept muxing.
So I create a TrueHD+ac3 track with eac3to :
Code:
eac3to v3.34
command line: "C:\Users\Administrateur\Desktop\eac3to334-UsEac3to129\eac3to.exe"  "G:\Ready Player One Dolby TrueHD French.thd" "G:\Ready Player One Dolby TrueHD French.thd_.thd+ac3" -640 -progressnumbers -log="G:\Ready Player One Dolby TrueHD French.thd_Job_2.log"
------------------------------------------------------------------------------
TrueHD (Atmos), 7.1 channels, 48kHz
AC3 encoding doesn't support back channels. Will mix them into the surround.
Decoding with libav/ffmpeg...
Mixing surround channels...
Remapping channels...
Encoding AC3 <640kbps> with libAften...
Creating file "G:\Ready Player One Dolby TrueHD French.thd_.thd+ac3"...
Original audio track, L+R+C+BL+BR+SL+SR: max 24 bits, average 17 bits.
Original audio track, LFE: constant bit depth of 16 bits.
Processed audio track, L+R+C+SL+SR: max 24 bits, average 18 bits.
Processed audio track, LFE: constant bit depth of 16 bits.
eac3to processing took 28 minutes, 16 seconds.
Done.
The track seems in 24bit according to eac3to log ... but when I look with MediaInfo or BDinfo I am told that it is 16 bit :
Code:
BDinfo AUDIO :

Codec                           Language        Bitrate         Description     
-----                           --------        -------         -----------     
Dolby TrueHD/Atmos Audio        French          3748 kbps       7.1 / 48 kHz /  3108 kbps / 16-bit (AC3 Embedded: 5.1 / 48 kHz /   640 kbps / DN -31dB)


MediaInfo Audio :
Format                                   : AC-3 MLP FBA 16-ch
Format/Info                              : Audio Coding 3 + Meridian Lossless Packing FBA with 16-channel presentation
Nom commercial                           : Dolby TrueHD with Dolby Atmos
Durée                                    : 13 h 39 min
Type de débit                            : Variable
Débit                                    : 640 kb/s
Débit maximum                            : 4 917 kb/s
Canaux                                   : 8 canaux
Channel layout                           : L R C LFE Ls Rs Lb Rb
Echantillonnage                          : 48,0 kHz
Images par seconde                       : 31,250 Im/s (1536 SPF)
Profondeur des couleurs                  : 16 bits
Mode de compression                      : Avec perte
Taille du flux                           : 3,66 Gio (100%)
ServiceKind/String                       : Complete Main
Number of dynamic objects                : 11
Bed channel count                        : 1 canal
Bed channel configuration                : LFE
On the other hand when I encode the track TrueHD+ac3 in Wav it is well of 24 bit (MediaInfo & Foobar2000) :
Code:
eac3to :
eac3to v3.34
command line: "C:\Users\Administrateur\Desktop\eac3to334-UsEac3to129\eac3to.exe"  "G:\Ready Player One Dolby TrueHD French.thd+ac3" "G:\Ready Player One Dolby TrueHD French.thd+ac3_.wav" -progressnumbers -log="G:\Ready Player One Dolby TrueHD French.thd+ac3_Job_4.log"
------------------------------------------------------------------------------
TrueHD/AC3 (Atmos), 7.1 channels, 48kHz
(embedded: AC3, 5.1 channels, 640kbps, 48kHz)
Extracting TrueHD stream...
Decoding with libav/ffmpeg...
Writing WAV...
Creating file "G:\Ready Player One Dolby TrueHD French.thd+ac3_.wav"...
Original audio track, L+R+C+BL+BR+SL+SR: max 24 bits, average 17 bits.
Original audio track, LFE: constant bit depth of 16 bits.
Caution: The WAV file is bigger than 4GB.  <WARNING>
Some WAV readers might not be able to handle this file correctly.  <WARNING>
eac3to processing took 9 minutes, 59 seconds.
Done.


MediaInfo :
Général
Nom complet                              : G:\Ready Player One Dolby TrueHD French.thd+ac3_.wav
Format                                   : Wave
Taille du fichier                        : 9,01 Gio
Durée                                    : 2 h 19 min
Type de débit global                     : Constant
Débit global moyen                       : 9 216 kb/s

Audio
Format                                   : PCM
Paramètres du format                     : Little / Signed
Identifiant du codec                     : 00000001-0000-0010-8000-00AA00389B71
Durée                                    : 2 h 19 min
Type de débit                            : Constant
Débit                                    : 9 216 kb/s
Canaux                                   : 8 canaux
Channel layout                           : L R C LFE Lb Lr Ls Rs
Echantillonnage                          : 48,0 kHz
Profondeur des couleurs                  : 24 bits
Taille du flux                           : 9,01 Gio (100%)
So it's 16bit or the 24bit ... I'm lost !

Last edited by vanden; 27th January 2019 at 14:38.
vanden is offline   Reply With Quote
Old 27th January 2019, 16:35   #2  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
"max 24 bits, average 17 bits"

The very least, it will get packed into a 24bit container.
If you were to apply filtering to it of some sort (i think even just volume increase), and save it, it will give a full 24bit file and you can compare the two sizes.
The filtered one will be a bigger size.

I'd gather MediaInfo is just rounding to nearest (16).
__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
Sparktank is offline   Reply With Quote
Old 27th January 2019, 17:21   #3  |  Link
vanden
Registered User
 
Join Date: Sep 2007
Posts: 104
Ok thanks for the answers, but i do not understand why eac3to :

1. indicates "max 24 bits, average 17 bits", which means for me an average of 17bit and peaks at 24bit.

2. When I convert the truehd track into a WAVE it puts me directly in 24bit ... why not in 16bit if it's 16bit !

I should edit the WAVE to be sure ...
vanden is offline   Reply With Quote
Old 27th January 2019, 18:33   #4  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
Since the audio peaks at 24bit, eac3to will store it in a 24bit container.

Unless, you tell it to dither down to 16bit then it will store in a 16bit container.

It's trying to keep the original bit depth for the TrueHD stream as much as possible, so a 24bit container is the solution.
The actual bit depth for the TrueHD is greater than 16 bit depth, and there's no container for 17-23, so 24 is what it must use.

Convert to FLAC and it will be smaller.
Use eac3to to dither down to 16bits and save in FLAC, and it will be even smaller.
__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
Sparktank is offline   Reply With Quote
Old 27th January 2019, 21:07   #5  |  Link
vanden
Registered User
 
Join Date: Sep 2007
Posts: 104
We agree Sparktank, this TrueHD track is in 24 bit (contrary to what filler56789 said).
Here is the edition and statistics of Wave(24bit) track, We clearly see that it goes to max (see attachements).

On the other hand why BDinfo and MediaInfo reports 16 bit when it is a track 24bit TrueHD+ac3 to create with eac3to/from a MKV ??
Note MediaInfo reports no bit depth in the .truehd file (without ac3) and in the MKV file ...
Last thing, BDinfo works well on other Blu-ray :
Code:
AUDIO:

Codec Language Bitrate Description
----- -------- ------- -----------
Dolby TrueHD Audio German 3603 kbps 7.1 / 48 kHz / 3603 kbps / 24-bit (AC3 Embedded: 5.1-EX / 48 kHz / 640 kbps / DN -4dB)
Dolby Digital Audio German 640 kbps 5.1 / 48 kHz / 640 kbps / DN -4dB
Dolby TrueHD Audio English 4131 kbps 7.1 / 48 kHz / 4131 kbps / 24-bit (AC3 Embedded: 5.1-EX / 48 kHz / 640 kbps / DN -4dB)
Dolby Digital Audio English 640 kbps 5.1 / 48 kHz / 640 kbps / DN -4dB
Attached Images
  
vanden is offline   Reply With Quote
Old 27th January 2019, 21:18   #6  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Quote:
Originally Posted by vanden View Post
We agree Sparktank, this TrueHD track is in 24 bit (contrary to what filler56789 said).
Actually, the situation is less simple than you think :-)

Quote:
Originally Posted by madshi View Post
Every TrueHD track has a bitdepth of 24bit. *EVERY ONE*. Every TrueHD decoder always outputs 24bit. However, here comes the big key: Sometimes only 16bit of those 24bit are filled with real audio data and the rest is just zeroed out. With Pirates 1 most of the track had only 16bit of the 24bit filled with data, while the remaining 8bit were always zeroes. But there were a few (very few) parts of the audio track where suddenly those 8bit had data in them.

With Inside Man, if it's a 20bit track (which I don't know), the upper 20bit are filled with real data while the lower 4bit are always filled with zeroes.
filler56789 is offline   Reply With Quote
Old 27th January 2019, 22:02   #7  |  Link
vanden
Registered User
 
Join Date: Sep 2007
Posts: 104
Okay, but is there not a way to scan the TrueHD file to know at what level Max (= bit depth max) it is actually encoded ?

And even more weird about BDinfo and MediaInfo who should know that "Every TrueHD decoder always outputs 24bit" and therefore display 24 bit !

Anything else when we encode a TrueHD file (@max 16bit or even @max 20bit) in Wav 24bit we should see it on the Max level of the Wav when editing no ?
We are talking about Fixed-Point 16bit and 24bit, why would the levels change ?
vanden is offline   Reply With Quote
Old 27th January 2019, 22:09   #8  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Quote:
Originally Posted by vanden View Post

anything else when we encode a truehd file (@max 16bit or even @max 20bit) in wav 24bit we should see it on the max level of the wav when editing no ?
flac?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 27th January 2019, 22:21   #9  |  Link
vanden
Registered User
 
Join Date: Sep 2007
Posts: 104
eac3to.exe C:\Track.thd+ac3 C:\Track.thd+ac3.w64
Or
eac3to.exe C:\Track.thd C:\Track.thd.w64
With Track.thd/Track.thd+ac3 are 16bit or 20bit TrueHD track.
vanden is offline   Reply With Quote
Old 28th January 2019, 03:51   #10  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
I can't understand the problem.

- The thd is not modified by eac3to (it can't recode to thd) then the thd+ac3 is perfect for your ISO

- If the thd have at least 1 sample of 24 bits must be considered and decoded to 24 bits all samples.
It is not a problem if some samples have the less significants bits to 0.

- Don't mistake bitdepth (precission) with level volume.
A 16 sample with 16 bits to 1 have a normalized volume of -1.0 or -0dB
A 24 sample with 24 bits to 1 have a normalized volume of -1.0 or -0dB
A 24 sample with 16 bits to 1 and the last 8 to 0 (equivalent to a bitdepth of 16) have a normalized volume of -0,9999696 or -0.000264 dB
You can't see volume differences in the w64 attached image.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 28th January 2019, 13:04   #11  |  Link
vanden
Registered User
 
Join Date: Sep 2007
Posts: 104
Okay, I think I'm starting to understand. When the resolution is less than 24bit on the file TrueHD (example18 bit) and that eac3to converted in wave 24bit there is a conversion towards 24bit (for this sample 18bit -> 24bit) and thus impossible to compare the volume of the wave.

Okay also for the fact that the TrueHD track is not affected by eac3to.
Quote:
Originally Posted by tebasuna51 View Post
I can't understand the problem.
The problem is simple, why BDinfo and MediaInfo report a TrueHD file to 16bit with TrueHD+ac3 files from ac3to/MKV ? :
Code:
AUDIO :

Codec                           Language        Bitrate         Description     
-----                           --------        -------         -----------     
Dolby TrueHD/Atmos Audio        French          3748 kbps       7.1 / 48 kHz /  3108 kbps / 16-bit (AC3 Embedded: 5.1 / 48 kHz /   640 kbps / DN -31dB)
2 other original blurays :
Code:
Disc Title:     The Nutcracker and the Four Realms - Ultra HD
Disc Label:     THE_NUTCRACKER_FOUR_REALMS_UHD
Disc Size:      63,768,577,687 bytes
Protection:     AACS2
Extras:         Ultra HD, BD-Java
BDInfo:         0.7.5.5

VIDEO:
Codec                   Bitrate             Description     
-----                   -------             -----------     
MPEG-H HEVC Video       71682 kbps          2160p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / HDR10 / BT.2020

AUDIO:
Codec                           Language        Bitrate         Description     
-----                           --------        -------         -----------     
Dolby TrueHD/Atmos Audio        English         5582 kbps       7.1 / 48 kHz /  4942 kbps / 24-bit (AC3 Embedded: 5.1 / 48 kHz /   640 kbps / DN -27dB)
Code:
Disc Title:     PACIFIC_RIM_UPRISING
Disc Size:      43,586,256,430 bytes
Protection:     AACS
BD-Java:        Yes
BDInfo:         0.7.1

VIDEO:
Codec                   Bitrate             Description    

-----                   -------             -----------    

MPEG-4 AVC Video        32734 kbps          1080p / 23.976 fps / 16:9 / High Profile 4.1

AUDIO:
Codec                           Language        Bitrate         Description    

-----                           --------        -------         -----------    

Dolby Atmos/TrueHD Audio        English         4449 kbps       7.1-Atmos / 48 kHz / 4449 kbps / 24-bit (AC3 Core: 5.1-EX / 48 kHz / 448 kbps)
Why !?

Last edited by vanden; 28th January 2019 at 13:21.
vanden is offline   Reply With Quote
Old 28th January 2019, 22:26   #12  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
I don't know BDInfo but MediaInfo don't scan the full track, maybe only the first frame and assume is all the same.

Only eac3to scan the full track and show min/max/average bitdepth.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 1st September 2021, 05:50   #13  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
0xBB does have metadata that signals 24 vs 16 bit. Truehd 0xBA does not, so indeed it is always 24 bit. On another point full 24 bit decoder is broken in ffmpeg. somehow it can only preserve 16 bit. Yet for now since commit https://git.videolan.org/?p=ffmpeg.g...6974a6b3450bfd it is now encoding all frames.
Balling is offline   Reply With Quote
Old 1st September 2021, 07:45   #14  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 272
You are mistaken, and gave multiple factual errors in your post.
richardpl is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.