How can I detect the BPM (beats per minute) of a song?

bpm-tools are command-line tools for detecting and tagging BPM.

Here's the man page of the package in Ubuntu 14.04 LTS.

You could use a loop or xargs in a shell script to run this on a library of songs.


There is a thread (Any beat detection software for Linux?) on SuperUser dealing with the same problem.

It uses a combination of commands (bpmcount, mid3v2, vorbiscomment, metaflac) compiled into a neat shell script.


Mixxx has a built-in analyser that will let you select a bunch of songs from your library to analyse their BPM.

I recommend using the latest version of Mixxx (1.11 at the time of writing) to make sure you get the most reliable analysis (it has been enhanced recently). You can use their PPA to always have the latest stable version.

However, as mentioned by naught101 in the comments, the value is not yet saved in the file's tags as the development team needs to fix a memory corruption problem before it is enabled. Therefeore, my answer is only partial.

Screenshot of the analyser in Mixxx