winLAME Help

Welcome to the winLAME Help File.

winLAME is an encoder for several audio formats, including mp3 (MPEG Layer 3), Ogg Vorbis and more. winLAME lets you set up the encoding process with an easy-to-use wizard-style user interface.

winLAME supports many input audio formats, and uses the LAME mp3 encoding library for encoding and the MAD decoding library for decoding.

winLAME is distributed and licensed under the GNU General Public License (GPL).

Note that personal and/or commercial use of compiled versions of the LAME encoding enging (including the DLL distributed with winLAME) requires a patent license in some countries. Check before you use winLAME!

Help File Contents

The help file is divided into several sections:

Pages

Introduction for mp3 beginners

The mp3 format is explained, as well as some background informations are given.

Licenses

License texts for winLAME and the various libraries used in winLAME.

Credits

The people who helped or contributed to developing winLAME.

Categories

winLAME How-To's

In this chapter some detailed tutorials can be found.

winLAME Wizard Pages

In this chapter all winLAME wizard pages are explained in detail.

Technical Reference

In this chapter you can find technical reference documents.

winLAME HTML Help Documentation is
(c) 2001-2020 Michael Fink (unless stated otherwise).

Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License


winLAME Help - Introduction to mp3

Introduction to mp3

Foreword

This document is an introduction to the mp3 format and an explanation of the technology behind lossy compression in mp3 files.

Basic Concept

The target of audio compression is to reduce the space on digital media needed to store audio. On a CD, one second of audio needs (44100 Hz samples per second * 2 channels * 16 bits per sample) 176 kb space. When you want to send an uncompressed song over the internet (say, with a 56k modem), this would take fairly long (and for the impatient, almost forever).

There are some methods to compress audio data. Lossless compression methods compact the data in such a way that they can be restored back bit-identical to the original. That is what e.g. the zip format does (even when it wasn't designed for that). There are also lossy compression methods. These take advantage of signals in the audio that cannot be heard by humans, and thus safely be discarded. When these are reconstructed, the unhearable signals are left out of the signal, but because we don't hear them, they aren't noticable.

Unfortunately, lossy encoding methods can leave slight distortions in the audio signal which sometimes can be hearable, mostly by people with "golden ears". The loss of hearable signals can be kept in a limit, though.

Technical Infos

Technically, audio information in the mp3 file is stored in frames. mp3 frames are a set of bytes that describes audio information. Frames can have different bitrates, that means they have different lengths. Although, every mp3 frame decodes to 1152 audio samples (for MPEG-1 Layer III). With a sample rate of 44100 Hz, a frame holds 26.1 milliseconds audio data. When using variable bitrate, the encoder can decide how much bits to spend on more complex parts of the audio to compress.

The audio data to compress is transformed into frequency domain with a method called MDCT (modified discrete cosinus transformation). From there, the encoder judges (by using a specific psychoacoustic model) how the transformed spectral values are stored within a frame. The psychoacoustic model determines which values are needed for hearing, and which one can be dropped, because they would be inaudible for the human ear. By optimizing the psychoacoustic model used, quality can be increased, even when using the same technology.

There are different layers in the MPEG audio standard that describes slightly different frame formats and sample rates. Layer I is the simplest layer, whereas Layer III has the most complexity. Because of this, Layer III is mostly used and is called mp3 as an abbreviation.

History

The mp3 standard, also known as MPEG-1 Layer III, was first developed by the Fraunhofer Institute for Integrated Circuits (FhG IIS-A), in 1987. It was primarily developed for digital audio broadcasting (DAB). Two years later, FhG patented the technologies behind the format. Later it was submitted to the ISO (International Standards Organization) and added to the MPEG-1 video standard as audio compression scheme.

A nice explanation of the mp3 format can also be found here: Howstuffworks: how mp3 files work.

back to top - back to Main page


winLAME Help - Licenses

Licenses

This document lists all licenses of software used in winLAME. The following license texts are available:

  • GPL - GNU General Public License
  • Lesser GPL - GNU Lesser General Public License
  • Ogg Vorbis BSD-style license

back to Main page

GPL - GNU General Public License

The following text is the license under which winLAME and the MAD MPEG Decoding Library is distributed.

            GNU GENERAL PUBLIC LICENSE
               Version 2, June 1991
 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.
                Preamble
  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.
  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.
  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
  The precise terms and conditions for copying, distribution and
modification follow.
            GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.
    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.
    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,
    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,
    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.
  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
                NO WARRANTY
  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
             END OF TERMS AND CONDITIONS
        How to Apply These Terms to Your New Programs
  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
    Gnomovision version 69, Copyright (C) year  name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:
  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.
  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.
back to top

Lesser GPL - GNU Lesser General Public License

The following text is the license under which libsndfile and LAME is distributed.

                  GNU LESSER GENERAL PUBLIC LICENSE
                       Version 2.1, February 1999
 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL.  It also counts
 as the successor of the GNU Library Public License, version 2, hence
 the version number 2.1.]
                            Preamble
  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
  This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it.  You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
  When we speak of free software, we are referring to freedom of use,
not price.  Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
  To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights.  These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
  For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you.  You must make sure that they, too, receive or can get the source
code.  If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it.  And you must show them these terms so they know their rights.
  We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
  To protect each distributor, we want to make it very clear that
there is no warranty for the free library.  Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
  Finally, software patents pose a constant threat to the existence of
any free program.  We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder.  Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
  Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License.  This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License.  We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
  When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library.  The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom.  The Lesser General
Public License permits more lax criteria for linking other code with
the library.
  We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License.  It also provides other free software developers Less
of an advantage over competing non-free programs.  These disadvantages
are the reason we use the ordinary General Public License for many
libraries.  However, the Lesser license provides advantages in certain
special circumstances.
  For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard.  To achieve this, non-free programs must be
allowed to use the library.  A more frequent case is that a free
library does the same job as widely used non-free libraries.  In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
  In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software.  For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
  Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
  The precise terms and conditions for copying, distribution and
modification follow.  Pay close attention to the difference between a
"work based on the library" and a "work that uses the library".  The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
                  GNU LESSER GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
  A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
  The "Library", below, refers to any such software library or work
which has been distributed under these terms.  A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language.  (Hereinafter, translation is
included without limitation in the term "modification".)
  "Source code" for a work means the preferred form of the work for
making modifications to it.  For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
  Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it).  Whether that is true depends on what the Library does
and what the program that uses the Library does.

  1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
  You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
  2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
    a) The modified work must itself be a software library.
    b) You must cause the files modified to carry prominent notices
    stating that you changed the files and the date of any change.
    c) You must cause the whole of the work to be licensed at no
    charge to all third parties under the terms of this License.
    d) If a facility in the modified Library refers to a function or a
    table of data to be supplied by an application program that uses
    the facility, other than as an argument passed when the facility
    is invoked, then you must make a good faith effort to ensure that,
    in the event an application does not supply such function or
    table, the facility still operates, and performs whatever part of
    its purpose remains meaningful.
    (For example, a function in a library to compute square roots has
    a purpose that is entirely well-defined independent of the
    application.  Therefore, Subsection 2d requires that any
    application-supplied function or table used by this function must
    be optional: if the application does not supply it, the square
    root function must still compute square roots.)
