[vorbis] How to calculate exact bitrate/filesize w/ Vorbis? Plz help

Tyler Knott vault-responce at charter.net
Sun Sep 14 12:36:51 PDT 2003



Tony wrote:

>Hi,
>
>I'm quite familiar w/ mp3 cbr/abr/vbr encoding, as well as mpeg4 (cbr/vbr,etc). And I can always calc the bit rate for a given file size with:
>
>file size * 8000 / length in seconds = kbits/sec
>Works great w/ mpeg4 + mp3.
>
>BUT FOR THE LIFE OF ME: I cannot get oggenc (1.0x version) to give me the file size I want. I calc. it with the above formula, and nothing comes out right. Then I do ratios: if I give 80kbit + I get 160 meg file (and I want a 100 meg file), then i give: x=100*80/160= 50kbit, yet I don't get a 100meg file.
>
>Help. Am I missing something? Maybe coz I'm new to Ogg. Please help me figure it out, coz I definately hear it beating mp3 hands down on some sample tests (of movies) that I've done.
>
>  
>
How are you encoding your ogg files?  When you use a quality setting the 
bitrate can vary widely(on the Opposing Force CD(Half-Life Expansion 
pack) one of the tracks goes all the way to 250 kbps at one point while 
most tracks are ~130 kbps at Q5 even though the normal bitrate at the 
quality is 160(which many of my CDs encode at))  If you want true 
CBR(well, as close as oggenc 1.0 gets but is the only way to get 
close(within a few megs) of your taget filesize) you'd need to set the 
command line options to -b [bitrate] -m [bitrate] -M [bitrate] so that 
it doesn't go over or under the set bitrate.

>PS2. is there _any_ way to put ogg into avi?
>
Not right now. You'd have to go with CBR which would limit the quality 
of the audio severly(you'd lose sync almost imediatly with any VBR 
stream in an AVI file, VBR MP3 in AVIs is a gross hack).  Though there 
would be several uses for a Vorbis ACM codec, like video capture(high 
bitrate Vorbis would be much better than ADPCM, PCM or MP3 audio while 
still compressing pretty good).  There is a project page at 
www.openacm.org but no work has been done on it yet.

>  I realize .ogm is the way to go, but 1) someone needs the extra filters (win32, linux is no problem), and 2) both oggmux (win32) and oggtools (linux) produce .ogm files which play like shit under win98 + mediaplayer2 6.4.07.xxx   [they work just fine w/ Linux + Mplayer 0.9x + CVS versionz)
>
Hmm... they worked fine with me on WiMP 9.0  Have you tried uninstalling 
and reinstalling the DShow filters?

PS.  I'm sick so sorry if this didn't sound too coherent

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list