MPEG Audio Info

Detect the structure of the MPEG audio frame header
Download

MPEG Audio Info Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Publisher Name:
  • Konrad Windszus
  • Publisher web site:
  • http://www.wincd.de
  • Operating Systems:
  • Windows All
  • File Size:
  • 225 KB

MPEG Audio Info Tags


MPEG Audio Info Description

The MPEG Audio Info application was developed to be a small tool that will lets you detect the structure of the MPEG audio frame header including the XING and VBRI headers. The aim is to estimate the duration of the MPEG audio file as exact and fast as possible. The article does not include any hints on how to decode/encode the actual audio data. MPEG audio files exist in different layers. The most common is the MPEG 1 Layer III (also known as MP3), as it has the most sophisticated compression technology.An MPEG audio file consists out of frames. Each frame contains a header at its beginning followed by the audio data. This audio data always contains a fixed number of samples. There currently exists three layers of MPEG audio, which differ in how the audio data is encoded in the frame, although they all have the same header format. The frame itself consists of slots. In Layer I, a slot is always 4 byte long, in all other the layers a slot is 1 byte long.If the protection bit in the header is not set, the frame contains a 16 bit CRC (Cyclic Redundancy Checksum). This checksum directly follows the frame header and is a big-endian WORD. To verify this checksum you have to calculate it for the frame and compare the calculated CRC with the stored CRC. If they aren't equal probably a transfer error has appeared. It is also helpful to check the CRC to verify that you really found the beginning of a frame, because the sync bits do in same cases also occur within the data section of a frame.The CRC is calculated by applying the CRC-16 algorithm (with the generator polynom 0x8005) to a part of the frame. The following data is considered for the CRC: the last two bytes of the header and a number of bits from the audio data which follows the checksum after the header. The checksum itself must be skipped for CRC calculation. Unfortunately there is no easy way to compute the number of frames which are necessary for the checksum calculation in Layer II. Therefore I left it out in the code. You would need other information apart from the header to calculate the necessary bits. However it is possible to compute the number of protected bits in Layer I and Layer III only with the information from the header.For Layer III, you consider the complete side information for the CRC calculation. The side information follows the header or the CRC in Layer III files. It contains information about the general decoding of the frame, but doesn't contain the actual encoded audio samples. The following table shows the size of the side information for all Layer III files.


MPEG Audio Info Related Software