tech_noobie
Oct 24 2005, 22:05
Hi all,
I have just run a few experiments with LAME. I use different types of audio such as Pop, Instrument, and even Speeches, all of which have a length of 20 seconds. I notice that the encoding time needed seems to depend a lot on the quality setting being used, this is more obvious when I use -q 0 as my quality setting. So I am just wondering what causes LAME to take a longer time to encode one type of audio and a shorter time to encode other type of audio? For instance the time it takes to encode the instrumental song seems to be significantly longer than the time it takes to encode speech file.
This is a bit off the topic but I have tried similar experimentation using Speex (i know that it is not optimised for general audio) and the results show that the encoding time needed by Speex to encode different music genres are approximately the same. My first thought as to why this is not the case with LAME is because of the amount of time needed to do the lossless huffman encoding, speech for example are repetitive and hence perhaps can be represented by using fewer codewords than a pop music.
Helps are greatly appreciated. Thank you.
kornchild2002
Oct 24 2005, 23:26
The encoding time of the Lame mp3 encoder (my experience is with 3.90.3, 3.96.1, and 3.97b1) depends on the complexity of the music sample. A speech sample does not have the same complexity of a instrumental sample so Lame will assign a lower bitrate to the speech sample than the instrumental sample.
For example, I have a CD that has a rap song on it. This rap song, when encoded at the -V 2 --vbr-new (default to -q0) setting encodes at about 11X at around a bitrate of ~160kbps VBR. There is a metal track on the CD as well. Using the same settings, the ecoding speed is about 9-10X with a bitrate of ~256kbps VBR.
FYI - using different -q values and Lame 3.97b1 don't really do much for certain -q values. The -q values of -q0, -q1, -q2, -q3, and -q4 (not sure about this one) will result in bit for bit same values. This means that using -q0 will give you the same quality as -q2.*
*Just a note - this is what I have read on the HA forums by some posts. I have tried changing the -q values (for -q0, -q1, and -q2) and have come up with songs that have the same bitrates.
xmixahlx
Oct 25 2005, 00:48
speed for lame is, iirc, vbr > abr > cbr per sample/complexity
> = more than (time)
later
tech_noobie
Oct 25 2005, 01:48
Oh I am very sorry I forgot to tell you that the experiments are done using CBR and ABR mode. The thing is this variations in encoding time are also present when I use CBR mode. Thanks for your reply.
guruboolez
Oct 25 2005, 03:39
QUOTE(xmixahlx @ Oct 25 2005, 07:48 AM)
speed for lame is, iirc, vbr > abr > cbr per sample/complexity
> = more than (time)
vbr is now faster than abr/cbr (with --vbr-new).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.