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: Ogg Bitrates and Filesizes (Read 5135 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Ogg Bitrates and Filesizes

I was thinking about creating a little javascript that allows one to adjust potential quality levels and bitrates to estimate how large their files will be when encoded in Ogg Vorbis (and maybe also display MP3 for comparison).

Does anyone know of a place I can find a graph / chart /equation for deriving a file size's size from quality level?

Thank you!

Ogg Bitrates and Filesizes

Reply #1
q  approx bitrate at 44.1kHz
-1 48
0 64
1 80
2 96
3 112
4 128
5 160
6 192
7 224
8 256
9 320
10 500

just do linear interpolation for fractional q's

Ogg Bitrates and Filesizes

Reply #2
I hope you speak German: [a href="http://www.digital-inn.de/showthread.php?s=&threadid=19007&highlight=bitrate" target="_blank"][/a]
I love the moderators.



Ogg Bitrates and Filesizes

Reply #5
Seems fine to me .

Why don't you add q-1?

IMHO you'll never achieve accurate results as the average bitrate depends on each track but it indeed should help to get a brief impression of the resulting filesize.
I love the moderators.

Ogg Bitrates and Filesizes

Reply #6
'6' and '6.0' give different results.
sic transit gloria mundi...

Ogg Bitrates and Filesizes

Reply #7
Quote
'6' and '6.0' give different results.

Aha, yes... '6' uses standard lookup and '6.0' uses interpolation... I definately have to adjust the interval windows, there's certain fractions with results that are WAY off.

Ogg Bitrates and Filesizes

Reply #8
I implement other metode, my metode is rater simple but I optain de same bitrate than ogdrop calculate, the codec make all calculationand and don´t ned any suplementary search , the interpolation is inerent at the metode used . I based it in de difrences and the code is this:

if (Q<-1 || Q>10)  return error ;
else if ( Q < 0)  out = 64 + (Q *19);
else if ( Q<4)  out = 64 +(Q*16);
else if ( Q<8)  out = 128 +((Q - 4)*32);
else if ( Q<9)  out = 256 +((Q - 8)*64);
else  out = 320 +((Q-9)*180);

this is teh diference study:

D betwen Q-1 & Q0 = 19
D betwen Q0 & Q1 = Q1 & Q2 = Q2 & Q3 = Q3 & Q4 = 16
D betwen Q4 & Q5 = Q5 & Q6 = Q6 & Q7 = Q7 & Q8 = 32
D betwen Q8 & Q9 = 64
D betwen Q9 & Q10 = 180

and I use this formula base -> bitrate = bitare(Qmin of diference) + (Q - Qmin of diference)*diference betwen bitrates
when we have consecutive direrence equals we can set de Qmin of diference at de minimun of de all and we calcualte ani other valor using this formula.

the inverse formula is this Q = (Bitrate to calculate q - Bitrate min of diference)/diference betwen bitrates + Q(Bitrate min of diference)

pd. sorry if i can express good my idea, my English is bad

Ogg Bitrates and Filesizes

Reply #9
something is definitely wrong with the calculator.
1 minute at q=4 128kbps should give 0.96MB, but your calculator gives 0.75MB,
not hard to figure out what went wrong:
Code: [Select]
var bitrate=bitrate/10;

There are 8 bits in a byte, not 10. All the results you calculate is 20% too small!

Ogg Bitrates and Filesizes

Reply #10
fixed.. thank you.  Yes, that was a pathetically simple mistake... i definately overlooked that and the /10 was somewhat of a kludge.

i'll update it tomorrow (while someone's paying me  to reflect better approximations... based on this:


Ogg Bitrates and Filesizes

Reply #11
If anybody cares (and I hope someone does!), I have updated the script to calculate on more accurate intervals for fractions of quality levels.  The estimates are VERY good now.  I've also added a display that shows you the amount of time of audio you could fit if you're filling a data CD-ROM with Vorbis encoded at that quality level.

An example...
For all you audiobook fans out there, on a 703mb (80min) CD, you could burn roughly 25 hours of audio at -q 0.  More than one day of sound on a CD.  These are nice figures; can't wait until the hardware's ready!

Ogg Bitrates and Filesizes

Reply #12
I make my personal implemetation of the bitrate calculator, its diferent in some ways, it make the filesizes diferent but is for de converion of Kbits to kilobytes (8.192 kbits = 1 Kilobyte), thee minimun quality is -1(45kbps) and de maximun 10(500kbps), the code is all mine and I implemet 5 metods:

quality and time -> calculate bitrate and size
bitrate and time -> calculate file size an quality
Size and time -> calculate de bitrate and quality
quality and size -> calculate bitrate and time
bitrate and size -> calculate time size an quality

I ned to add a fuction to round de decimals valors, i add this tomorrow, sorry but all page are made by hand and I'm tired.

My Vorbis Calculator