View Single Post
Old 3rd December 2008, 11:42   #671  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by KoD View Post
I've noticed that mkvmerge doesn't see LPCM audio streams inside DVD VOBs.
@Mosu,

LPCM streams in VOB files are marked with "stream_index & 0xf0 == 0xa0". Each PES LPCM data block has a 3 byte header. Here's how to read the header:

Code:
channels = buf[1] & 0x7 + 1;
bitdepth = (buf[1] & 0xc0) >> 6;  // 0=16bit; 1=20bit; 2=24bit
samplerate = (buf[1] & 0x30) >> 4;  // 0=48k; 1=96k; 2=192k
The actual LPCM data for 16bit tracks is stored as expected (in big endian). However, 20bit/24bit is stored rather strangely. Unfortunately I don't have any samples for 20bit and 24bit...

Please note that the header is different for EVO files!
madshi is offline