Help - Search - Members - Calendar
Full Version: CBR Question
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
Agent69
A weird question:

Since CBR MP3 files use the same bitrate through out the song, shouldn't it be possible to determine how much disk space an MP3 will use per minute? For example, just using math, shouldn't I be able to predetermine how big a 4 minute song with a CBR of 256 will be? Is there a formula for figuring this out?
crwl
Eight bits is a byte. Do the math.
Jan S.
([time in secs]*([bitrate]/8))/1024

= size in MB
Agent69
QUOTE(Jan S. @ Aug 5 2004, 06:03 PM)
([time in secs]*([bitrate]/8))/1024

= size in MB
*




Thanks! smile.gif
Lodgikal
kbps = 1000 b/s, therefore the exact formula is:

[time in secs] * [bitrate in kbps] * 1000 / 8 / 1024 / 1024 =
[time in secs] * [bitrate in kbps] * 125 / 1024 / 1024 =
= size in MB

which makes a significant difference when the track is longer than just a couple of minutes.

Sorry for nitpicking wink.gif
Lodgikal

Edit: typo
Frank Bicking
QUOTE
Sorry for nitpicking

Don't forget header and footer. wink.gif
Lodgikal
QUOTE(Frank_Bicking @ Aug 6 2004, 08:00 PM)
Don't forget header and footer. wink.gif

I didn't, the original MP3 standard actually doesn't know tags. wink.gif
Squeller
QUOTE(Lodgikal @ Aug 6 2004, 11:07 AM)
QUOTE(Frank_Bicking @ Aug 6 2004, 08:00 PM)
Don't forget header and footer. wink.gif

I didn't, the original MP3 standard actually doesn't know tags. wink.gif
*


But nice try anyway
outscape
QUOTE(Agent69 @ Aug 5 2004, 04:40 PM)
A weird question:

Since CBR MP3 files use the same bitrate through out the song, shouldn't it be possible to determine how much disk space an MP3 will use per minute?  For example, just using math, shouldn't I be able to  predetermine how big a 4 minute song with a CBR of 256 will be? Is there a formula for figuring this out?
*


if you want you can also download the audioactive bitrate calculator
dev0
QUOTE(Lodgikal @ Aug 6 2004, 08:07 PM)
QUOTE(Frank_Bicking @ Aug 6 2004, 08:00 PM)
Don't forget header and footer. wink.gif

I didn't, the original MP3 standard actually doesn't know tags. wink.gif
*



It still has a header (and maybe even a Xing/LAME tag).
If you use a container like Ogg or AVI, this will add further overhead.
stephanV
QUOTE(dev0 @ Aug 7 2004, 08:00 PM)
It still has a header (and maybe even a Xing/LAME tag).


I thought each frame had its own header, what kind of info would the main header contain then?
criZZb
QUOTE(stephanV @ Aug 7 2004, 07:37 PM)
I thought each frame had its own header, what kind of info would the main header contain then?
*


In case of LAME: encoder delay/padding, settings used, blah, blah, blah wink.gif
stephanV
ah, but the padding is lame-specific and the used settings as wel i guess. so its not really part of the MP3 file format... (?)
Lodgikal
QUOTE(dev0 @ Aug 7 2004, 07:00 PM)
It still has a header (and maybe even a Xing/LAME tag).
If you use a container like Ogg or AVI, this will add further overhead.

LOL, I excused for nitpicking, but WTF is this? biggrin.gif

Frame headers are covered by my calculation, Xing/LAME tags are less than 1 kB, OGG/AVI are containers which have nothing to do with the bitrate of an MP3 audio stream.

Short calculation to demonstrate my nitpicking wasn't that ridiculous:

Consider an MP3 which has a length of 30 minutes and is 256 kbps CBR.
Formula of Jan S. => 56.25 MB
My formula => 54.93 MB

=> difference > 1 MB (which is more than 2%)

Edit: typo (again)
iehova
even more nitpicking: http://en.wikipedia.org/wiki/Byte

QUOTE
A byte has several meanings, all closely related:

   1. A contiguous sequence of a fixed number of bits. On modern computers, an eight-bit byte or octet is by far the most common. Certain older models have used six-, seven-, or nine-bit bytes -- for instance on the 36-bit architecture of the PDP-10. Another example of a non eight-bit sequence is the 12-bit slab of the NCR-315. A byte is always atomic on the system, meaning that it is the smallest addressable unit.
...



SCNR wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.