These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
  3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library.  To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License.  (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.)  Do not make any other change in
these notices.
  Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
  This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
  4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
  If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
  5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library".  Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
  However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library".  The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
  When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library.  The
threshold for this to be true is not precisely defined by law.
  If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work.  (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
  Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
  6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
  You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License.  You must supply a copy of this License.  If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License.  Also, you must do one
of these things:
    a) Accompany the work with the complete corresponding
    machine-readable source code for the Library including whatever
    changes were used in the work (which must be distributed under
    Sections 1 and 2 above); and, if the work is an executable linked
    with the Library, with the complete machine-readable "work that
    uses the Library", as object code and/or source code, so that the
    user can modify the Library and then relink to produce a modified
    executable containing the modified Library.  (It is understood
    that the user who changes the contents of definitions files in the
    Library will not necessarily be able to recompile the application
    to use the modified definitions.)
    b) Use a suitable shared library mechanism for linking with the
    Library.  A suitable mechanism is one that (1) uses at run time a
    copy of the library already present on the user's computer system,
    rather than copying library functions into the executable, and (2)
    will operate properly with a modified version of the library, if
    the user installs one, as long as the modified version is
    interface-compatible with the version that the work was made with.
    c) Accompany the work with a written offer, valid for at
    least three years, to give the same user the materials
    specified in Subsection 6a, above, for a charge no more
    than the cost of performing this distribution.
    d) If distribution of the work is made by offering access to copy
    from a designated place, offer equivalent access to copy the above
    specified materials from the same place.
    e) Verify that the user has already received a copy of these
    materials or that you have already sent this user a copy.
  For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it.  However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
  It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system.  Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
  7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
    a) Accompany the combined library with a copy of the same work
    based on the Library, uncombined with any other library
    facilities.  This must be distributed under the terms of the
    Sections above.
    b) Give prominent notice with the combined library of the fact
    that part of it is a work based on the Library, and explaining
    where to find the accompanying uncombined form of the same work.
  8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License.  Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License.  However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
  9. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Library or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
  10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
  11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all.  For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
  12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded.  In such case, this License incorporates the limitation as if
written in the body of this License.
  13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number.  If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation.  If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
  14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission.  For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this.  Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
                            NO WARRANTY
  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
                     END OF TERMS AND CONDITIONS
           How to Apply These Terms to Your New Libraries
  If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change.  You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
  To apply these terms, attach the following notices to the library.  It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
    <one line to give the library's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary.  Here is a sample; alter the names:
  Yoyodyne, Inc., hereby disclaims all copyright interest in the
  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
  <signature of Ty Coon>, 1 April 1990
  Ty Coon, President of Vice
That's all there is to it!
back to top

Ogg Vorbis BSD-style license

The following text is the license under which Ogg Vorbis is distributed.

Distribution Terms in Plain English
Anyone may freely use and distribute the OggSquish and Vorbis specification,
whether in a private, public or corporate capacity. The specification is
fully open to the public to be used for any purpose. However, Xiphophorus and
the Ogg project (xiph.org) reserve the right to set the Ogg/Vorbis
specification and certify specification compliance.
Xiphophorus's Vorbis software libraries (libvorbis and vorbisfile) are
distributed under a BSD-like license; these libraries may be used by any
application, Open or proprietary, linked or incorporated in whole, so long as
acknowldgement is made to Xiphophorus when using our codec source in whole or
in derived works.  See the file 'COPYING' in the source for all the details.
All other portions of xiph.org's reference Vorbis software are distributed
under the (GNU) General Public License (GPL).
Because the specification is open, third parties are welcome (and encouraged)
to implement third party Vorbis software under other licenses using xiph.org's
reference source as an authoritative reference.

Copyright (c) 2001, Xiphophorus
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the Xiphophorus nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
back to top


winLAME Help - Credits

Credits

These people are more or less responsible that winLAME exists in its current form today:

Michael Fink (coding, translation, HTML Help)
all beta testers for valuable providing bug reports
the LAME developers for their help and great encoder
Rob Leslie for his great MPEG decoder library
Erik de Castro Lopo for his libsndfile library
John Edwards for various bugfixes on winLAME code
the Ogg Vorbis dev team, for a good and free audio compression standard
Björn Knorr for help on the HTML Help
Menno Bakker, for his help on the AAC module implementation
Andre Wiethoff, for hias great EAC, and his help on cue sheets
Conrad Sanderson, for hosting winLAME on his australian site
Lisa Biesinger for actually donating $10 to winLAME development
the people at Hydrogenaudio and r3mix forums
DeXT for providing several changes to winLAME, including channel mapping
Kjetil Haga from norway for the Monkey's Audio module
Richard Farrar for providing a Podcast preset setting for LAME
Coverity for their static source code analysis service
ASAMnet for their services, especially for cvs checkins
The Microsoft ATL & WTL team
The STLPort developers
The Boost library developers
The people at Nullsoft, for their great install script compiler
The Wix team for their even better way to create setups
The UPX team, for a great executable packer
RedSpark GmbH, for the good time I had while working there
all that I have forgotten, but should be listed here

back to top - back to Main page


winLAME Help - How-To's

winLAME How-To's

In this section you can learn to use winLAME in small and easy steps. The following list of How-To Articles are available:

  • How to rip and encode a CD with winLAME
  • How to make presets for winLAME

back to Main page


winLAME Help - How-To's

How to rip and encode a CD with winLAME

This document explains how to rip an audio CD and encode it to the mp3 or Ogg Vorbis format, using winLAME.

Prerequisites

You need several things to successfully rip audio data from an audio CD and encode it to a lossy audio format, like mp3 or Ogg Vorbis. To extract the audio data, you need an audio grabber or ripper program. Good ones are ExactAudioCopy or CDex. You also need enough hard drive space to store the grabbed audio data. A full CD can use up to 700 MB space. For encoding you need winLAME. And of course you need an audio CD.

Ripping audio data

Ripping the audio data from CD should be fairly easy. Just refer to the online help or manuals of the respective programs. The audio data has to be stored as uncompressed wave files (extension .WAV) to be processed by winLAME.

There are some settings for ExactAudioCopy to preserve the FreeDB information that EAC can query. Press F11 for the "Compression Options" and choose "Microsoft PCM" as the "Wave format" to use. Be sure to check the "Add ID3 tag" option. On the "ID3 Tag" tab you can adjust ID3 tag options to be used (note that winLAME can only process ID3v1 tags). When grabbing the audio tracks, be sure to rip "compressed" files (then ID3 tags are appended to the produced wave files). You can produce a .m3u playlist for further use in winLAME.

Encoding using winLAME

