  
|
kLAME is a GUI
wrapper for the LAME audio
file compression utility. It was designed to allow a number of WAV
files to be given one or more sets of options, including LAME
options, the destination directory and a filename tag. and
to provide for bulk
conversion of WAV files to MP3 to take place in one operation with the
results
being stored in the selected directories. An example of use is to
create archival
compressed
files, as well as lower quality compressed files for transmission or
website
storage.
kLAME was originally developed using QT3 initially, then imported to
KDevelop
3.3.1 (which includes a fork of QT3). It has now been ported to QT4,
and uses threading for multiple conversions. This may give some
advantages with multicore machines.
kLAME is provided under the GPL
2 licence.
The port to QT4 showed up some interesting problems.
Download
and Installation
For Linux
you will
need QT4 (4.3.0), gcc (version 4.1.2) and Lame 3.97 installed.
Other versions
of gcc and Lame may work. There were some problems with earlier
versions of QT4. Download the source rpm below
and install
with:
# rpmbuild --rebuild klame-2.0.6-1.src.rpm
Then
locate the binary rpm that was created and install this normally. You can try the
binary rpms given below for Fedora 7 . Alternatively
the
source tarball can be extracted and
compiled with the following sequence of commands
(see the INSTALL file for more details):
$ tar -xjf klame-2.0.6.tar.bz2
$ cd klame-2.0.6/
$ qmake-qt4
$ make
The klame executable will be found in the klame-2.0.6/ directory. You will
need to install and setup LAME before attempting to compile (see the
INSTALL file). Make sure that the loader is able to find the LAME
library libmp3lame.so.0, otherwise you will get an error "klame: error while loading shared
libraries: libmp3lame.so.0: cannot open shared object file: No such
file or directory". Either add the path to the mentioned LAME
library into the ldd.conf file, or make a link to it in a standard
library directory, such as /lib or /usr/lib.
To compile on Windows
you will need to install QT4.3 and MinGW and set
your
system environment up according to the instructions provided with MinGW
and QT4.3 open source edition. This is not straightforward so read the
documentation carefully. Some additional information is provided in
INSTALL file found in the kLAME source tarball. If you wish to use an
IDE
there are some notes provided here
under DevC++, although I recommend
using Eclipse. You can either install the Eclipse IDE or
work from the command line. Unzip one of the source packages, change to
the source directory and after making sure that LAME is installed
correctly, run:
$
qmake
$ make
An
earlier statically built Windows package is provided
for the brave, foolhardy and lazy (those after my own heart), however it requires the MinGW runtime libraries to be installed.
Main
Window
The main window for
kLAME has a table of filenames and option columns, with a row for each
file and a column for each conversion option set that includes LAME
options, a destination
directory and a filename tag used to describe the converted files. The window
provides a toolbar with a set of buttons described below. Columns are
provided with checkboxes that can be used to select whether the
filename
will be converted according to the options set for the particular
column.
- New
Project. All settings are cleared to defaults.
- Open/Save
Project. The full set of columns, options and LAME options can be saved
for later restoration.
- Open
WAV Files.
This dialogue allows the user to select a list of filenames and have
them added to a table for later conversion. Additional selections will
result in the additional files being added.
- Remove
WAV Files. This removes the currently selected row.
- Add
Columns. When pressed an additional column is added with default
options.
- Delete
Column.
This removes the currently selected column (or the last one if no
selection is made).
- LAME
Options. When a column is added, LAME options must be set. These are
able to be set for any selected column, or if no column is selected,
for the last column. LAME options described separately below.
- Convert.
Begin the conversion operation. This performs all conversions
requested, and informs with a message box when complete.
LAME
Options
This
tabbed form provides for most of the more common options to be passed
to LAME.
Tab 1:
General Output options.
- Column
number. This refers to the column for which options are being
set. Defaults to a selected column if present, or else to the last
column.
- Output
directory. Allows selection of a different output directory for each
column.
- Filename
Tag. Allows for a tag to be added to the end of a filename (before the
first dot) to distinguish the different conversion products.
- Save
settings. This saves a simple one-line string identical to that passed
to LAME as options. These options can be used for creating new projects
with standard LAME option settings.
- Load
settings. When loaded, the options string is parsed and the settings
are made directly in the settings form.
Tab 2:
Basic LAME Settings
The LAME
settings are described on the LAME website, the MAN page for LAME and
the information given by the --longhelp and --preset help options to LAME.
These can change in meaning over time, so please check the website.
Note that the documentation is often outdated for some options. The
most accurate documentation appears to be in the --longhelp option.
- Preference.
This chooses between VBR (quality) and ABR/CBR (bitrate).
- Relative
Quality. This is a slider between 10 and 100, and provides the VBR
quality setting associated with -v. The option associated with -v is
determined by subtracting the slider value from 100 and dividing by 10.
- VBR
Algorithm. Chooses between --vbr-old and --vbr-new.
- Bitrate
and "use CBR". If CBR is checked, this sets --cbr and -b n. If not
checked this sets --abr n. The slider provides the value of n.
Tab 3:
Advanced LAME settings.
- Mode
(-m) Various mode settings (mono, stereo etc).
- Quality
(-q). Setting from a spin box 0-9 with default 5. This sets a quality
factor tradeoff with bitrate that is additional to that specified for
the VBR conversions.
- High
Pass Frequency (kHz).
- High
Pass Width (kHz).
- Low
Pass Frequency (kHz).
- Low
Pass Width (kHz).
- Tonality
Limit (kHz) (--cwlimit). Limit to which audible frequencies are
processed.
- Full
Bandwidth (-k). No filtering applied, not even defaults. Can result in
ringing.
- Presets
(--preset). These are a set of optimized default settings. It is not
clear if these can be used with other specific settings.
- Use
Minimum VBR Bitrate (-b). If checked, a VBR minimum bitrate of 115kHz
default is used, and minimum bitrate settings for ABR and CBR are
added. LAME can experience problems if the value is too low
compared to the average bitrate.
- Use
Maximum VBR Bitrate (-B). If checked, a maximum bitrate can be set on
the slider. This can also cause problems with LAME if its value is too
large.
- Resample
Frequency (--resample). If checked, the selected resample frequency
(allowed values
given in the spinbox) is used.
- Change
Quality Measure (-X). Measures 0 to 9 given in a spinbox.
- Additional
options. This allows any other options to be specified. These are
parsed and invalid options are discarded if the checkbox is selected
(default). Any options added that clash with those set on the form will
take precedence. Any LAME option can be specified (watch that LAME does
not change options over time). Options relating to stdout outputs are
ignored.
Project
Save file structure
This is a
binary file (QT format) with an ASCII header with the program name and
date, followed by:
- Number
of columns
- Directory
for the wav files
- Comment
strings
- Filename
tags
- Output
directories
- LAME
option strings
- Column
Header labels
Settings
Under
Linux, settings will be saved in the .config/Jiggerjuice directory in
your home folder. In Windows they are in the registry
HKCU/Software/Jiggerjuice.
ToDo
Plenty to
do to improve kLAME but it is substantially providing the functions
necessary for my work.
- Add some navigation buttons to Help.
- Add some more advanced options tabs for LAME.
- Allow other input formats, such as raw PCM.
- Do other conversions such as mp3 back to wav,
etc.
There was
some thought of using NotLAME, which was an earlier fork or rewrite of
LAME.
However the website seems to keep referring back to LAME. Perhaps the
two streams
merged at some time.
Recent
Changes (see README)
- Fixed a problem where columns could not be selected if no
rows were visible.
- Added Doxygen development documentation.
- Fixed the same display problem in QT4.3.
- Fixed a display problem in QT4.2 that was not present in
QT4.1.4.
- Some refactoring to eliminate global variables and
implement signals and slots for progress dialogue.
- Corrected a bug that incorrectly identified the directory
name when a file dialog was cancelled.
- Added a check and an offer to create a non-existing output
directory in the options dialogue.
- Fixed a problem accessing an array beyond its bounds that
caused a segfault.
- Fixed a problem where initial settings for main window size
and location put it off screen under Windows.
- Fixed a bug where kLAME would hang waiting for non-existent
threads to finish.
- Fixed a bug where some directory paths did not have a
trailing separator under Windows.
- Minor change to remove 512MB limitation on wav file size.
- Port from QT3 to QT4.
- Added threading and a global progress indication.
- Added menus, added row deletion, changed column deletion
functionality.
- Fixed a bug that did not synchronise sliders and spinboxes.
- Added a call to flush the LAME buffers at end of conversion.
- Added some traps in the event a file was not found during
conversion.
Packages
References
and acknowledgements:
"The LAME
Project", http://lame.sourceforge.net/
"TrollTech QT" http://www.trolltech.com/
"The Lame Project" http://lame.sourceforge.net/index.php
"Minimalist GNU for Windows MinGW" http://www.mingw.org/
Warning: this author uses
another
popular PC operating system sparingly
and usually on
an
emergency basis, and for playing games of course. All software is
developed on and for Linux, which
is
the
only OS worth spending time and effort on, apart from the Commodore 64
that is.
Contact:
My email address can be constructed
from the
username "ksarkies" and the
ISP DNS address internode.on.net
in the
usual
way.
|