Table of Contents

mp3plot

An mp3 bitrate plot tool

Projects index

Details

Description

This tool prints out a plot of the bitrate distribution of a VBR MP3 file (it will also do it for CBR files although it isn't very meaningful).

There's a much more mature tool that does the same and more: mp3stat at signal-lost.homeip.net/projects (dead link, archived version, page at BSDforge).
mp3stat refuses to work on my system(s) and having an interest in mp3's internal structure I gave a shot at it with mp3plot.

Graphical plots can also be generated by adding the -g option (note this is an optional feature and might not be included in your copy).
This feature was added in version 0.4.0a but is only really usable from 0.5.0 onwards.

Example: (plot for the same file as in the textual example above)

GD output
GD

Magick output
Magick++
GD output using the older colourscheme
GD, old colours
Magick output using the older colourscheme
Magick++, old colours

The graphics output support can be provided by two different libraries (gd and ImageMagick —or GraphicsMagick—).
All binaries in this page use GD since it produces sharper output.

Downloads

Binaries

OS/Platform Package Dependencies
Debian Sid i386 Sid @ 2009-06-22
mp3plot_0.6.0-upstream.1_i386.deb
libboost-program-options1.35.0 (>= 1.35.0-1), libboost-thread1.35.0 (>= 1.35.0-1), libc6 (>= 2.3.6-6~), libgcc1 (>= 1:4.1.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libstdc++6 (>= 4.2.1)
Sid @ 2010-02-21
mp3plot_0.6.0-upstream.1-SID20100221_i386.deb
libboost-program-options1.40.0 (>= 1.40.0-1), libboost-thread1.40.0 (>= 1.40.0-1), libc6 (>= 2.3.6-6~), libgcc1 (>= 1:4.1.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libstdc++6 (>= 4.4.0)
Debian Sid amd64 Sid @ 2009-06-22
mp3plot_0.6.0-upstream.1_amd64.deb
libboost-program-options1.35.0 (>= 1.35.0-1), libboost-thread1.35.0 (>= 1.35.0-1), libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libstdc++6 (>= 4.2.1)
Sid @ 2010-02-21
mp3plot_0.6.0-upstream.1-SID20100221_amd64.deb
libboost-program-options1.40.0 (>= 1.40.0-1), libboost-thread1.40.0 (>= 1.40.0-1), libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libstdc++6 (>= 4.4.0)
Fedora 10 i686 mp3plot-0.6.0-1.fc10~upstream.i386.rpm libboost_program_options-mt.so.3 libboost_thread-mt.so.3 libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1.3) libgcc_s.so.1 libgcc_s.so.1(GCC_3.0) libgd.so.2 libpthread.so.0 libpthread.so.0(GLIBC_2.0) libstdc++.so.6 libstdc++.so.6(CXXABI_1.3) libstdc++.so.6(GLIBCXX_3.4) libstdc++.so.6(GLIBCXX_3.4.9) rpmlib(CompressedFileNames) >= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) >= 4.0-1 rtld(GNU_HASH)
FreeBSD 7.1-RELEASE amd64 1) mp3plot-0.6.0_amd64.tbz png-1.2.32; gd-2.0.35,1; boost-1.34.1
Microsoft Windows (x86) mp3plot-0.6.0-win.zip (included)

Additionally the sources include means to produce easily deb, rpm and tbz (FreeBSD) packages for other OS/architecture combinations.

Source

mp3plot-0.6.0.tar.gz

Generic build instructions

Mandatory requirements:

Optional requirements (for graphical plots):

Compile in the standard GNU fashion:

$ tar zxvf mp3plot-0.6.0.tar.gz
$ cd mp3plot-0.6.0
$ ./configure
$ make
# make install

configure will link against the graphics libraries available (binaries can link to both GD and *Magick at once).
Use –disable-* arguments to avoid linking in undesired modules, e.g.:
Compile without gd support $ ./configure –disable-gd
Compile without *Magick support $ ./configure –disable-magick
Compile without graphics support $ ./configure –disable-gd –disable-magick

NOTE  If configure has problems finding the boost libraries, refer to the INSTALL file in the tarball.

Build DEB package

Packages required to build DEB in Debian Sid:

$ tar zxvf mp3plot-0.6.0.tar.gz
$ cd mp3plot-0.6.0
$ dpkg-buildpackage -rfakeroot -us -uc -b   # (or ''debuild -us -uc -b'')

Build RPM package

Packages required to build RPM in Fedora 10:

$ rpmbuild -tb mp3plot-0.6.0.tar.gz

Build FreeBSD port

Extract port-0.6.0.tar.gz to ${PORTSDIR}/audio/mp3plot and proceed normally from there, e.g:

$ cd /usr/ports/audio/mp3plot
$ tar -zxvf port-0.6.0.tar.gz
$ make

TO-DO list

Acknowledgements

I got most of my initial reference information on the MP3 file structure from the MP3 File Structure Description document located at www.goat.cz/index.php?path=MP3_MP3ProfiInfo (older URL.)
More information filled through web searches leading to random sites.

List of sources of information used, in no particular order:

Portions of the source code to compile on Visual C++ come from the msinttypes project, which is © 2006-2008 Alexander Chemeris, published under the terms of a BSD 3-clause license.

The initial ports collection integration effort was by Andrew Pantyukhin.

wav2mp and UZURA1 were used to generate some MP1 samples.

External references

Changes

Full Changelog

0.6.0 (June, 22th 2009)

Lots of fixed of sloppy code and support for Layer I (MP1), Layer II (MP2) and MPEG-2 (MP1, MP2 and MP3 at lower sampling rates).

See the full changelog for the complete list of changes.

0.5.1 (April, 25th 2009)

0.5.0 (April, 17th 2009)

0.4.0a (May, 26th 2007)


© 2007-2010 Toni Corvera < outlyer at gmail dot com >

<!–$Rev: 2280 $–>

1)
FreeBSD includes mp3plot in its ports/packages system (audio/mp3plot). As of this writing it is up-to-date. See External references.