Once you have the grabbed wave files, just open winLAME and insert the files, either by dropping them from the Windows Explorer or by adding the files with the Open dialog. On the Output Page you can set some output options, such as the generation of an output playlist. You also have to choose which encoder module you want to use. "LAME mp3 Encoder" uses the LAME encoder, whereas Ogg Vorbis encodes in the Ogg Vorbis format. The next pages depend on the encoder you chose. For LAME, it is best to use the "alt-preset standard" preset, which is automatically selected. When using Ogg Vorbis, use the Quality Management settings.

Finally you get to the Encode Page, where you can start and control the encoding progress. You can send winLAME to the system tray to make room on your desktop while encoding, or adjust the encoder thread priority when your system is slowed down by the encode process. If all went well, you'll find the encoded files in your output folder.

back to top - back to the How To page


winLAME Help - How-To's

How to make presets for winLAME

In this document will be explained how to make new presets for winLAME. This page is for LAME experts only. If you don't know about the internals of LAME, please use the standard presets that winLAME already has. They are already very good.

General file format

Presets are stored in winLAME in an XML file. The presets.xml file is installed and searched in one of the following locations, in this order:

  • {Application-Folder} - used for portable and zip versions of winLAME
  • {Documents and Settings-Folder}\{username}\Application Data\winLAME
  • {Documents and Settings-Folder}\All Users\Application Data\winLAME

The general format for the presets file looks like this:

<presets>
  <facility name="facility name">
    <preset name="preset name">
      <comment>
        preset comment visible in preset description
      </comment>
      <value name="value name">value</value>
      <value name="value name">value</value>
      [... more values ...]
    </preset>
    [... more presets ...]
  </facility>
 [... more facilities ...]
</presets>

If the file is not valid or wellformed, or doesn't meet the structure shown above, the presets page won't appear in winLAME. You can check if it is wellformed by opening the file with Internet Explorer. If there is no list of presets for a specific facility (=output module), the presets page doesn't show up either, since there's no need to show the page.

This is a list of available facilities:

Facility Name | Output Module
lame | LAME mp3 Encoder
opus | Opus Encoder
oggvorbis | Ogg Vorbis Encoder
sndFile | Libsndfile Audio File Encoder
wma | WMA Audio File Encoder
aac | libfaac AAC Audio File Encoder

LAME mp3 Encoder

Here is a list of possible values, descriptions and their default values for the LAME encoder:

Value Name | Description | Default Value
lameNoGap | When 1, LAME encodes multiple files as they were one, resulting in mp3 files that can be played back without gap | 0
lameWriteWaveHeader | When 1, a RIFF Wave header is prepended to the encoded file; the extension changes to ".wav" | 0
lameEncodeQuality | Encode quality; 0: fast, 1: standard, 2: high | 1
lameMono | When 1, input is encoded as mono | 0
lameQualityOrBitrate | Decides between quality or bitrate settings; 0: bitrate mode, 1: quality mode | 0
lameBitrate | Bitrate for ABR or CBR Mode; in kbps; only used when lameQualityOrBitrate is set to 0 | 192
lameQuality | Quality value, from 0 to 9; only used when lameQualityOrBitrate is set to 1 | 4
lameCBR | When 1, CBR mode is used instead of ABR | 0
lameVBRMode | LAME VBR mode, 0: standard, 1: fast | 0

Note that winLAME sometimes has other default values than the LAME command line tool.

Opus Encoder

Here is a list of possible values, descriptions and their default values for the Opus encoder:

Value Name | Description | Default Value
opusTargetBitrate | Target bitrate in kbps per channel | 256
opusComplexity | Determines the maximum algorithmic complexity; values between 10 (highest CPU usage and quality) and 0 (lowest CPU usage and quality) | 10
opusBitrateMode | Bitrate mode; 0: VBR (recommended), 1: Constrained VBR, 2: Hard VBR | 0

Ogg Vorbis Encoder

Here is a list of possible values, descriptions and their default values for the Ogg Vorbis encoder:

Value Name | Description | Default Value
vorbisBitrateMode | Decides between quality management and bitrate settings; 0: quality management, 1: variable bitrate settings, 2: average bitrate settings, 3: constant bitrate settings | 0
vorbisBaseQuality | Quality settings, in 0.01 steps; values between 0 (0.0) and 1000 (10.0) are allowed | 400
vorbisVarMinBitrate | Minimum bitrate, used for "variable bitrate" mode | 64
vorbisVarMaxBitrate | Maximum bitrate, used for "variable bitrate" mode | 256
vorbisVarNominal | Nominal bitrate, used for "average bitrate" and "constant bitrate" modes | 128

Libsndfile Audio File Encoder

Here is a list of possible values, descriptions and their default values for the Libsndfile audio file encoder:

Value Name | Description | Default Value
sndFileFormat | Format code | 0
sndFileSubType | File sub type | 0

The exact values to use can be obtained from the Libsndfile API page. The values beginning with SF_FORMAT_ are the constants to use. The values listed under "Major formats" are the "sndFileFormat" values, and the "Subtypes" are the "sndFileSubType" values. All values must be specified as decimal, and so must be converted from hexadecimal, to be usable in the presets.xml file. Also note that not all combinations of format and subtype codes are possible. Use the LibSndfile Settings Page wizard page to check valid combinations.

WMA Audio File Encoder

Here is a list of possible values, descriptions and their default values for the WMA audio file encoder:

Value Name | Description | Default Value
wmaBitrate | Constant bitrate in kbps | 64
wmaQuality | Quality value in percent; allowed values are from 10 to 100 | 50
wmaBitrateMode | Decides between quality and bitrate mode; 0: quality mode (VBR), 1: constant bitrate mode (CBR) | 0

libfaac AAC Audio File Encoder

Here is a list of possible values, descriptions and their default values for the libfaac AAC adio file encoder:

Value Name | Description | Default Value
aacBitrate | Average bitrate in kbps per channel; used in bitrate mode | 128
aacBandwidth | Cutoff frequency for input, in Hz; only active when aacAutoBandwidth is 0 | 16000
aacMpegVer | MPEG version: 2: MPEG2, 4: MPEG4; note that this value doesn't create .mp4 files! | 2
aacObjectType | AAC object type; 0: Main, 1: Low complexity, 2: LTP | 1
aacAllowMS | When 1, allows the AAC encoder to use Mid/Side encoding; 0 disables it | 1
aacUseTNS | When 1, uses Temporal Noise Shaping; 0 disables it | 1
aacUseLFE | When 1, uses one channel as LFE channel; 0 disables it - currently not supported by libfaac | 1
aacBRCmethod | Bitrate control method; 0: quality mode, 1: bitrate mode | 0
aacQuality | Default VBR quality in percent; values between 10 and 500 are allowed; used in quality mode | 100
aacAutoBandwidth | When 1, automatically manages cutoff frequency; when 0, uses the frequency in aacBandwidth | 1

back to top - back to the How To page


winLAME Help - Pages

