<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">

<!--
	``MakeMan'' SGML Template for a man page
	For more Information, please see http://mama.sourceforge.net

	$Author: Jan Schaumann <jschauma@netmeister.org> $
	$Id: template.sgml, v 0.2 2001/08/24 11:18:34 jschauma Exp $
-->

<refentry id="bladeenc">
	<refmeta>
		<refentrytitle>BLADEENC</refentrytitle>
		<manvolnum>1</manvolnum>
		<refmiscinfo class="date">November 25th, 2001</refmiscinfo>
		<refmiscinfo class="source"></refmiscinfo>
		<refmiscinfo class="title">MP3 User's Manual</refmiscinfo>
	</refmeta>

	<refnamediv>
		<refname>bladeenc</refname>
		<refpurpose>LGPL'd MP3 encoder</refpurpose>
	</refnamediv>

	<refsynopsisdiv>
		<cmdsynopsis>
			<command>bladeenc</command>
				<arg choice="opt" rep="repeat">OPTION</arg>
				<arg choice="opt" rep="repeat">WAV-FILE</arg>
		</cmdsynopsis>
	</refsynopsisdiv>

	<refsect1>
		<title>DESCRIPTION</title>
		<para>
			<command>bladeenc</command> is a free, cross-platform,
			console-based MP3 encoder, based on the ISO reference code. It is mostly
			intended for high quality encoding in high bitrates.
		</para>
	</refsect1>
	
	<refsect1>
		<title>USAGE</title>
		<para>
			<command>bladeenc</command> is a console application that takes
			its parameters from the commandline. Any number of WAV/AIFF-files
			can be specified on the commandline and you can even use wildcards
			to specify more than one file at the same time.  Long filenames are
			supported when entering them on the commandline, but if they include
			space-characters you will have to enclose the with quotation-marks 
			( " ).
 		</para>
	</refsect1>

	<refsect1>
		<title>OPTIONS</title>
		<para>
			Switches can be entered on the commandline together with the filenames.
			 In earlier versions of <command>BladeEnc</command> it didn't matter 
			where you put the switches since they always affected all files anyway,
			 but from <command>BladeEnc</command> 0.80 this has changed in order
			 to give you more flexibility.
		</para>
		<para>
			 You can get a list of all valid arguments by running <command>BladeEnc</command>
			 without any commandline arguments.  A summary of the options
			supported by <command>bladeenc</command>
            is included below.
		</para>
			<variablelist>
				<varlistentry>
					<term>-[<replaceable>bitrate</replaceable>], -br [<replaceable>bitrate</replaceable>]</term>
					<listitem>
						<para>
						Defines the bitrate for the MP3-file. Higher bitrates gives better quality,
						but also bigger files. Most people prefer to generate 128 kBit MP3s. Please
						note that it's the total bitrate that is specified, so if you're generating a
						stereo MP3-file at 128 kBit you get 64 kBit for left channel and 64 kBit for
						the right channel. The default setting is 128 kBit for stereo files and 64
						kBit for mono files.

						Allowed bitrates are: 32, 40, 48, 56, 64, 80, 96, 112,
						128, 160, 192, 224, 256 and 320.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-concat</term>
					<listitem>
						<para>
						 Concatenates the output generated from this file to the last mp3
						 generated, thus making one mp3 file from two or more sample
						 files. This option also automatically enables
						 <emphasis>-nogap</emphasis>.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-crc</term>
					<listitem>
						<para>
						Adds checksum data to each frame in the MP3 file. The checksum
						data is useful for error-correction when streaming the MP3 in
						realtime over internet (as done by internet radio stations). It
						lowers the quality of the sound slightly since the checksum data
						also needs to fit in the specified bitrate and is not needed for
						normal use.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-del, -delete</term>
					<listitem>
						<para>
						The WAV-file is automatically deleted after having been encoded.
						Be careful with this switch because the WAV-file is deleted even
						if the encoding process failed (for example due to insufficient
						drive space).
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-dm, -mono</term>
					<listitem>
						<para>
						Downmixes stereo input files to mono before they are compressed,
						thus generating mono MP3 files. This switch does nothing if the
						input file already is mono.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-lm, -leftmono</term>
					<listitem>
						<para>
						Takes only the left channel of the input file and encodes it
						into a mono MP3. If the input file is mono it will be compressed
						as it is.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-rm, -rightmono</term>
					<listitem>
						<para>
						Takes only the right channel of the input file and encodes it
						into a mono MP3. If the input file is mono it will be compressed
						as it is.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-swap</term>
					<listitem>
						<para>
						Swaps the left and right channels of stereo input files before
						encoding them.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-p, -private</term>
					<listitem>
						<para>
						Sets the private-flag in the MP3-file, specifying that this is a
						private MP3. As far as I know there is no program that treats
						private MP3's differently from normal ones so it is practically
						useless.
						</para>
						<para>
						Setting this flag doesn't affect the encoding time, file size or
						quality in any way, so set it if it makes you happy.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-c, -copyright</term>
					<listitem>
						<para>
						Sets the copyright-flag in the MP3-file, specifying that this is
						a copyrighted MP3. As far as I know there is no program that
						treats copyrighted MP3's differently from normal ones so it is
						practically useless.
						</para>
						<para>
						Setting this flag doesn't affect the encoding time, file size or
						quality in any way, so set it if it makes you happy.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-copy</term>
					<listitem>
						<para>
						This switch clears the MP3 file's original-flag that is set by
						default from version 0.50 of <command>bladeenc</command>.
						</para>
						<para>
						Setting this flag doesn't affect the encoding time, file size or
						quality in any way, so set it if it makes you happy.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-quiet</term>
					<listitem>
						<para>
						Prevents <command>bladeenc</command> from doing any screen output, except for error
						messages. This is mostly useful if you want to run bladeenc as a
						background process on UNIX systems. The screen output takes
						nearly no time at all, so you won't even save 1% by disabling
						screen output. This switch is global only.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-q, -quit</term>
					<listitem>
						<para>
						Makes <command>bladeenc</command> quit automatically when all files have been
						encoded. Normally <command>bladeenc</command> waits for someone to press RETURN
						before quitting. This switch is global only.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-outdir=<replaceable>PATH</replaceable></term>
					<listitem>
						<para>
						Specifies an output path for the encoded files. Normally the MP3
						files ends up in the same directory as their corresponding
						WAV-files resides in, but using this switch you can get them to
						end up wherever you like. This switch is global only.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-prio=<replaceable>SETTING</replaceable></term>
					<listitem>
						<para>
						Changes the task priority of <command>bladeenc</command>. Valid settings are
						HIGHEST, HIGHER, NORMAL, LOWER, LOWEST and IDLE. <command>bladeenc</command> is by
						default set to LOWEST priority which basically means that
						BladeEnc functions fine in the background without disturbing or
						slowing down any other program. Linux/Unix users can also
						specify prio in the normal unix range of -20 to +20.This switch
						is global only. This setting is not available in all ports.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-rawfreq=<replaceable>FREQUENCY</replaceable></term>
					<listitem>
						<para>
						Specifies the frequency for raw samples in hertz. Default is 44100.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-rawbits=<replaceable>SAMPLEBITS</replaceable></term>
					<listitem>
						<para>
						Specifies the number of bits for each sample in a raw sample
						file. Allowed values are 8 and 16. Default is 16.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-rawmono</term>
					<listitem>
						<para>
						Specifies that raw samples are mono, not stereo.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-rawstereo</term>
					<listitem>
						<para>
						Specifies that raw samples are stereo, not mono. This
						is default, so you won't have to use this switch unless you want to override a
						global -rawmono switch.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-rawsigned</term>
					<listitem>
						<para>
						Specifies that raw samples are signed, i.e. contains values in
						the range -32768 to +32767 (16-bit samples) or -128 to +127
						(8-bit samples). This is default, so you won't have to use this
						switch unless you want to override a global -rawunsigned switch.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-rawunsigned</term>
					<listitem>
						<para>
						Specifies that raw samples are unsigned, i.e. contains values in
						the range 0 to 65535 (16-bit samples) or 0 to 255 (8-bit samples).
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-rawbyteorder=<replaceable>LITTLE|BIG</replaceable></term>
					<listitem>
						<para>
						Specifies the byteorder of raw samples. LITTLE gives
						LITTLE_ENDIAN (Intel x86 style) and BIG gives BIG_ENDIAN
						(Motorola style). Default is whatever is the native byteorder
						for your system, so hopefully you won't have to use this switch.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-rawchannels=<replaceable>1|2</replaceable></term>
					<listitem>
						<para>
						Specifies the number of channels in a raw sample. -rawchannels=1
						gives the same result as -rawmono and -rawchannels=2 give the
						same result as -rawstereo. Default is 2.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-nocfg</term>
					<listitem>
						<para>
						Ignore whatever is specified in the config file. This switch is global only.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-refresh=<replaceable>1+</replaceable></term>
					<listitem>
						<para>
						This switch is not supported anymore. It became superfluous due
						to internal changes. <command>bladeenc</command> still understands (but ignores) it
						for compatibility reasons.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-progress=<replaceable>0-8</replaceable></term>
					<listitem>
						<para>
						Specifies which of the 7 available progress indicators to use or
						turns the progress indicator off if set to 0. The default
						progress indicator is number 1. Changing the progress indicator
						doesn't affect the encoding in any way it just lets you
						configure the look of <command>bladeenc</command> a little bit according to your
						own taste:
						</para>
						<orderedlist spacing="compact">
						<listitem><para>Percentage and ETA shown for file and batch
						(default).</para></listitem>
						<listitem><para>Long bar for file progress.</para></listitem>
						<listitem><para>Long bar for batch progress.</para></listitem>
						<listitem><para>Short bars for file and batch progress.</para></listitem>
						<listitem><para>Samples done/total for file and batch.</para></listitem>
						<listitem><para>ETA shown for file and batch.</para></listitem>
						<listitem><para>Seconds of MP3 generated from file (default for
						RAW samples).
						</para></listitem>
						<listitem><para>Alternative long bar for file progress. Doesn't rewind
						the
						cursor so it produces less output and works well when
						redirecting program output to a file.
						</para></listitem>
						</orderedlist>
						<para>
						If a RAW sample is included in the batch you automatically gets
						progress indicator 7 for technical reasons. This switch is
						global only.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-nogap</term>
					<listitem>
						<para>
						Specifies that there should be no audiable gap between this and
						the next sample if they are played after each other. Useful when
						encoding records where the tracks blend into each other, but can
						cause unwanted side effects otherwise. Please see the section
						"Gapless encoding" below for more information.
						</para>
					</listitem>
				</varlistentry>
				<varlistentry>
					<term>-sort</term>
					<listitem>
						<para>
						Sorts the specified input files according to filename before
						encoding them. Useful when using the -nogap switch combined with
						wildcards since it's critical that the tracks are encoded in the
						right order when doing gapless encoding. This switch is global
						only.
						</para>
					</listitem>
				</varlistentry>
			</variablelist>
	</refsect1>

	<refsect1>
		<title>FILES</title>
		<variablelist>
			<varlistentry>
				<term><filename>~/.bladeencrc</filename></term>
				<listitem>
					<para>
						The default settings of <command>bladeenc</command> can be changed in the configuration file. 
						The config file contains the same kind of switches as you enter on the commandline, separated by
						one or more spaces, tabs or newlines.
					</para>
					<para>
						Anything placed after a '#' until the end of the line is believed to be a comment and is ignored.
					</para>
					<para>
						The switches in the configuration file are simply appended to the beginning of the commandline
						before it is parsed.
					</para>
					<para>
						Anything typed on the commandline has higher priority than what is in the configuration file, so
						the default settings can easily be overriden from the commandline.
					</para>
					<para>
						If the -nocfg switch is entered on the commandline the configuration file will be ignored. The
						-nocfg switch is not allowed in the configuration file.
					</para>
				</listitem>
			</varlistentry>
		</variablelist>
	</refsect1>

	<refsect1>
		<title>BUGS</title>
		<para>
			Please report bugs to the author.
		</para>
	</refsect1>

	<refsect1>
		<title>SEE ALSO</title>
		<para>
			<command>
				lame(1), grip(1), l3enc(1)
			</command>
		</para>
		<para>
			This program is documented in greater detail on the projects
			homepage: 
			<ulink url="http://bladeenc.mp3.no/">http://bladeenc.mp3.no/</ulink>
		</para>
	</refsect1>

	<refsect1>
		<title>AUTHOR</title>
		<para>
			Tord Jansson <email>tord.jansson@swipnet.se</email>
		</para>
		<para>
			This man-page was written by Jan Schaumann
			<email>jschauma@netmeister.org</email> as part of "<ulink
			url="http://www.netmeister.org/misc/m2p2/index.html">The Missing
			Man Pages Project</ulink>".
		</para>
	</refsect1>
</refentry>
