Neon Goat MP3 Report Generator(1) mp3report


 A customizable program to scan a list of (sub)directories, creating a report
 from an HTML template. Also calculates various statistics and each song's
 playing time. Supports ID3 and ID3v2 tags. Should work on any perl-ized OS;
 see homepage for demo -


 All options can be configured through the command line, see mp3report --help
 for more info. You may also want to modify the hard coded defaults at the
 top of the program file.
 See documentation.html for information on customizing your own template file.


 Usage: mp3report [options] [directory...]
  --help                 shows this help screen
  --printmode            uses a smaller font for printing
  --title=TITLE          sets the title used in the report
  --outfile=OUTFILE      file to write report to, '-' for STDOUT
  --template=FILE        file to use as report template
  --stdgenres            use standard genres instead of winamp genres
  --id3v2                enable id3v2 support (experimental)
  directory...           dirs to scan (subdirs included)


 You should be able to run mp3report directly after decompressing it:
 tar xfzv mp3report-1.0.2.tar.gz
 cd mp3report-1.0.2
 ./ --help
 If your perl interpreter isn't in /usr/bin/perl, you'll need to change the first line
 of mp3report
 If you'd like to install the MP3::Info perl module so that other programs can
 use it, it is available at


By creating your own HTML file or modifying one of the provided templates, you can customize the output of MP3 Report Generator. These are the various identifiers that MP3 Report Generator can look for in a report:

General Information

This is either 1 or 2, depending on the --printmode flag. If printing mode is on, the idea is that the font size should be a little bit smaller so that it looks better on paper. To make sure this field does something, use <FONT SIZE="$t_fontsize"> in your HTML code.
Used for the HTML <TITLE> tag as well as the first line of the report, and is set by specifying --title=SOMETHING on the command line.
The local date and time when the report was generated.
The list of parent directories that was scanned in the report. Each directory is separated by <BR&gt;&amp;nbsp;&amp;nbsp; so that they are on seperate lines and indented.
The total number of directories and subdirectories scanned in the report.
The total number of MP3 files included in the report.
The total size of all MP3 files included in the report combined. This is formatted into ``x.xx GB (y.yy MB)''.
The total playing time of all songs combined. This is formatted into an English sentence (4 days, 3 hours, 2 minutes, 1 second).
The total time it took to genereate the report. This is formatted into an English sentence (4 days, 3 hours, 2 minutes, 1 second).
The average size of the MP3s in this report. This is formatted into ``x.xx MB''.
The average playing time of a single song in the report. This is formatted into an English sentence (3 hours, 2 minutes, 1 second).

Report Settings

The filename that the report is being written to.
The filename of the template that is being used.
Either ``Yes'' or ``No'' depending on whether the --printmode flag was specified.
Either ``Yes'' or ``No'' depending on whether user specified custom directories to scan on the command line.
Either ``Standard'' or ``WinAMP'' depending on whether or not the user specified --stdgenres.
Either ``Yes'' or ``No'' depending on whether the --id3v2 flag was specified.

Item Information

The current directory that is being scanned.
The current sequential number of the item found.
The filename of the item found. NOTE: This in versions older than 1.0.2, this variable was called $item_name.
The size of the item found. This is formatted into ``x.xx MB''.
This will either be #FFFFFF or #EEEEEE (white or light gray) depending on whether or not the current item number is even or odd. This is used to make the cell color in tables alternate to make the report easier to read. In order for this to work, your HTML code must look something like <TD BGCOLOR="$item_bgcolor">...</TD>.
The playing time of the song found, formatted into ``XX:YY'' (minutes:seconds).

MP3 Information

The total number of seconds in the current song.
The MPEG version number of the current MP3, usually 1.
Either ``Stereo'' or ``Mono'' depending on the number of channels in the MP3.
The MPEG layer number, usually 3.
The bitrate of the current MP3 in kbps.
If the current MP3 is encoded at a variable bitrate, this will equal ``VBR''. If not, it will be a blank string.
Either ``Copyrighted'' or ``Not copyrighted'' depending on the MP3's copyright flag.
The frequency of the current MP3 in kHz.

ID3 Tag Information

The song's ID3 title, maximum 30 characters.
The song's ID3 artist, maximum 30 characters.
The song's ID3 album, maximum 30 characters.
The song's ID3 year, maximum 4 characters.
The song's ID3 comment, maximum 30 characters (28 if the ID3 tag also contains a track number).
The song's ID3 genre. You may disable WinAMP genres by specifying the --stdgenres flag.
The song's ID3v1.1 track number (if present), maximum 2 characters.

ID3v2 Tag Information

ID3v2.3.0 (or later) tags are also supported. To enable ID3v2 support, use the --id3v2 flag on the command line. The following is taken from MPEG::MP3Info::v2_tag_names

WPAY: Payment
TEXT: Lyricist/Text writer
TOLY: Original lyricist(s)/text writer(s)
TMED: Media type
RVAD: Relative volume adjustment
TIME: Time
RBUF: Recommended buffer size
TOAL: Original album/movie/show title
TRCK: Track number/Position in set
IPLS: Involved people list
MLLT: MPEG location lookup table
TKEY: Initial key
APIC: Attached picture
SYTC: Synchronized tempo codes
TYER: Year
TPOS: Part of a set
TRSN: Internet radio station name
UFID: Unique file identifier
TRSO: Internet radio station owner
TSIZ: Size
TENC: Encoded by
TRDA: Recording dates
COMM: Comments
SYLT: Synchronized lyric/text
WOAF: Official audio file webpage
LINK: Linked information
COMR: Commercial frame
TBPM: BPM (beats per minute)
PCNT: Play counter
TOFN: Original filename
WOAR: Official artist/performer webpage
WOAS: Official audio source webpage
TPE1: Lead performer(s)/Soloist(s)
TFLT: File type
TPE2: Band/orchestra/accompaniment
TSRC: ISRC (international standard recording code)
TPE3: Conductor/performer refinement
RVRB: Reverb
TPE4: Interpreted, remixed, or otherwise modified by
MCDI: Music CD identifier
TDLY: Playlist delay
TDAT: Date
TORY: Original release year
TLAN: Language(s)
TCOM: Composer
TLEN: Length
TCON: Content type
TCOP: Copyright message
OWNE: Ownership frame
TPUB: Publisher
TXXX: User defined text information frame
GEOB: General encapsulated object
TSSE: Software/Hardware and settings used for encoding
PRIV: Private frame
TIT1: Content group description
TALB: Album/Movie/Show title
TIT2: Title/songname/content description
TIT3: Subtitle/Description refinement
POSS: Position synchronisation frame
GRID: Group identification registration
USLT: Unsychronized lyric/text transcription
ENCR: Encryption method registration
TOWN: File owner/licensee
WORS: Official internet radio station homepage
ETCO: Event timing codes
EQUA: Equalization
WCOM: Commercial information
AENC: Audio encryption
TOPE: Original artist(s)/performer(s)
WCOP: Copyright/Legal information
POPM: Popularimeter
WPUB: Publishers official webpage
WXXX: User defined URL link frame
USER: Terms of use


 Much thanks to Chris Nandor and contributors to MP3::Info... 
 it saved me a lot of time :) And to Larry Wall for such a great language.
 Hello to MMT, UCLA LUG, cX, and of course the DJs of Mister Balak's Neighborhood!