Log in

View Full Version : Muxing Overhead & a new Bitrate Calculator


chros
9th April 2002, 12:01
Hi everybody !

So, I'm creating a JavaScript bitrate calculator for the DVD2AVI-AVISynth-GordianKnot-VirtualDub ripping method, with Credits ...
It will be finished within a few days, tested on IE6, Netscape 6.1

The question is: how to calculate the Muxing Overhead, and what are the numbers ?

For example: there's a 6000 sec length movie, 25 fps
In my opinion:
Overhead with MP3 (in Bytes)= 6000*25*64,514
So the Magic number is 64,514 if you use VBR-MP3 ...

Is this correct ??? (I was confirmed with Gordian Knot)

So What'are these numbers in case of Ogg, AC3, ...
CBR-mp3 VBR-mp3 is different???

Thanks
Chros

chros@freemail.hu

sorry for my english

Acaila
9th April 2002, 18:38
I've moved this to GKnot section, because I hope The Wef will know the answer to this one.

TheWEF
9th April 2002, 22:09
these are values i found out with testing, they might not be 100% correct (but correct enough) :

wav, ac3, cbr-mp3: 190 bits/interleave.
vbr-mp3: 320 bits/frame.

! if you mux cbr-mp3 with nandub it is handled like vbr-mp3.
you have to add a wav-header and mux it like a wav-file to get the size advantage.

plus there is an additional overhead per frame in an avi-file, no matter if there is audio or not.
in gknot i use this strange formula:

additional = (23.086+(Frames*0.19140625))/8 [kb]

e.g.:

movie has 100.000 frames, 2 audio streams:

audio 1:
vbr-mp3 (selected interleave interval is ignored).

(320*100000)/(8*1024) = 3906 kb.

audio 2:
ac3, interleave interval is 2 frames:

(190*(100000/2))/(8*1024) = 1160 kb.

additional = (23.086+(100000*0.19140625))/8 = 2396 kb.

complete overhead = 3906+1160+2396 = 7462 kb.


i don't know the numbers for ogg. i suggest that you do some serious testing (like i did) and post your results here.

ok?

wef.

khp
10th April 2002, 00:45
You might also want to take a look the space efficiency section in the mcf spec introduction. They quote Avery Lee on the structural overhead in an avi file.

http://mcf.sourceforge.net

chros
15th April 2002, 01:38
Hi !

Thanx for answering ...
I'm diveing into the subject, so it will take a week, I guess ...

khp: the link was very useful ! thankx
TheWEF: on the khp link, there's a Avery Lee quote, and there I found the magic 64.513 number ...

Quote:
--------
[There are] 8 bytes per sample block, optional padding byte, 16 bytes for legacy index entry, 8 bytes for OpenDML hierarchical index entry. For a file below 2 Gio with interleaving per frame, that's 64-66 bytes per frame with audio. [...] OpenDML files will have a larger overhead per frame (80-82), but typically as a smaller percentage.
--------

So: 8+16+8 = 32 Byte per frame (pure video)
and 32*2 = 64 Byte per frame (if we interleaving the audio per frame)

So: Is the Pure video overhead the HALF of the interleaved overhead ?????

Chros

diji1
21st April 2002, 15:02
hey chros :) - any chance of ogg interleaving being incorporated into your tool ? i have no idea if this is possible but it would be nice. i usually go on 33% of what gknot calculates for mp3 interleaving but it's not 100% accurate. ( my method not gk i presume ... )

chros
22nd April 2002, 09:36
It will be finished the 0.8 version (first public release) within a week (I hope so)
It's version number now: 0.7, and till 0.9 I'm afraid not will be implemented. It require a lot of test, and I must look after the technical background. It will have a rough value for the ogg (in 0.8), but it will far from perfect.

Chros

A_Pleite
26th April 2002, 18:12
Nice topic, here
I´ve tried to do an bitratecalculator with vb6 a while ago, I stopped coz I thought it wouldn´t be useful. I´ve found an older version on the Hd of the pc I´m currently sitting at. I just attach it, for suggetsions or maybe to give an idea to chros...

A_Pleite

chros
30th April 2002, 10:37
Thanks for this, I'll look into it !

Chros