Log in

View Full Version : Audio stream changes bitdepth


tormento
14th August 2024, 00:21
I have a BD where the DTS audio changes from 24 to 16 and back to 24 again.

What should I do, keep it as it is, letting ffmpeg to deal with it, or dither everything to 16 bit?

tebasuna51
14th August 2024, 08:15
It is your choice, keep it as it is or recode all to AAC to save space.

tormento
14th August 2024, 08:46
It is your choice, keep it as it is or recode all to AAC to save space.
Are audio encoders aware when bit depth changes?

I mostly use ffmpeg for decoding, qaac, flac and DEE for encoding.

My workpath is converting everything to WAV RF64 then encode.

tebasuna51
15th August 2024, 09:55
Are audio encoders aware when bit depth changes?...

The problem can be with the decoders, how react to bitdepth changes, because the output wav can't change the bitdepth on the fly.

Test it with ffmpeg and eac3to (this last one check the bitdepth also checking if the more precission bits are always 0).

I never see that problem, if I have time I can do some test.

How do you detect these changes? In different m2ts of BD?

tebasuna51
15th August 2024, 11:45
eac3to decoder over a dtsma begin with 16 bits and change to 24 bits:

Creating file "D:\tmp\6p1624.dts_.wav"...
libDcaDec is outputting 24bit instead of the expected 16bit data. <WARNING>
eac3to will dither the libDcaDec output down to 16bit. <WARNING>
You can force 24bit decoding by using the "-24" option. <WARNING>
The original audio track has a constant bit depth of 16 bits.

eac3to decoder over a dtsma begin with 24 bits and change to 16 bits:

Creating file "D:\tmp\6p2416.dts_.wav"...
libDcaDec is outputting 16bit instead of the expected 24bit data. <WARNING>
Original audio track: max 24 bits, average 18 bits, most common 16 bits.

The recommended option is then:

eac3to input.dts output.rf64 -24
...
Creating file "D:\tmp\6p2416.dts_f.rf64"...
Original audio track: max 24 bits, average 18 bits, most common 16 bits.

No mather the input you preserve the max precission and after recode to your desired output format.

tormento
15th August 2024, 12:08
How do you detect these changes? In different m2ts of BD?
MakeMKV warned me about it.

tormento
15th August 2024, 12:09
No mather the input you preserve the max precission and after recode to your desired output format.
Thank you.

j7n
20th August 2024, 10:56
Most lossless codecs will compress missing bits down to nothing as long as they are null. Wavpack can also detect repeated, unitialized bits and compress them. That is no longer the case if dither is introduced. If you re-encode then the decoder will see the same bit-depth thoughout.

Changes in bit depth might indicate an issue where foreign data was unintentionally spliced in. Maybe there is a change between segments such as logos.