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 21st April 2022, 19:39   #1  |  Link
73ChargerFan
Registered User
 
73ChargerFan's Avatar
 
Join Date: Dec 2006
Posts: 523
Q Stream size of different lossless codecs

I have two copies of the same audio track, one encoded as TrueHD and the other DTS XLL. I don't think either stream is object based.

Why is the latter twice the size? Shouldn't each decode to the exact same PCM stream?

Thanks.

#1 Dolby TrueHD
Code:
Format                                   : MLP FBA
Format/Info                              : Meridian Lossless Packing FBA
Commercial name                          : Dolby TrueHD
Codec ID                                 : A_TRUEHD
Duration                                 : 2 h 4 min
Bit rate mode                            : Variable
Bit rate                                 : 2 046 kb/s
Maximum bit rate                         : 3 414 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 96.0 kHz
Frame rate                               : 1 200.000 FPS (80 SPF)
Compression mode                         : Lossless
Delay relative to video                  : 1 s 0 ms
Stream size                              : 1.78 GiB
#2 DTS XLL
Code:
Format                                   : DTS XLL
Format/Info                              : Digital Theater Systems
Commercial name                          : DTS-HD Master Audio
Codec ID                                 : A_DTS
Duration                                 : 2 h 4 min
Bit rate mode                            : Variable
Bit rate                                 : 5 263 kb/s
Channel(s)                               : 6 channels
Channel layout                           : C L R Ls Rs LFE
Sampling rate                            : 96.0 kHz
Frame rate                               : 187.500 FPS (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Delay relative to video                  : 1 s 0 ms
Stream size                              : 4.58 GiB
73ChargerFan is offline   Reply With Quote
Old 22nd April 2022, 00:40   #2  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by 73ChargerFan View Post
Why is the latter twice the size? Shouldn't each decode to the exact same PCM stream?
Decode both and compare.

Maybe the TrueHD have only 16 bits of bitdepth (eac3to detect that).

Also the DTS encoder is less efficient, try FLAC and obtain less size.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 22nd April 2022, 17:59   #3  |  Link
73ChargerFan
Registered User
 
73ChargerFan's Avatar
 
Join Date: Dec 2006
Posts: 523
I was thinking that about the DTS encoder. I'll decode them and see. Thanks.
73ChargerFan is offline   Reply With Quote
Old 30th September 2022, 23:50   #4  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
Oh, but TrueHD has higher compression. Try this: https://www.mediafire.com/file/53xvp...kolai.rar/file

After encoding to flac

ffmpeg.exe -i "o4aU.Nikolai.thd" -compression_level 12 dc.flac

45 133 579 vs 35 863 404 bytes vs ffmpeg native encoder that is much worse 49 887 750.

flac does not even have SEEKTABLE, since not supported in ffmpeg.

Last edited by Balling; 30th September 2022 at 23:54.
Balling is offline   Reply With Quote
Old 1st October 2022, 10:17   #5  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Only with that sample, maybe because:
Quote:
Creating file "C:\tmp\o4aU.Nikolai.thd_.wav"...
Original audio track: max 24 bits, average 16 bits, most common 16 bits.
Most the time flac have better compression.
For instance for Core.thd from Core Universe.m2ts

Code:
139.404.590  Core.thd                  Atmos
 81.928.230  Core.thd_.thd             Without Atmos metadata
216.505.028  Core.thd_.thd_.wav        Uncompressed
 98.373.524  Core.dtshd_.dts           DTS-MA
 71.615.788  Core.thd_.thd_.wav_.flac  Flac
 15.040.000  Core_(5.1.2).eac3         640 Kb/s like Atmos for a 5.1.2 AVR
EDIT: Added DTS-MA size to the compare

Not all 24 bits:
Quote:
Original audio track, L+C: max 23 bits, average 20 bits.
Original audio track, R+SL+SR: max 22 bits, average 20 bits.
Original audio track, LFE: constant bit depth of 20 bits.
Original audio track, BL+BR: max 24 bits, average 20 bits.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 1st October 2022 at 11:23. Reason: Add info
tebasuna51 is offline   Reply With Quote
Old 1st October 2022, 21:55   #6  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
Apparently Dolby encoder is not lossless in stereo in Dolby media encoder. That is why.
Balling is offline   Reply With Quote
Old 3rd October 2022, 19:48   #7  |  Link
SquallMX
Special SeeD
 
Join Date: Nov 2002
Location: Mexico
Posts: 333
DTS-HD multichanel encoding is highly inefficient for 24 bits content, almost buggy, encoding an 16 bits audio file padded with 8 bits of 0s (aka fake 24 bits) will result in a way bigger file size, weirdly enough 2.0 encoding is unaffected and have almost the same file size than 16 bits files (as it should).

Code:
 98,373,524  Core.dtshd24_.dts           DTS-MA 24 Bits
 61,823,828  Core.dtshd16_.dts           DTS-MA 16 Bits
 75,459,316  Core.dtshdFake24_.dts       DTS-MA 24 Bits Fake (16 bits padded with 0s)
 71,772,848  Core.dtshd24_.flac          FLAC 24 Bits
 42,522,237  Core.dtshd16_.flac          FLAC 16 Bits
 42,556,253  Core.dtshdFake24_.flac      FLAC 24 Bits Fake (16 bits padded with 0s)

Last edited by SquallMX; 3rd October 2022 at 20:18.
SquallMX is offline   Reply With Quote
Old 1st February 2023, 11:16   #8  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
Quote:
Originally Posted by SquallMX View Post
DTS-HD multichanel encoding is highly inefficient for 24 bits content, almost buggy, encoding an 16 bits audio file padded with 8 bits of 0s (aka fake 24 bits) will result in a way bigger file size, weirdly enough 2.0 encoding is unaffected and have almost the same file size than 16 bits files (as it should).

Code:
 98,373,524  Core.dtshd24_.dts           DTS-MA 24 Bits
 61,823,828  Core.dtshd16_.dts           DTS-MA 16 Bits
 75,459,316  Core.dtshdFake24_.dts       DTS-MA 24 Bits Fake (16 bits padded with 0s)
 71,772,848  Core.dtshd24_.flac          FLAC 24 Bits
 42,522,237  Core.dtshd16_.flac          FLAC 16 Bits
 42,556,253  Core.dtshdFake24_.flac      FLAC 24 Bits Fake (16 bits padded with 0s)
Dolby Media encoder is not even lossless in many cases, like puting all 0xFF there. And Dolby Encoding Engine is lossless... Even then, Media Encoder SE produced much smaller files, hehe.

Last edited by Balling; 2nd February 2023 at 23:01.
Balling 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 20:36.


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