PDA

View Full Version : Bitrate reader for ac3


Ocrana
24th December 2001, 06:26
Hello,

a few months ago I found a little commandline prog to detect the bitrate of an ac3 stream in a vob file. Anyone has an Idea how to make this, cause the sources of this tool are not aviable..

In eed this for a bitrate calculator

:confused:

DSPguru
24th December 2001, 10:31
sure.
for each frame in the AC3 stream, there's the frame-size-code in the syncinfo (in BSI).
so, if you assume that all frames in the stream are in the same size, just read the syncinfo of the first frame (first 6 bytes of the file would be the first syncinfo), else, compute avarage of all frame-sizes.

here's the struct :
struct syncinfo {
short syncword;
short crc1;
unsigned short frmsizecod:6;
unsigned short fscod:2;
unsigned short bsmod:3;
unsigned short bsid:5;
} ;