winLAME Wizard Pages

winLAME supports working in two different User Interface modes. You can always change between the modes, either by the icon on the ribbon in Modern UI mode, or in the system menu of the wizard pages in Classic UI mode.

Modern UI

In this mode the main window of the application shows all currently running encoding tasks, and new encoding tasks can be added instantly. Encoding tasks are set up using wizard pages, as in the Classic UI mode.

Classic UI

In this mode the wizard that you know from previous versions of winLAME is used. The wizard pages let you configure all details of encoding, and on the final encode page the current encoding task is completed.

The following configuration wizard pages can appear in winLAME. Some of the pages are only available in Classic UI or in Modern UI mode.

  • Classic Start Page (Classic UI only)
  • Input Files
  • Input CD
  • Output Settings
  • Preset Selection
  • LAME Settings
  • Opus Settings
  • Ogg Vorbis Settings
  • LibSndfile Settings
  • Windows Media Audio Settings
  • AAC Settings
  • Finish
  • Encode (Classic UI only)

The following settings pages can be shown in winLAME.

  • General Settings
  • CD Read Settings

Note

In winLAME, press F1 to get directly to the help page of the current wizard page. There are tool tips for every control on each page that show up when you hover over a control longer than one second.

back to Main page


winLAME Help - Modern UI

winLAME Modern User Interface

The Modern User Interface uses a main window that shows the currently running tasks. It lets you start new Encoding and CD Audio Extraction tasks while previous tasks still run. This way the full power of today's modern multi core CPUs can be used.

Menu band / ribbon

The main window uses a menu band (also called ribbon) known from modern Office and other applications to show possible actions.

Tasks List

The tasks list shows all currently running, queued or finished tasks. The icon of the task indicates the task type. Clicking on a single task shows details about this task in the task details window.

Commands

The following commands are available in the menu band.

Open Files

Starts the wizard pages used to encode files. The first wizard page is the Input Files page.

Read CD

Starts the wizard pages used to read out CD Audio tracks. The first wizard page is the Input CD page.

Stop all

Stops all running tasks. All temporary output files are removed again. The tasks are not cleared from the tasks list.

Remove completed

Removes completed tasks from the tasks list, in order to clean up the tasks that are no longer relevant.

Settings

Shows the general settings page to change settings.

CD Read Settings

Shows the settings page for CD Read functions.

Encoding finish action

This drop-down button lets you choose which action is carried out when all encoding and CD Audio extraction tasks are finished. The following options are available:
Action | Description
Do nothing | Does nothing when finished
Close winLAME | Closes winLAME when finished
Standby PC | Suspends the system to RAM and powers down

Switch to Classic mode

Switches back to Classic UI mode. Note that you can always switch back to Modern UI mode using the system menu in Classic UI mode.

Button

The button starts the help, which you are currently viewing.

back to Wizard Pages


winLAME Help - Classic UI

winLAME Classic User Interface

The Classic UI mode uses a wizard-dialog style appearance (looks like an Install Shield Wizard), to configure all details of encoding or decoding. The wizard makes it easy to click through the options and to encode the files when finished.

System Menu

Apart from the usual system menu items to resize and close the dialog window, there are some winLAME specific menu items.

Switch to Modern mode

Switches to Modern UI mode. The current settings and input files are lost.

Options

Shows the options dialog where you can set various options.

About winLAME

Shows the About dialog, showing all input and output modules and library versions used in winLAME.

back to Wizard Pages


winLAME Help - Classic Start Page

winLAME Classic Start Page

Classic UI only

This is the start page showing when winLAME is switched to the Classic UI mode or when restarting winLAME after a switch.

Buttons

Encode files

Select this when you want to encode files on your hard disc. Continues to the Input Files page.

Read CD

Select this when you want to read in an audio CD using a CD drive. Continues to the Input CD page.

back to Wizard Pages


winLAME Help - Pages: Input Files

Input Files Page

This is the input files page where all files are listed that are later processed by winLAME.

Buttons

Add files

Opens a file request dialog that lets you add more audio files to the list of files to encode. You can also press the Insert key to add more files.

Delete all selected files

Deletes all selected files from the list of files to encode. You can also delete files by selecting them and pressing the Del key.

Play selected file

Plays the first selected file in the application that is associated with playing the file.

Files can be drag-n-dropped from the Windows Explorer to the list of files. When a folder is dropped on the list, the content of the folder and all files in its subfolders are added recursively. To reorder files, drag files to their new position.

Winamp Playlists (*.m3u, *.pls), as well as Cue Sheets (*.cue) can also be dropped into the list of files.

Possible next pages: Output Settings.

back to top - back to Wizard Pages


winLAME Help - Pages: Input CD

Input CD Page

This is the input CD page where CD tracks can be selected to be extracted from an audio CD. Select the tracks to be used for encoding using the check boxes before each track. The shown CD disc and track infos are stored in the metadata (tags) when the track is encoded.

User Interface

CD disc drive

When there are multiple CD disc drives available, you can select the CD drive to use. The combobox is hidden when there is only one drive.

Track List

Shows the CD tracks on the current disc. When changing the CD in the drive, the tracks list is updated automatically. You can edit the track title by double clicking on a track entry, e.g. to fix spelling errors or to rename a track.

CD Title

The CD disc title.

CD Artist

The artist of all tracks. When there are several artist (checkbox Various Artists checked), the field can't be edited.

Various Artists

Indicates that there is no single artist for all tracks, but each track may have a different artist.

Year

Contains the year the CD was produced or recorded.

Genre

Contains the genre of the CD tracks. This is a combobox where preset genres can be selected. Own genre types can be typed in, too, but this is not supported in all output formats.

Buttons

Play

Plays the currently selected track. Note that this only works for CD players that are built into the PC and wired to the sound card. It doesn't work with external CD players.

Stop

Stops the currently playing track.

freedb.org

Queries the freedb.org CD database for disc and track infos and updates the current track list. When the CD isn't found in the database, a message box is shown.

Album Art

Queries the CoverArtArchive.org CD database for cover art shows the cover art below the "Options" button. When the CD isn't found in the database, a message box is shown.

Options

Shows the CD Read Settings page.

Possible next pages: Output Settings.


winLAME Help - Pages: Output Settings

Output Settings Page

This is the output settings page that configures general output settings.

Output Module

Lets you select the output module that winLAME should use to encode all of your files.

Warn about lossy transcoding

When this checkbox is active, a warning is shown when transcoding from one lossy format to another. This is done to accidentally prevent you to encode and lose quality. In some cases, transcoding is wanted, though.

Output Location

Lets you specify the output folder. The button at the left lets you select the folder. The folder history is available by clicking the down arrow.

Use input file's folder as output location

Uses the same output location as the input file has, for each input file. This allows multi-folder encodes. Note that this option is disabled when reading audio tracks from CD.

Delete after encoding

