$ mp3plot "the file.mp3" mp3plot 0.6.0 (c) 2007, 2009 Toni Corvera <http://p.outlyer.net/mp3plot> Tag Identifier / File Magic: ID3 Tag version: 0x0000 ID3V2 Flags: 0x00 Tag size: 559 * Information gathered from the first frame: MPEG Version: MPEG v1 MPEG Layer: Layer III Has CRC: No Nominal bitrate: 128 kbps Sampling rate: 44100 Hz Channel mode: Joint Stereo * VBR Information: VBR file Number of frames included (15295) File size included (7522979) TOC included VBR scale included * Bitrate plot: [ free]: 0 [ 32kbps]: 41 [ 40kbps]: 7 [ 48kbps]: 8 [ 56kbps]: 8 [ 64kbps]: 7 [ 80kbps]: 32 [ 96kbps]: 358 .. [112kbps]: 1228 ........ [128kbps]: 3186 ....................... [160kbps]: 8720 ............................................................... [192kbps]: 1700 ............ [224kbps]: 0 [256kbps]: 0 [320kbps]: 0 [invalid]: 0 Average bitrate is 150.81 kbps with a total of 15295 frames which yields a theoretical (raw audio data) size of 7496918 bytes and a length of 399s
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. 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 |
![]() Magick++ |
|
![]() GD, old colours |
|
![]() 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.
| 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 [*] | 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.
FreeBSD includes mp3plot in its ports/packages system (audio/mp3plot). As of this writing it is up-to-date[1].
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.
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)
Packages required to build RPM in Fedora 10:
$ rpmbuild -tb mp3plot-0.6.0.tar.gz
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
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.
[1]:
ports/audio/mp3plot at FreeBSD.org.
audio/mp3plot at FreshPorts.org
mp3stat
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.