D
D
Dimazsever2015-06-03 23:21:56
Programming
Dimazsever, 2015-06-03 23:21:56

How is bitrate calculated in mp3?

I read an article on Habré about the structure of mp3 files. I opened the music in a hex editor to try the whole thing in practice.
It turned out that my file was compressed in MPEG-1 Layer II format. Here's the mp3 frame header just in case: 11111111111110111101001000000100
bits [16-19] is the bitrate index. If you look at the table, it turns out that almost all frames in the file have a bitrate of 384 Kbps. However, if you access the mp3 properties through Windows Media Player, the bitrate is 256 kbps. How so? Tell me, maybe I'm doing something wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-06-03
@Dimazsever

It's simple, you have Layer 3 and not 2, so 256 kbps

[0-10]	1111 1111 111
[11-12]	11 - MPEG 1
[13-14]	01 - Layer 3
[15]		1
[16-19]  	1101 - 256 kbit/s
[20-21]	00 - 44100Hz
[22]		1
[23]		0
[24-25]	00 - stereo
[26-27]	00
[28]		0
[29]		1
[30-31]	00

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question