PowerGamer
13th April 2011, 08:40
A quote from this page: http://www.mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm
MPEG files may have variable bitrate (VBR). This means that bitrate in the file may change. I have learned about two used methods:
bitrate switching. Each frame may be created with different bitrate. It may be used in all layers. Layer III decoders must support this method. Layer I & II decoders may support it.
bit reservoir. Bitrate may be borrowed (within limits) from previous frames in order to provide more bits to demanding parts of the input signal. This causes, however, that the frames are no longer independent, which means you should not cut this files. This is supported only in Layer III.
What remains totally unclear from that article is how exactly do I determine what method was used to encode mp3 file (bitrate switching or bit reservoir) to find out if cutting some frames from the file will have any undesirable side effects?
EDIT: Seems to have figured it out, thanks to The Theory Behind MP3 by Rassol Raissi (http://web.archive.org/web/20070415033351/http://www.rassol.com/cv/mp3.pdf).
According to that pdf, each frame begins with header, followed by optional CRC and then a block of info called "Side information". If the first 9 bits of that block are 0, then bit reservoir technic was not used for encoding that particular frame.
MPEG files may have variable bitrate (VBR). This means that bitrate in the file may change. I have learned about two used methods:
bitrate switching. Each frame may be created with different bitrate. It may be used in all layers. Layer III decoders must support this method. Layer I & II decoders may support it.
bit reservoir. Bitrate may be borrowed (within limits) from previous frames in order to provide more bits to demanding parts of the input signal. This causes, however, that the frames are no longer independent, which means you should not cut this files. This is supported only in Layer III.
What remains totally unclear from that article is how exactly do I determine what method was used to encode mp3 file (bitrate switching or bit reservoir) to find out if cutting some frames from the file will have any undesirable side effects?
EDIT: Seems to have figured it out, thanks to The Theory Behind MP3 by Rassol Raissi (http://web.archive.org/web/20070415033351/http://www.rassol.com/cv/mp3.pdf).
According to that pdf, each frame begins with header, followed by optional CRC and then a block of info called "Side information". If the first 9 bits of that block are 0, then bit reservoir technic was not used for encoding that particular frame.