Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
MP3LINTRC(5)	      User Contributed Perl Documentation	  MP3LINTRC(5)

       mp3lintrc - configuration file for mp3lint

       /etc/mp3lintrc, $HOME/.mp3lintrc

       mp3lint can be configured using the file	.mp3lintrc in your home

       The config file .mp3lintrc is actually a	fragment of perl, so you can
       put any valid perl code in there. Don't worry if	you don't know perl,
       you don't need to write any actual code.	The best thing to do is	work
       your way	through, altering the existing statements. Make	sure every
       (non-blank) line	ends with a semicolon (;).

       .mp3lintrc is automatically created the first time you run mp3lint.

       If you use MP3::Archive(3) with any other tool than mp3lint, eg some of
       the tools in mp3-archive-tools(1), you will have	a configuration	in
       .mp3archiverc that you may wish to share	with mp3lint. To do this,
       either delete the non mp3lint-specific parts of .mp3lintrc (the first
       half, up	to the comment about mp3lint) and replace them with:

	require	"$ENV{HOME}/.mp3archiverc"

       or do it	the other way round, and replace all the contents of
       .mp3archiverc with:

	require	"$ENV{HOME}/.mp3lintrc";

       MP3::Archive will ignore	any variables it doesn't know about.  For more
       details,	see MP3::Archive::Config(3).

       Formats are used	to define valid	filenames and to specify where the
       artistname, albumname, etc are located.

       Formats are regular expressions (see perlretut(1) and perlre(1)), but
       with ARTIST, ALBUM, TRACK, TRKNUM and EXT as placeholders for the
       artist, album, track name (song title), track number and	file extension

       If you don't know about regular expressions, don't worry, treat them
       like regular strings, but put a backslash (\) before any	characters
       other than letters, numbers and spaces (especially forward slash	(/)
       and period (.)).

       There are two types of formats.

       Variables beginning with	$formats_ are lists of permissible formats for
       parsing a filename, each	of which are regular expressions (see
       perlretut(1) and	perlre(1) for details).	The formats are	references to
       arrays, which essentially you can have as many as you want, separated
       by commas, and they must	start and end with [ and ] respectively. The
       individual formats should be quoted with	single quotes (').

       Variables beginning with	$format_ are single formats that are ordinary
       strings,	not regular expressions, and are used when creating filenames.
       They don't have [ and ] round them, but still should be quoted with
       single quotes ('), and there should be only one of them,	not a list.

       These are from the default setup.

	$formats_album=['TRKNUM	- ARTIST - ALBUM - TRACK\.EXT',

       This defines two	acceptable formats for album tracks.  The first	one
       would match eg:

	01 - Talk Talk - Spirit	Of Eden	- The Rainbow.mp3

       and the second one would	match eg:

	DJ Shadow - Endtroducing - 07 -	Stem-Long Stem.mp3

	$formats_track=['ARTIST	- TRACK\.EXT'];

       This defines one	acceptable format for non-album	tracks.	This would
       match eg:

	Radiohead - Paranoid Android (Live at the 10 Spot).ogg

	$format_write_album='TRKNUM - ARTIST - ALBUM - TRACK.EXT';

       This can	be though of as	the reverse of $formats_album. It defines the
       format to be used when creating a file, so in this example, given
       TRKNUM "02", ARTIST "Dead Can Dance", ALBUM "Aion", TRACK "Saltarello",
       and EXT "wav", it would produce the filename:

	02 - Dead Can Dance - Aion - Saltarello.wav

       Start with the default .mp3lintrc, which	will be	created	for you	when
       you run mp3lint.	Work your way through top to bottom. The file is
       parsed as perl code, but	you should be able to get by without knowing
       any perl. Lines which start with	# are comments,	and can	be ignored.
       Non-blank lines should end with ;.  The last line of the	file should be

	   This	specifies acceptable formats for album tracks.


	    $formats_album= ['TRKNUM - ARTIST -	ALBUM -	TRACK\.EXT'>, 'ARTIST -	ALBUM -	TRKNUM - TRACK\.EXT'];

	   See FORMATS for details.

	   This	specifies acceptable formats for non-album tracks.


	    $formats_track=['ARTIST - TRACK\.EXT'];

	   See FORMATS for details.

	   This	specifies how to extract info from the directory of an album


	    $formats_album_dir=	['ARTIST - ALBUM$','ARTIST\/ALBUM$'];

	   This	would match

	    Spiritualised - Lazer Guided Melodies


	    Spiritualised/Pure Phase

	   both	at the end of the pathname (The	$ means	match the end of the

	   This	specifies how to extract info from the directory of a non-
	   album track.


	    $formats_track_dir=	['ARTIST$'];

	   This	specifies the last portion of the pathname is the artist.

       $formats_album_m3u, $formats_track_m3u
	   Specifies the format	of m3u playlist	filenames for album and	non-
	   album tracks.


	    $formats_album_m3u=	['ARTIST - ALBUM\.EXT'];

	    $formats_track_m3u = ['ARTIST\.EXT'];

	   This	is how to treat	files that aren't in any of the	defined
	   pathnames (see $paths_track and $paths_album	below).	It can be
	   either "album", to treat them as album tracks, "track" to treat
	   them	as non-album tracks, or	anything else (eg "skip") to ignore



       $format_delimiter_album,	$format_delimiter_track
	   These specify the delimiters	for album and non-album	tracks.	 This
	   allows extra	checks,	eg to make sure	there are the right number of
	   fields (eg, if the delimiter	is `-' and you have a track named
	   Stem	- Long Stem, so	the file is called

	    07 - DJ Shadow - Entroducing - Stem	- Long Stem.mp3

	   then	the extra dash will cause you problems,	but specifying a
	   delimiter will allow	mp3lint	to determine there are too many


	    $format_delimiter_album= ' - ';

	    $format_delimiter_track= ' - ';

       $paths_album, $paths_track
	   These are used to determine from its	pathname whether a file	should
	   be treated as part of an album. They	are regular expressions, so
	   the same warnings about quoting apply as to formats.	This also
	   means that they are substring matches, so the defaults below	match
	   any pathname	that contains a	component containing album or track.
	   Although there is only one path each	in the default,	they can be
	   lists of multiple paths (or portions	of paths) to match.




	   This	means that any pathname	containing album or track will be
	   treated accordingly (eg /music/groovy-albums/).

	   $archive_root is currently only used	to define the $path_write_*
	   variables (below), but its use may be expanded in the future.



	   On any sane unix system, $ENV{HOME} expands to your home directory.

       $path_write_album, $path_write_track
	   $path_write_album and $path_write_track are used to determine the
	   canonical pathname for files, for tools like	movemusic(1).

	   The defaults	are defined relative to	$archive_root (see above).



       $format_write_album, $format_write_track, $format_write_album_m3u,
       $format_write_track_m3u,	$format_write_album_dir,
	   These variables are analogous to the	$formats_* variables above,
	   but they are	used for constructing filenames	rather than parsing
	   them	to extract information.	They are not regular expressions, they
	   are ordinary	strings, and there is only one of each rather than a
	   list	(array). The same magic	variables ("TRKNUM", "ARTIST",
	   "ALBUM", "TRACK") are used and are replaced with the	actual data.


	    $format_write_album='TRKNUM	- ARTIST - ALBUM - TRACK.EXT';
	    $format_write_track='ARTIST	- TRACK.EXT';
	    $format_write_album_m3u='ARTIST - ALBUM.EXT';

	   Variables below this	point are specific to mp3lint, not shared with

	   These are the filename extensions mp3lint looks for.	There is not
	   much	point adding entries without implementing corresponding	tools,
	   unless you have weird extensions for	your files you want it to
	   find, but if	you wanted to completely ignore	a certain type of
	   file, you could remove it from the list.


	    $lint_extensions= ["mp3","mp2","wav","ogg","m3u","flac","au"];

	   If the pathname contains this, no warning is	issued if the filename
	   and directory name disagree on the artist. This allows for multi-
	   artist compilations.



	   Whether to attempt to fix problems as we find them.	Currently only
	   fixes permissions. This can also be enabled with the	-f flag	to



	   ie no.

	   A series of regular expressions (see	perlretut(1) and perlre(1)) of
	   messages to skip printing. This can be used to permanently suppress
	   messages you	don't want to see. For a more complex system of
	   suppressing messages	on a per-file basis, see mp3lintskip(1).

	   The default skip messages suppress the most pedantic	of the error
	   messages. To	enable all messages, change the	line in	your
	   .mp3lintrc that mentions $lint_skip to:



	    $lint_skip=["^filename:caps:", "^filename:the:", "^filename:disc:"];

	   Controls filename capitalisation style (in filename:caps test).

	   This	variable only applies if Text::Autoformat is installed.



	   Available values:

	       Capitalises everything except "unimportant" words. This is the

	       Capitalises every word.

	       Capitalises the first word.

	       Uppercases everything.

	       Lowercases everything.

       $lint_perms_file, $lint_perms_dir
	   Specifies the correct permissions for files and directories.	For
	   more	details, see the section in mp3lint-tools(1) on	the tool
	   filesys, test perms.




	   The default allows any user to play your music, but only you	to
	   write to it.

	   Minimum bitrate for mp3 files. You may wish to allow	a little
	   leeway, to allow for	VBR files that average just under the target.
	   This	is why the default is 120kbps not 128kbps.



	   Minimum bitrate for ogg vorbis files. The default average bitrate
	   of files created by oggenc is 110kbps, so we	allow a	leeway of
	   10kbps in the default.



	   The minimum sample rate in Hz. The default is 44100,	which is CD



	   The minimum bit size	of the sample. Most decent sounding samples
	   are at least	16 bit.



	   Whether to check wav	files or just complain about their presence.
	   This	is useful if your only use for wav files is as part of the
	   ripping process, so if mp3lint finds	one it probably	means your
	   ripper died and left	wavs lying about.



	   This	means to check wav files as normal.

       $lint_maxbadframes_mp3info, $lint_maxbadframes_mp3check
	   Maximum bad frames accepted before we complain. May be useful
	   because sometimes we	get false errors from mp3info or mp3check due
	   to iffy handling of ID3v2 tags. Different values can	be set for
	   mp3info and mp3check. The default allows no bad frames.




	   If set, uses	this instead of	$HOME/.mp3lintrc

	   Used	to find	.mp3lintrc

       None known. Please report any found to

       I am especially interested in how well the code for filename formats
       works for other people's	filenames.

       mp3lint(1), mp3lintskip(1), mp3lintsum(1), mp3lint-tools(1),
       MP3::Archive(3),	MP3::Archive::Config(3), mp3-archive-tools(1)

       Ian Beckwith <>

       Copyright 2003 Ian Beckwith <>

       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
       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.,
       675 Mass	Ave, Cambridge,	MA 02139, USA.

perl v5.32.0			  2003-12-14			  MP3LINTRC(5)


Want to link to this manual page? Use this URL:

home | help