Log in

View Full Version : 20 Bits in Wav extraction


omatrot
18th July 2002, 13:11
I' using SmartRipper 2.41
Here is my problem. I'm trying to extract wav file from an 2CH AC3 Stream. The WAV stream is displayed as 20 bits by SmartRipper, but the extracted WAV file is not. In fact it's probably 16. So the file is unusable.
Will it be fixed in a future realease ?
Thanks

DJ Bobo
18th July 2002, 14:10
wait a sec, I never known that SmartRipper can convert AC3 in WAV.
As far as I know, it can only extract the AC3 as is. Then you can use AZID to convert it to WAV. In default mode, AZID will give you a regular 16-bit WAV
If you want higher resolution WAVS, add the following:

-F wav24 for 24-bit integer WAVs
or
-F wav_float for 32-bit floating point WAVs

But I don't really see the real advantadge of making such files, you won't notice the difference anyway.
BTW, Lame can't handle 32-bit WAV files... as far as I know!

omatrot
19th July 2002, 08:30
If you choose to demux to an extra file and the AC3 stream contains PCM, you got a wav file.

Now I think it's a bug of the software that incorrectly sets the WAV header. It writes that i's 16 bits depth, but in fact it's 20.

DJ Bobo
19th July 2002, 12:44
Sorry, but AC3 & PCM are 2 totally different things, so no way that an AC3 stream contains PCM ;)
AC3 = Dolby Digital compressed audio file
PCM = no compression at all, comparable with AudioCD

omatrot
19th July 2002, 14:05
I'm not using smartripper right now so I can't tell you exactly what's displayed in the audio stream :( I'll give a screen copy to make things clear. But I'm pretty sure that there is a bug in SmartRipper because the resulting WAV file is incorrect.

omatrot
22nd July 2002, 07:48
Well here it is : the Audio stream is displayed like this :

LPCM (2CH) 48Khz 20 bits

When you demux this stream to an extra file you obtain a WAV file, but it's unhearable. I think it's because the content a the WAV file is marked in the header as 16 bits and not 20. I may be wrong but I'm pretty sure not. Is there a way to ask about this case the author of SmartRipper ???

LigH
22nd July 2002, 21:12
The problem here is: If this PCM file is really a 20 bit one, it probably cannot be changed into a WAV file just by adding a header - it would require to be restructured. Proper WAV files with 20 bit valid resolution per sample are in fact using 3 bytes per sample and filling the least significant 4 bits with 0s (or they have to be ignored on reading). But 20 bit PCM from a DVD... I don't know how they are structured, if they are packed tightly, not with byte boundaries, then it could even be possible that a stereo sample is stuffed into 5 bytes so that the 3rd byte contains the 4 LSb of one and the 4 MSb of the next channel's sample.

Unfortunately, I cannot check this, I don't know any DVD which really uses a 20 bit LPCM track; but I'm very interested in such a file - I would be glad if you could send me a small part of that file, maybe a few seconds cut out of that file from the very beginning. Please write me a PM to tell me if you can do that favour for me.

omatrot
23rd July 2002, 07:44
I will sent you a file extracted from a small track. You can give me your address in an e-mail sent to ol@rte.fr
You could also by the DVD that I'm talking about ! It's "In the Flesh Live" from Roger Waters.

LigH
26th July 2002, 09:15
Originally posted by omatrot
I will sent you a file extracted from a small track...

I've just received the file, thank you.

Good news: I'm getting close! I already know how the data is structured; now I just need to find a way how to convert the data from that unusual to a common format. This will take it's time, though...

Tsui
26th July 2002, 18:30
Can you send me that file to mpeg2hq@lycos.de ?

What did you find out about the Structure of that 20 bit LPCM ?

Greetings
Tsunami

LigH
19th August 2002, 18:11
Finally - I have a tool ready which can convert such a demuxed LPCM or ripped pseudo WAVE to a real 16-bit or 24-bit WAVE file.

Please find it soon attached here.

It is not deeply checked because I do not have any good sources. Especially the assignment of the LSB half-bytes to the channels is only one possible guess; the 16-bit conversion shall be correct anyway.

DSPguru
19th August 2002, 18:13
Originally posted by LigH
Please find it soon attached here.validated :)

Tsui
19th August 2002, 19:23
I am still searching a 20bit LPCM File, the one I received per email contains only zeroes and was therefor useless.
Can anyone send me a short piece of a 2ßbit LPCM file with real data please ?

Greetings
Tsunami

LigH
19th August 2002, 19:29
Attached here is a very short piece of raw PCM which sounds like applause - almost the only source I had.

Stripping the LSBs off down to 16 bits is easy - just throw away each 5th double-byte. But how to assign these four half-bytes to the corresponding four samples is yet unknown - my idea might be wrong, to check this, I need better sources.

I wonder if there is some kind of "list" which reports more DVDs containing 20bit audio...