Indicates if the input file should be deleted after successful encoding of that file. Only use this if you don't need the input file anymore or when you have another copy of the input files. Note that this option is disabled when reading audio tracks from CD.

Overwrite existing files

Indicates if already existing files will be overwritten.

Warning

Be careful with this option when encoding to the sample folder as the input folder, or when delete files after encoding!

Create output playlist

When checked, an .m3u playlist with the name in the edit field is created while encoding files. Automatically enabled when a playlist was added or dropped into the input files list, or when a CD is read in.

Possible next pages:

  • Preset Selection
  • LAME Settings
  • Opus Settings
  • Ogg Vorbis Settings
  • LibSndfile Settings
  • Windows Media Audio Settings
  • AAC Settings


winLAME Help - Pages: Preset Selection

Preset Selection Page

This is the preset selection pages. It only appears when the presets settings file (presets.xml) is installed. Also, presets for the specific output module must be available in the presets settings file to show this page.

The first entry "Custom settings" always brings you to the Output Module's configuration page. This is only recommended for experienced users, though. You can double-click on any entry to see what encoding parameters are used for this preset.

Preset List

Lists all available presets for the currently selected output module (from the output page). The description box shows the description for the currently selected preset. Double-clicking on one preset shows the settings parameter that are used for that preset.

Preset Description Box

Presents a description of the currently selected preset.

Possible next pages:

  • LAME Settings
  • Opus Settings
  • Ogg Vorbis Settings
  • LibSndfile Settings
  • Windows Media Audio Settings
  • AAC Settings
  • Finish


winLAME Help - Pages: LAME Settings

LAME Settings

This is the settings page for the LAME encoder. All mp3 encoding settings are listed here.

Encoding Quality

Can be one of "fast", "standard" and "high". Default is "standard". This option is the same as the LAME command line options "-q 7" or "-f" (fast), and "-q 2" or "-h" (high). The "standard" encoding quality is automatically chosen by LAME when omitting -f, -h or -q.

Bitrate

Chooses bitrate mode instead of quality mode. In bitrate mode you can provide a bitrate that should be used, either in ABR (average bitrate) or in CBR (constant bitrate) mode. If you want CBR mode, check the "Constant Bitrate" mode. Note that VBR mode is recommended. In LAME the CBR mode is the command line option "-b {bitrate}", ABR mode is "--abr {bitrate}".

Constant Bitrate

Forces LAME to use CBR (constant bitrate) mode. This restricts the encoder to always use the same number of bits for each frame and degrades the quality, since the encoder cannot efficiently allocate number of bits per frame.

Quality

Chooses quality mode instead of bitrate mode. In quality mode you can provide a VBR quality level that is used for encoding (quality mode actually means VBR mode). Quality levels range from 0 (high quality, large file) to 9 (bad quality, small file). In LAME the VBR quality value can be set with "-V x" (where x is the quality value).

Variable Bitrate Mode

In quality mode you can also set a VBR mode that is used for encoding. The available modes are "standard" (recommended) and "fast". In LAME the "standard" mode is enabled with "-v" or "--vbr-old" (default when not specified), and the "fast" mode is enabled with "--vbr-new".

Mono Encoding

When specified, LAME creates a mono mp3 file. If a stereo input file is used, both channels are combined into one channel. This option is the same as the LAME command line option "-a" (LAME then automatically chooses to do "-m m" then, too).

Nogap encoding

When checked, enables nogap encoding. This is used e.g. for album tracks that are mixed together (continuous-mix-CDs). LAME encoder outputs the proper last and first frames of every output mp3 file so that it can be played back together by most common mp3 players.

Prepend RIFF WAVE Header

Prepends a RIFF WAVE header before the actual mp3 data stream and changes the output extension to .wav. This way the output file can be used in various tools that expect WAVE files. This is often used in video track encoding.

Possible next pages: Finish Page.


winLAME Help - Pages: Opus Settings

Opus Settings Page

This is the settings page for generating Opus audio files.

Bitrate

The bitrate setting determines the quality by using more bits per encoding frame, yielding in higher quality. Lower bitrates may disable some Opus algorithm details. Generally, Opus at 128 kbit/s is pretty much transparent. Command line option --bitrate

Complexity

This configures the the maximum algorithmic complexity. The default value of 10 means, that the encoder doesn't hesitate to use the CPU to give you the best quality encoding at the given bitrate. The allowed values are between 10 (highest CPU usage and quality) and 0 (lowest CPU usage and quality). You should always use the highest value of 10. Command line option --comp

Bitrate control mode

Controls how bitrate is maintained throughout the file.

VBR (recommended)

Uses variable bitrate encoding (default); command line option --vbr

Constrained VBR

Uses constrained variable bitrate encoding; command line option --cvbr

Hard CBR

Uses hard constant bitrate encoding; command line option --hard-cbr

Possible next pages: Finish Page.


winLAME Help - Pages: Ogg Vorbis Settings

Ogg Vorbis Settings Page

This is the settings page for generating Ogg Vorbis audio files.

Quality Management

Quality Settings

Lets you choose a quality factor from 0.0 (bad quality) to 10.0 (excellent quality) for the encoding process. A value of 4.0 yields good results. The estimated approximate bitrate is shown to the right.

Bitrate Settings

Warning

These modes are generally not recommended to use for normal encoding! Please use the quality management mode.

Variable Bitrate

Lets you specify a minimum and maximum bitrate the encoder takes as base for encoding.

Average Bitrate

Lets you specify a nominal bitrate. Target bitrate will always be approximately at the nominal bitrate.

Constant Bitrate

Lets you specify a constant bitrate that will be ensured in the whole stream.

Possible next pages: Finish Page.


winLAME Help - Pages: LibSndfile Settings

LibSndfile Settings Page

This is the LibSndfile settings page. LibSndfile is an external library that supports reading and writing many audio formats.

File Format

Lets you select the output file format that LibSndfile should use. There are many supported formats, and the list is updated dynamically as LibSndfile is upgraded between versions.

Sample Format

For every File Format there's a set of sample formats that the LibSndfile library can output. This lets you select the specific sample format that should be used. The list is updated dynamically when you select another file format. When a specific sample format is only supported for stereo or mono encoding, the format is marked "(Stereo)" or "(Mono)". The encoder fails on files with the wrong channel number then.

Possible next pages: Finish Page.


winLAME Help - Pages: Windows Media Audio Settings

Windows Media Audio Settings Page

This is the output settings page that configures Windows Media Audio encoding.

Constant bitrate

Specifies a constant bitrate in kbit/s that should be used for encoding.

Quality (VBR)

Specifies a quality value in percent. Allowed values range from 10% to 100%.

Possible next pages: Finish Page.


winLAME Help - Pages: AAC Settings

AAC Settings Page

This is the settings page for the AAC output module. AAC encoding and decoding is only available if the files "libfaac_dll.dll" (for encoding) and "libfaad2.dll" (for decoding) are present in the winLAME folder. These files are only available as source code, which must be compiled before using. For more infos, look at: http://faac.sourceforge.net/.

