HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: echohead on 2010-12-18 00:43:23

Title: need help with 5.1ch 20-bit audio
Post by: echohead on 2010-12-18 00:43:23
heres the jist of what im attempting to do:

bluray #1: 16-bit DTS-MA audio

bluray #2: 24-bit DTS-MA audio, with 20 bits of actual data (several applications identify the bit-depth as "20/24")

...

id like to save the 20-bit audio as 24-bit with the last 4 bits zero'd out, which is the exact same way the source audio stream is stored). eac3to retains this even when transcoding to flac, which means that "fake" 24-bit flac files are clearly possible. however, the best ive been able to do is an "actual" 20-bit 5.1ch wav that next to nothing (including the flac encoder) can process, and a 24-bit 5.1ch wav that contains 24 bits of actual data (which bloats the file size to 3.68gb vs 2.52 for the source).

Help?
Title: need help with 5.1ch 20-bit audio
Post by: bryant on 2010-12-18 01:08:09
Hmm, I'm still not sure exactly what you are trying to do, but WavPack will probably have no problems creating a lossless copy of a 20-bit, 5.1 WAV file.
Title: need help with 5.1ch 20-bit audio
Post by: echohead on 2010-12-18 01:16:10
i have a 24-bit (with 20 bits of actual data) audio file from one bluray. ive managed to sync it to the higher-quality video of another bluray of the same movie. i can save it as 24-bit (bloats file size) or 20-bit (nothing will read it), but im trying to find out how to save a 20-in-24bit audio file.

i actually found a post you made (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=3404&view=findpost&p=33299t) several years ago where you describe doing exactly what im attempting:

Quote
I also created a 24-bit file that has 20-bit data in it and got these results:

BPS20-24 WAV 3,856,856 (100%)
BPS20-24 APE 2,815,552 (73.00%, ~7 seconds)
BPS20-24 WV 2,303,130 (59.72%, ~3 seconds)
BPS20-24 FLAC 2,301,059 (59.66%, ~18 seconds)
BPS20-24 RKA 2,231,401 (57.86%, ~69 seconds)
BPS20-24 PAC 2,228,449 (57.78%, ~13 seconds)


... 20-24 FLAC. how did you do this?
Title: need help with 5.1ch 20-bit audio
Post by: saratoga on 2010-12-18 01:28:39
So basically your source is saved as 24 bit with garbage in the last 4 bits, so you want a way to zero the last 4 bits so it compresses more efficiently?  This is pretty easy to do if you write code, but I can't think of a ready made program to do it. 

That said, if you want to make a file smaller by throwing out useless bits, you might be interested in lossywav.
Title: need help with 5.1ch 20-bit audio
Post by: bryant on 2010-12-18 01:52:13
A lot of programs have trouble with WAV files that identify themselves as “20-bit” in the header, which was the point of that post. However, whether WAV files identify themselves as 20-bit or 24-bit, they both have exactly the same data (i.e., each sample is stored in 3 bytes with 4 of the bits zeroed).

Using CoolEdit (or probably Adobe Audition) it is easy to zero the lower 4 bits of a 24-bit WAV file. You just have to save it as a 20-bit WAV (the kind that programs have trouble with) and then load it back and save it again as a 24-bit WAV (making sure you don’t have dithering enabled!). How you might do that with a 5.1 file (which CoolEdit won’t handle) I’m not sure.
Title: need help with 5.1ch 20-bit audio
Post by: andy o on 2010-12-18 05:09:23
Just curious, but what's the size difference between the original DTS-MA file and the 24-bit FLAC file that you could compress?
Title: need help with 5.1ch 20-bit audio
Post by: echohead on 2010-12-19 20:57:44
DTS-MA: 3.14 GB (3,375,416,304 bytes)

FLAC: 2.52 GB (2,713,783,205 bytes)



also i discovered that eac3to has the -down20 switch, which makes a 20-in-24bit audio file. and i was so sure i wasnt asking a stupid question...