INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: HELP: Fastest Possible LAME Encoder Switches  (Read 4106 times)

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42323
  • Shoes gone again!
HELP: Fastest Possible LAME Encoder Switches
« on: January 25, 2006, 07:47:57 am »

We're looking for the fastest possible LAME encoder switches.  We'd like to make this a simple thing to enable in the encoder settings for times where perfect quality isn't crucial -- like when you're loading the iPod from APE files for a road trip.

I was playing around converting an album this morning:

MP3 Normal Fast (VBR): 4:08
CBR 320 (with fast switch manually added): 3:05
-b 256 --cbr -q 9 --noreplaygain: 2:03

Does anyone have any more insight on this?  Are there switches even faster than the ones I found?  Is -q 9 fine when you're using 256 or 320 CBR?

Thanks for any help.

Logged
Matt Ashland, JRiver Media Center

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: HELP: Fastest Possible LAME Encoder Switches
« Reply #1 on: January 25, 2006, 03:38:17 pm »

I think LAME is a synonym for quality. The "low quality" options in LAME have not been tweaked for ages if ever. Personally I would not use -q values that are worse than 5.

I suppose 7 could be acceptable with high bitrates, but 9 is bad.

From the LAME documentation:
Quote
=======================================================================
fast mode
=======================================================================
-f   

Same as -q 7. 

NOT RECOMMENDED.  Use when encoding speed is critical and encoding
quality does not matter.  Disable noise shaping.  Psycho acoustics are
used only for bit allocation and pre-echo detection.

and
Quote
-q 9:  disables almost all algorithms including psy-model. poor quality.

The fastest commandline I would use is -b 256 -q 5 --noreplaygain (or some other CBR bitrate, but not lower than 160 kbps with -q 5).

As you said, --noreplaygain is a bit faster because the replay gain calculation is disabled (this not used with MC or DAPs anyway). BTW, --cbr is not needed, plain -b xxx makes it CBR.



Instead of tweaking LAME settings I would use the Fraunhofer encoder included in WMP10. It is often 4x faster than LAME.


Here is how I have made it available as an external encoder in MC:

- The default WMP10 MP3 encoder can be installed as an ACM codec by this small registry edit:
http://www.looprecorder.de/tut_l3codec.php

- ACMENC, a commandline frontend for ACM codecs is configured as an external encoder in MC.
http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/rewrite/tc_3.html

More information about these:
http://www.hydrogenaudio.org/forums/index.php?showtopic=26956


With the -p fiis-pro -b 256 %IN %OUT commandline in the MC's External Encoder options it encodes 256 kbps MP3 files at about 47-48x speed on my 2.8 GHz P4. The audio quality is fine at this bitrate and tagging works too.

During encoding the command prompt looks like this:
Quote
ACMENC version 0.6  Copyright (c) 2004 by Nyaochi  (Thu, 16 Sep 2004)
Input: D:\Test\bfft2004-04-06d1t10 (temp).wav (Microsoft WAV 44.1kHz 16bit 2ch)
Output: D:\Test\bfft2004-04-06d1t10.mp3 (MPEG1 Layer-III 44kHz 256Kbit/s 2ch)
Fraunhofer IIS MPEG Layer-3 Codec (professional) Version 3.3.44
Copyright (C) 1996-2004 Fraunhofer IIS
|%%%%%%%%%%%%%%%%%%%%%%%% |  96% 6.19sec at 47.5x


You could provide the External Encoder option for handhelds. Or even better, you could make a new plug-in for this encoder. The plug-in would do the same things as ACMENC and apply the registry fix. I don't think the ACMENC code is very complex.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: HELP: Fastest Possible LAME Encoder Switches
« Reply #2 on: January 25, 2006, 03:57:16 pm »

Actually, the ACMENC license allows free commercial use:

Quote
License
ACMENC uses libsndfile and id3lib licensed under GNU Library General Public License (LGPL). Follow the LGPL license when distributing these libraries.

ACMENC itself is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions (known as zlib license):

The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
This notice may not be removed or altered from any source distribution.

You would just need to inform MC users that XP and updated WMP are necessary. Most of the users already have them.

Your plug-in could even apply the registry change before encoding and return it back if needed. Though, I don't know why that would be needed.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: HELP: Fastest Possible LAME Encoder Switches
« Reply #3 on: January 25, 2006, 04:25:16 pm »

Quote
The fastest commandline I would use is -b 256 -q 5 --noreplaygain (or some other CBR bitrate, but not lower than 160 kbps with -q 5).

I forgot to mention that the LAME documentation is not up-to-date.

The default -q switch for plain -b xxx has changed from the previous -q 5. It is currently -q 3 because all -b xxx settings are now mapped with the --preset cbr xxx settings.

So the -q 5 switch makes it a bit faster and probably lower quality too.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: HELP: Fastest Possible LAME Encoder Switches
« Reply #4 on: January 25, 2006, 06:13:39 pm »

Also, these two other fast encoders might be interesting:

GOGO-no-coda

The old speed king is GOGO-no-coda, which is a based on LAME 3.88.
Some links: http://homepage2.nifty.com/kei-i/http://www.hydrogenaudio.org/forums/index.php?showtopic=4531http://rarewares.org/mp3.html

With proper settings it is as fast or faster than Fraunhofer and has better quality than LAME -q 9 (at least).

This would work with a copy of the standard MC11.1 MP3 plug-in. Only the command line strings need to be changed because the "presets" are not supported.

I don't think it has any other license restrictions besides what LAME has.


Helix MP3

Perhaps the fastest of all. Based on Xing, but developed further. Quality is fine and has good VBR modes too. Works with the external encoder plug-in. ... But, I am not sure if I can understand the license. The binaries and source code are said to be freeware, but it may need a deal with Real Networks in this case. Perhaps this is out of question then (?). However, here is an interesting link: http://www.hydrogenaudio.org/forums/index.php?showtopic=35531. Besides the Helix discussion that thread contains a speed comparison that has also LAME, Fraunhofer and GoGo included.
A DL link: http://www.softpedia.com/get/Multimedia/Audio/Audio-CD-Rippers-Encoders/Helix-MP3-Encoder.shtml
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755
Pages: [1]   Go Up