[vorbis] minimum processor\ram requirements for decoding vorbis files

Greg Wooledge greg at wooledge.org
Wed Apr 3 16:25:38 PST 2002


Paul de Weerd (paul at mail.me.maar.nu) wrote:
> On Wed, Apr 03, 2002 at 04:16:32PM -0500, Ed Sweetman wrote:
> | decoding a 8kbit sample vs. a 200kbit sample is a bit different not
> | because it's more difficult but because you have to decode more in the
> | same amount of time.  
> True, but one could argue that turning only 2 KB into a second of
> audio requires more CPU cycles because .. actually .. i dont know
> because of what,

I don't know either.  So instead of guessing, let's try to find out.

Ignore the "real" time measurements here.  This was not done on an idle
system.  Focus primarily on the "user" number.

This experiment was performed on a Celeron 400 running Linux 2.2.20.  It
has enough RAM to hold the whole .wav file in memory, but the system was
not idle, so it probably had to hit the disk a lot.

====================================================================
dwarf:/tmp$ time oggenc -q 1 -o q1.ogg The\ Beatles\ -\ Fixing\ a\ Hole.wav 
Opening with wav module: WAV file reader
Encoding "The Beatles - Fixing a Hole.wav" to 
         "q1.ogg" at quality 1.00
Encoding with VBR
        [100.0%] [ 0m00s remaining] /

Done encoding file "q1.ogg"

        File length:  2m 36.0s
        Elapsed time: 1m 58.5s
        Rate:         1.3221
        Average bitrate: 80.3 kb/s

<p>real    1m59.139s
user    1m38.920s
sys     0m1.790s
dwarf:/tmp$ time oggenc -q 5 -o q5.ogg The\ Beatles\ -\ Fixing\ a\
Hole.wav 
Opening with wav module: WAV file reader
Encoding "The Beatles - Fixing a Hole.wav" to 
         "q5.ogg" at quality 5.00
Encoding with VBR
        [100.0%] [ 0m00s remaining] -

Done encoding file "q5.ogg"

        File length:  2m 36.0s
        Elapsed time: 2m 02.7s
        Rate:         1.2766
        Average bitrate: 168.4 kb/s

<p>real    2m3.621s
user    1m42.680s
sys     0m2.660s
dwarf:/tmp$ time oggenc -q 9 -o q9.ogg The\ Beatles\ -\ Fixing\ a\
Hole.wav 
Opening with wav module: WAV file reader
Encoding "The Beatles - Fixing a Hole.wav" to 
         "q9.ogg" at quality 9.00
Encoding with VBR
        [100.0%] [ 0m00s remaining] -

Done encoding file "q9.ogg"

        File length:  2m 36.0s
        Elapsed time: 2m 13.1s
        Rate:         1.1768
        Average bitrate: 357.5 kb/s

<p>real    2m15.008s
user    1m49.830s
sys     0m3.070s
dwarf:/tmp$ time ogg123 -d wav -f - q1.ogg >/dev/null

Device:   WAV file output
Author:   Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
Comments: Sends output to a .wav file

Playing: q1.ogg
                                                                                
Done.

real    0m12.047s
user    0m9.380s
sys     0m0.610s
dwarf:/tmp$ time ogg123 -d wav -f - q5.ogg >/dev/null

Device:   WAV file output
Author:   Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
Comments: Sends output to a .wav file

Playing: q5.ogg
                                                                                
Done.

real    0m13.424s
user    0m11.260s
sys     0m0.680s
dwarf:/tmp$ time ogg123 -d wav -f - q9.ogg >/dev/null

Device:   WAV file output
Author:   Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
Comments: Sends output to a .wav file

Playing: q9.ogg
                                                                                
Done.

real    0m19.614s
user    0m14.380s
sys     0m0.800s
====================================================================

Observe that both encode and decode CPU time requirements rise as the
-q rating rises.  In fact, decoding time seems to go up *more* at higher
bitrates than encoding time does.

Summary:
                 q1      q5      q9
  User CPU secs+------+-------+-------
         encode| 98.9 | 102.7 | 109.8
         decode|  9.4 |  11.3 |  14.4


-- 
Greg Wooledge                  |   "Truth belongs to everybody."
greg at wooledge.org              |    - The Red Hot Chili Peppers
http://wooledge.org/~greg/     |


-------------- next part --------------
A non-text attachment was scrubbed...
Name: part
Type: application/pgp-signature
Size: 241 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis/attachments/20020403/d87b287e/part-0001.pgp


More information about the Vorbis mailing list