mp3 VBR histogram?

b. f. bf1783 at
Wed Aug 5 09:51:19 UTC 2009

>does anyone know anything that can produce the sort of ASCII histogram
>that lame produces while encoding in VBR, from an existing .mp3 file?
>I'm interested in analysing the bitrate distribution of frames of a VBR
>live stream, though I don't mind saving it to a disk file if necessary.

Any application that can sweep through an mp3 and read the frame
headers should have code that you can adapt for this purpose, and
there are many such pieces of software in Ports (every mp3 decoder,
and many utilities).  If you want something ready-made, and efficiency
isn't of paramount importance, you could use, for example,
audio/mp3plot or audio/mp3stat on files.

I've dumped frame bitrates of mp3 files before from the command-line
using audio/mp3_check and something like:

mp3_check -avv sample.mp3 | awk '/BitRate/ { print $2  }' -

audio/py-mad, a python interface to audio/libmad, has some example
code for reading mp3 streams, and could also be used for this purpose.


More information about the freebsd-multimedia mailing list