Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: what does MP3 frame size include? (Read 6070 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

what does MP3 frame size include?

I am a MP3 newbie and trying to understand how to go about parsing out "true" audio data bytes from a MP3 file.
I have come to a understanding that a mp3 frame consists of a frame header and data
and within the frame header itself, it can have headers like XING, LAME, VBRI.
I am wondering if the frame size that can calculated after parsing the 4-byte frame header

(i.e. Frame Size = ( (Samples Per Frame / 8 * Bitrate) / Sampling Rate) + Padding Size)

include these extra header(XING, VBRI, etc) bytes.
And also how about optional CRC bytes?

So all in all, my question is what does "frame size" represent?



what does MP3 frame size include?

Reply #1
include these extra header(XING, VBRI, etc) bytes.


No because those headers (if present) are only once per file before the start of the audio data and are not included in each and every frame.

So all in all, my question is what does "frame size" represent?


Exactly what it sounds like:  the number of bytes in one frame.

what does MP3 frame size include?

Reply #2
include these extra header(XING, VBRI, etc) bytes.


No because those headers (if present) are only once per file before the start of the audio data and are not included in each and every frame.

So all in all, my question is what does "frame size" represent?


Exactly what it sounds like:  the number of bytes in one frame.


Thanks for your reply.
I was talking about the frame size of a frame that includes XING, LAME, VBRI at the start.
Not the ones that don't include those headers.

what does MP3 frame size include?

Reply #3
I don't think the calculation is any different.