Output Format

Quality

Sets default variable bitrate (VBR) quantizer quality in percent (default: 100, averages at approx. 120 kbps VBR for a normal stereo input file with 16 bit and 44.1 kHz sample rate. Max. value 500, min. 10.

Average Bitrate

Specifies the bitrate per channel the AAC encoder uses, in kbps. Although there are some fixed settings you can cycle through with the up-down-buttons, any bitrate can be typed into the field.

Allow Mid/Side

Allows the AAC encoder to use Mid/Side encoding. Stereo signals are separated in a mid (left minus right) channel, and a side (left plus right) channel. Should only be used when there is low stereo separation.

Use TNS

Tells the AAC encoder to use Temporal Noise Shaping.

Use LFE channel

Tells the AAC encoder to use one channel as LFE channel. libfaac doesn't currently support this.

Cutoff

Specifies the cutoff frequency the encoder uses of the audio input file, in Hz. Higher frequencies will be cut off.

MPEG Version

Lets you choose the MPEG version the output AAC file will be. Either MPEG2 or MPEG4. Note that this option doesn't create .mp4 files!

AAC Object Type

Lets you choose the object type that will be used for the output file.

Warning

libfaac currently doesn't support MPEG2 and the LTP object type at the same time.

Possible next pages: Finish Page.


winLAME Help - Pages: Finish

Finish Page

The finish page is shown to check the files/audio tracks and settings and warns you about dangerous settings combinations. Closing the finish page creates the encoding and/or CD Audio extraction tasks and shows them in the main window of the Modern UI.

Settings warnings

The following warnings may appear, depending on the input files and settings chosen:
  • Warning! You are about to transcode audio file(s) from a lossy format to another. This may severely degrade sound quality!
  • Warning! You are about to overwrite the original input files with the encoded output files!
Please review carefully if you want to proceed. You may lose your original files that way.

Input tracks

Shows all input files or CD tracks that are to be encoded.

Output module

Shows the output module that was selected to be used.

Possible next pages: Encode Page (Classic UI).


winLAME Help - Pages: Encode

Encode Page

Classic UI only

This is the encode page where the encoding is done.

Encode Control

Start encoding

Starts encoding; when encoding was stopped before, winLAME starts with the first file not fully processed.

Pause encoding

Pauses encoding; no processor time will be used during pausing.

Stop encoding

Stops encoding; when pressing the start button again, the currently stopped file will be encoded again.

Send to notification area

Sends winLAME to the system notification area. The encoding status is visible with the color of the icon in the notification area; a red icon means that winLAME is currently encoding, a green icon means that winLAME is not encoding or has finished all its encoding jobs.

Note

When all files are encoded, you can use the back button to set up another encoding process.

Progress Information

Shows info about the number of files already encoded, the currently processed file and a progress meter. the remaining time is estimated from the time already used to encode the file.

Encoder Setup Information

Shows info about the current parameters used for the reading and encoding process.


winLAME Help - General Settings

General Settings

This is the general settings page. The page can be shown when clicking on the "Settings" button in the Modern UI or when clicking on the "Options" menu entry in the system menu in Classic UI.

User Interface

Language

You can adjust the currently used language here. Currently supported are english and german. The new language is used after re-starting the application.

Number of CPU cores

This setting determines the number of CPU cores (or more exactly, execution threads) are used for encoding. The value can be chosen between 1 and 64, and the setting will be active after re-starting the application.

Automatically choose optimal number of CPU cores

This setting automatically chooses the number of CPU cores that are best for the current CPU. The number of cores actually used is shwon in brackets after the text. This check is set by default.


winLAME Help - CD Read Settings

CD Read Settings

This is the CD read settings page. The page can be shown when clicking on the "CD Read Settings" button in the Modern UI or when clicking on the "Options" button on the Input CD page.

User Interface

freedb Server

gnudb.org is a service to retrieve CD information such as artist, track titles and so on. This setting configures the gnudb server to use. Note that there is only one default entry "gnudb.gnudb.org (Random gnudb server)". The best server is automatically chosen by gnudb. You can type a specific server name here, if you want. Server name should be without http:// prefix and without following slash.

Temporary CD Extraction Folder

When reading CDs to encode, a temporary folder is used to store the raw audio data. The folder is usually the %TEMP% folder of the system. Note that only one track is stored here at most. A whole CD contains about 700 MB of track data.

Store edited disc and track info in cdplayer.ini

In ancient Windows times there were CD player applications that store CD track info in an ini file stored in C:\Windows. When this check is set, winLAME stores the disc and track infos about a CD in this ini file, so that the other applications can re-use the infos.

Format various artists track

This text value determines how track filenames (and displayed track titles) are formatted. This gives you the possibility to adjust the generated filenames to your needs. The text can contain any characters, and the following words, placed between two % characters, are replaced with the track information accordingly. When the text contains backslashes, winLAME creates subfolders. This can be used e.g. to create subfolders based on artist and album title.
Keyword | Description
album | Inserts the album or disc name
artist | Inserts the artist of the track; may differ to albumartist
genre | Inserts the genre as text
title | Inserts the track title
track | Inserts the track number as digits
year | Inserts the year where the album was released
albumartist | Inserts the album artist
length | Inserts the length of the track, in number of seconds
This setting is used when reading a CD with various artists (when the check box "Various Artists" is selected on the Input from CD page). The default text for this setting is: %track% - %album% - %artist% - %title%

Format album track

This setting is used when reading a CD with an album artist (check box "Various Artists" off). The default text for this setting is: %track% - %albumartist% - %album% - %title%


winLAME Help - Technical Reference

Technical Reference

This section contains technical reference documents and other technical information. The following documents are in this section:

  • MPEG Audio Compression

back to Main page


winLAME help - Technical Reference: MPEG Audio Compression

MPEG Audio Compression

The following document explains the MPEG Audio Compression format.

  • MPEG Audio Compression Basics
  • MPEG Audio Frame Header
  • How to calculate frame size
  • MPEG Audio Tag MP3v1
  • Credits

MPEG Audio Compression Basics

This is one of many methods to compress audio in digital form trying to consume as little space as possible but keep audio quality as good as possible. MPEG compression showed up as one of the best achievements in this area.

This is a lossy compression, which means, you will certainly loose some audio information when you use this compression methods. But, this lost can hardly be noticed because the compression method tries to control it. By using several quite complicate and demanding mathematical algorithms it will only loose those parts of sound that are hard to be heard even in the original form. This leaves more space for information that is important. This way you can compress audio up to 12 times (you may choose compression ratio) which is really significant. Due to its quality MPEG audio became very popular.

MPEG standards MPEG-1, MPEG-2 and MPEG-4 are known but this document covers first two of them. There is an unofficial MPEG-2.5 which is rarely used. It is also covered.

MPEG-1 Audio (described in ISO/IEC 11172-3) describes three Layers of audio coding with the following properties:

  • one or two audio channels
  • sample rate 32kHz, 44.1kHz or 48kHz
  • bit rates from 32kbps up to 448kbps

MPEG-2 Audio (described in ISO/IEC 13818-3) has two extensions to MPEG-1, usually referred as MPEG-2/LSF and MPEG-2/Multichannel.

MPEG-2/LSF has the following properties:

  • one or two audio channels
  • sample rates half those of MPEG-1
  • bit rates from 8 kbps up to 256kbps

MPEG-2/Multichannel has the following properties:

  • up to 5 full range audio channels and an LFE-channel (Low Frequency Enhancement <> subwoofer!)
  • sample rates the same as those of MPEG-1
  • highest possible bitrate goes up to about 1 Mbps for 5.1

back to top

MPEG Audio Frame Header

An MPEG audio file is built up from smaller parts called frames. Generally, frames are independent items. Each frame has its own header and audio informations. There is no file header. Therefore, you can cut any part of MPEG file and play it correctly (this should be done on frame boundaries but most applications will handle incorrect headers). For Layer III, this is not 100% correct. Due to internal data organization in MPEG version 1 Layer III files, frames are often dependent of each other and they cannot be cut off just like that.

When you want to read info about an MPEG file, it is usually enough to find the first frame, read its header and assume that the other frames are the same. This may not be always the case. Variable bitrate MPEG files may use so called bitrate switching, which means that bitrate changes according to the content of each frame. This way lower bitrates may be used in frames where it will not reduce sound quality. This allows making better compression while keeping high quality of sound.

The frame header is constituted by the very first four bytes (32 bits) in a frame. The first eleven bits (or first twelve bits, see below about frame sync) of a frame header are always set and they are called "frame sync". Therefore, you can search through the file for the first occurence of frame sync (meaning that you have to find a byte with a value of 255, and followed by a byte with its three (or four) most significant bits set). Then you read the whole header and check if the values are correct. You will see in the following table the exact meaning of each bit in the header, and which values may be checked for validity. Each value that is specified as reserved, invalid, bad, or not allowed should indicate an invalid header. Remember, this is not enough, frame sync can be easily (and very frequently) found in any binary file. Also it is likely that MPEG file contains garbage on it's beginning which also may contain false sync. Thus, you have to check two or more frames in a row to assure you are really dealing with MPEG audio file.

Frames may have a CRC check. The CRC is 16 bits long and, if it exists, it follows the frame header. After the CRC comes the audio data. You may calculate the length of the frame and use it if you need to read other headers too or just want to calculate the CRC of the frame, to compare it with the one you read from the file. This is actually a very good method to check the MPEG header validity.

Here is "graphical" presentation of the header content. Characters from A to M are used to indicate different fields. In the table, you can see details about the content of each field.

AAAAAAAA AAABBCCD EEEEFFGH IIJJKLMM

Sign Length
(bits) 		Position
(bits) 		Description
A | 11 | (31-21) | Frame sync (all bits set)
B 2 (20,19)

MPEG Audio version
00 - MPEG Version 2.5
01 - reserved
10 - MPEG Version 2 (ISO/IEC 13818-3)
11 - MPEG Version 1 (ISO/IEC 11172-3)

Note: MPEG Version 2.5 is not official standard. Bit No 20 in frame header is used to indicate version 2.5. Applications that do not support this MPEG version expect this bit always to be set, meaning that frame sync (A) is twelve bits long, not eleven as stated here. Accordingly, B is one bit long (represents only bit No 19). I recommend using methodology presented here, since this allows you to distinguish all three versions and keep full compatibility.
C 2 (18,17) Layer description
00 - reserved
01 - Layer III
10 - Layer II
11 - Layer I
D 1 (16) Protection bit
0 - Protected by CRC (16bit CRC follows header)
1 - Not protected
E 4 (15-12) Bitrate index
bits | MPEG-1 |  |  | MPEG-2 and 2.5
 | Layer I | Layer II | Layer III | Layer I | Layer II and III
0000 | Free Format Bitrate
0001 | 32 | 32 | 32 | 32 | 8
0010 | 64 | 48 | 40 | 48 | 16
0011 | 96 | 56 | 48 | 56 | 24
0100 | 128 | 64 | 56 | 64 | 32
0101 | 160 | 80 | 64 | 80 | 40
0110 | 192 | 96 | 80 | 96 | 48
0111 | 224 | 112 | 96 | 112 | 56
1000 | 256 | 128 | 112 | 128 | 64
1001 | 288 | 160 | 128 | 144 | 80
1010 | 320 | 192 | 160 | 160 | 96
1011 | 352 | 224 | 192 | 176 | 112
1100 | 384 | 256 | 224 | 192 | 128
1101 | 416 | 320 | 256 | 224 | 144
1110 | 448 | 384 | 320 | 256 | 160
1111 | not an allowed value

NOTES: All values are in kbps
Free Format Bitrate: if the correct fixed bitrate (such files cannot use variable bitrate) is different than those presented in upper table it must be determined by the application. This may be implemented only for internal purposes since third party applications have no means to find out correct bitrate. Howewer, this is not impossible to do but demands lot's of efforts.

MPEG files may have variable bitrate (VBR). This means that bitrate in the file may change. I have learned about two used methods:

  • bitrate switching. Each frame may be created with different bitrate. It may be used in all layers. Layer III decoders must support this method. Layer I & II decoders may support it.
  • bit reservoir. Bitrate may be borrowed (within limits) from previous frames in order to provide more bits to demanding parts of the input signal. This causes, however, that the frames are no longer independent, which means you should not cut this files. This is supported only in Layer III.

For Layer II there are some combinations of bitrate and mode which are not allowed. Here is a list of allowed combinations:

Bitrate | allowed Mode
free, 64, 96, 112, 128, 160, 192 | all
32, 48, 56, 80 | single channel
224, 256, 320, 384 | stereo, intensity stereo, dual channel
F 2 (11,10) Sampling rate frequency index (values are in Hz)
Bits | MPEG-1 | MPEG-2 | MPEG-2.5
00 | 44100 | 22050 | 11025
01 | 48000 | 24000 | 12000
10 | 32000 | 16000 | 8000
11 | reserved
G 1 (9)

Padding bit
0 - frame is not padded
1 - frame is padded with one extra slot

Padding is used to fit the bit rates exactly. For an example: 128k 44.1kHz layer II uses a lot of 418 bytes and some of 417 bytes long frames to get the exact 128k bitrate. For Layer I slot is 32 bits long, for Layer II and Layer III slot is 8 bits long.
H | 1 | (8) | Private bit. It may be freely used for specific needs of an application, i.e. if it has to trigger some application specific events.
I 2 (7,6) Channel Mode
00 - Stereo
01 - Joint stereo (Stereo)
10 - Dual channel (Stereo)
11 - Single channel (Mono)
J 2 (5,4)

Mode extension (Only if Joint stereo)

Mode extension is used to join informations that are of no use for stereo effect, thus reducing needed resources. These bits are dynamically determined by an encoder in Joint stereo mode.

Complete frequency range of MPEG file is divided in subbands There are 32 subbands. For Layer I & II these two bits determine frequency range (bands) where intensity stereo is applied. For Layer III these two bits determine which type of joint stereo is used (intensity stereo or mid/side stereo). Frequency range is determined within decompression algorithm.

Bits | Layer I and II | Layer III
 | Intensity Stereo Bands | Intensity stereo | MS stereo
00 | bands 4 to 31 | off | off
01 | bands 8 to 31 | on | off
10 | bands 12 to 31 | off | on
11 | bands 16 to 31 | on | on
K 1 (3) Copyright
0 - Audio is not copyrighted
1 - Audio is copyrighted
L 1 (2) Original
0 - Copy of original media
1 - Original media
M 1 (1,0) Emphasis
00 - none
01 - 50/15 ms
10 - reserved
11 - CCIT J.17

back to top

How to calculate frame size

Read the BitRate, SampleRate and Padding (as value of one or zero) of the frame header and use the formula:

FrameSize = 144 * BitRate / SampleRate + Padding

Example: BitRate = 128000, SampleRate=441000, Padding=0 ==> FrameSize = 417 bytes

back to top

MPEG Audio Tag MP3v1

The TAG is used to describe the MPEG Audio file. It contains information about artist, title, album, publishing year and genre. There is some extra space for comments. It is exactly 128 bytes long and is located at very end of the audio data. You can get it by reading the last 128 bytes of the MPEG audio file.

AAABBBBB BBBBBBBB BBBBBBBB BBBBBBBB
BCCCCCCC CCCCCCCC CCCCCCCC CCCCCCCD
DDDDDDDD DDDDDDDD DDDDDDDD DDDDDEEE
EFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFG

Sign | Length (bytes) | Position (bytes) | Description
A | 3 | (0-2) | Tag identification. Must contain 'TAG' if tag exists and is correct.
B | 30 | (3-32) | Title
C | 30 | (33-62) | Artist
D | 30 | (63-92) | Album
E | 4 | (63-96) | Year
F | 30 | (97-126) | Comment
G | 1 | (127) | Genre

The specification asks for all fields to be padded with null character (ASCII 0). However, not all applications respect this (an example is Winamp which pads fields with <space>, ASCII 32).

There is a small change proposed in MP3v1.1 structure. The last byte of the Comment field may be used to specify the track number of a song in an album. It should contain a null character (ASCII 0) if the information is unknown.

Genre is a numeric field which may have one of the following values:

0 | 'Blues' | 20 | 'Alternative' | 40 | 'AlternRock' | 60 | 'Top 40'
1 | 'Classic Rock' | 21 | 'Ska' | 41 | 'Bass' | 61 | 'Christian Rap'
2 | 'Country' | 22 | 'Death Metal' | 42 | 'Soul' | 62 | 'Pop/Funk'
3 | 'Dance' | 23 | 'Pranks' | 43 | 'Punk' | 63 | 'Jungle'
4 | 'Disco' | 24 | 'Soundtrack' | 44 | 'Space' | 64 | 'Native American'
5 | 'Funk' | 25 | 'Euro-Techno' | 45 | 'Meditative' | 65 | 'Cabaret'
6 | 'Grunge' | 26 | 'Ambient' | 46 | 'Instrumental Pop' | 66 | 'New Wave'
7 | 'Hip-Hop' | 27 | 'Trip-Hop' | 47 | 'Instrumental Rock' | 67 | 'Psychadelic'
8 | 'Jazz' | 28 | 'Vocal' | 48 | 'Ethnic' | 68 | 'Rave'
9 | 'Metal' | 29 | 'Jazz+Funk' | 49 | 'Gothic' | 69 | 'Showtunes'
10 | 'New Age' | 30 | 'Fusion' | 50 | 'Darkwave' | 70 | 'Trailer'
11 | 'Oldies' | 31 | 'Trance' | 51 | 'Techno-Industrial' | 71 | 'Lo-Fi'
12 | 'Other' | 32 | 'Classical' | 52 | 'Electronic' | 72 | 'Tribal'
13 | 'Pop' | 33 | 'Instrumental' | 53 | 'Pop-Folk' | 73 | 'Acid Punk'
14 | 'R&B' | 34 | 'Acid' | 54 | 'Eurodance' | 74 | 'Acid Jazz'
15 | 'Rap' | 35 | 'House' | 55 | 'Dream' | 75 | 'Polka'
16 | 'Reggae' | 36 | 'Game' | 56 | 'Southern Rock' | 76 | 'Retro'
17 | 'Rock' | 37 | 'Sound Clip' | 57 | 'Comedy' | 77 | 'Musical'
18 | 'Techno' | 38 | 'Gospel' | 58 | 'Cult' | 78 | 'Rock & Roll'
19 | 'Industrial' | 39 | 'Noise' | 59 | 'Gangsta' | 79 | 'Hard Rock'

Winamp expanded this table with these next codes:

80 | 'Folk' | 92 | 'Progressive Rock' | 104 | 'Chamber Music' | 116 | 'Ballad'
81 | 'Folk-Rock' | 93 | 'Psychedelic Rock' | 105 | 'Sonata' | 117 | 'Power Ballad'
82 | 'National Folk' | 94 | 'Symphonic Rock' | 106 | 'Symphony' | 118 | 'Rhytmic Soul'
83 | 'Swing' | 95 | 'Slow Rock' | 107 | 'Booty Brass' | 119 | 'Freestyle'
84 | 'Fast Fusion' | 96 | 'Big Band' | 108 | 'Primus' | 120 | 'Duet'
85 | 'Bebob' | 97 | 'Chorus' | 109 | 'Porn Groove' | 121 | 'Punk Rock'
86 | 'Latin' | 98 | 'Easy Listening' | 110 | 'Satire' | 122 | 'Drum Solo'
87 | 'Revival' | 99 | 'Acoustic' | 111 | 'Slow Jam' | 123 | 'A Capella'
88 | 'Celtic' | 100 | 'Humour' | 112 | 'Club' | 124 | 'Euro-House'
89 | 'Bluegrass' | 101 | 'Speech' | 113 | 'Tango' | 125 | 'Dance Hall'
90 | 'Avantgarde' | 102 | 'Chanson' | 114 | 'Samba' |
91 | 'Gothic Rock' | 103 | 'Opera' | 115 | 'Folklore'

Any other value should be considered as 'Unknown'

back to top

Credits

Created on September 1998 by Predrag Supurovic.
Thanks to Jean for debugging and polishing of this document, Peter Luijer, Guwani, Rob Leslie and Franc Zijderveld for valuable comments and corrections.

© 1998, 1999 Copyright by DataVoyage

This document may be changed. Check http://www.datavoyage.com/mpgscript/mpeghdr.htm for updates.
You may use it freely. If you can help us make it more accurate, please do.