Help - Search - Members - Calendar
Full Version: Encoding time for Lame or Speex
Hydrogenaudio Forums > Hydrogenaudio Forum > Scientific Discussion
tech_noobie
Hi everyone,


I am wondering if there is a way to find out the exact (or a close approximation) time taken to encode audio data using Lame or Speex, because I think I am going to need them in my project but I really have no idea on how to do it crying.gif . Thank you for your time.

By the way i am not really sure if this is the correct forum to post this question unsure.gif , so please inform me if I post this in the wrong one. Thank you.


tech_noobie
Shade[ST]
it will really depend on your processor...
tech_noobie
Hi Shade,

Thanks for your information, I know that much tongue.gif , thus I will include my computer's specs in my report, but do you by chance know how to perform this? Thank you smile.gif .


tech_noobie
LadFromDownUnder
QUOTE(tech_noobie @ Sep 20 2005, 04:43 PM)
I am wondering if there is a way to find out the exact (or a close approximation) time taken to encode audio data using Lame or Speex, because I think I am going to need them in my project but I really have no idea on how to do it  :cry: . Thank you for your time.


Are you wanting to get LAME/speex to report how long it took for an encode? If so, just call LAME (not sure about speex) from the command line and it will output a report indicating encode time (amongst much other data), for example:

C:\Data\Software\LAME\3.97 alpha\lame3.97a12>lame -V2 02.wav 02.mp3
LAME 3.97 (alpha 12, Aug 30 2005 09:33:55) 32bits (http://www.mp3dev.org/)
warning: alpha versions should be used for testing only
CPU features: MMX (ASM used), SSE (ASM used), SSE2
Using polyphase lowpass filter, transition band: 18671 Hz - 19205 Hz
Encoding 02.wav to 02.mp3
Encoding as 44.1 kHz VBR(q=2) j-stereo MPEG-1 Layer III (ca. 7.3x) qval=3
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
11505/11505 (100%)| 0:29/ 0:29| 0:29/ 0:29| 10.231x| 0:00

32 [ 0]
40 [ 0]
48 [ 1] *
56 [ 0]
64 [ 0]
80 [ 14] *
96 [ 396] ********
112 [ 2357] **********************************************
128 [ 3455] *******************************************************************
160 [ 3479] %******************************************************************
192 [ 859] %****************
224 [ 417] %%%%*****
256 [ 445] %%%%%****
320 [ 82] %*
-------------------------------------------------------------------------------
kbps LR MS % long switch short %
147.8 4.1 95.9 89.6 5.2 5.2
Writing LAME Tag...done
ReplayGain: -8.3dB
tech_noobie
Hi LadFromDownUnder,

Thank you for your reply tongue.gif, that's very neat and informative. By the way, I have asked some guys on the "Speech codecs" forum and they came up with a way on how to time for Speex. I believe that it can also be used for lame. It's very effective if you want to run a lot of experiments (batch them using Matlab tongue.gif), check it out. But of course, they would only give information about time. Once again thanks for your kind help, it helps me heaps smile.gif.


tech_noobie
Synthetic Soul
QUOTE(tech_noobie @ Sep 23 2005, 03:41 AM)
By the way, I have asked some guys on the "Speech codecs" forum and they came up with a way on how to time for Speex. I believe that it can also be used for lame.

Thread in question.

Both solutions (I would use TIMETHIS.EXE so you don't have to do manual calculations) will work for any command, whether it be SPEEXENC, LAME, FLAC, etc.
HotshotGG
QUOTE
I am wondering if there is a way to find out the exact (or a close approximation) time taken to encode audio data using Lame or Speex, because I think I am going to need them in my project but I really have no idea on how to do it crying.gif . Thank you for your time.


If you are on Unix and have access to something like BASH why not just use the time utility? $ time executable arguments blah, etc ;-D. I have been using it recently to measure different implementations of algorithms in C that pertain to the Big-O notation. I don't know if that has anything to do with the encode time rather than just how long it takes algorithm to run, but it is also worth a shot. After getting the feel for Unix BASH shell, I don't know if I will be able to write code on Windows again ;-). So much more flexibility.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.