A well maintained music library is a great thing. Wouldn't insights on such a library be great? With beets you can manage and relate your music files to MusicBrainz IDs with all their great metadata.
This project, beets statistics, offers a simple web page, which shows how many jazz albums you have, what the quality factor of your library is and what your top decade of music is.
In order to work, beets-statistics needs a beets library, so you should import all your music files with beets first.
Here's a couple of screenshot showing beets-statistics in action:
| General statistics about the music library | Complete album list | Top genre list |
|---|---|---|
![]() |
![]() |
![]() |
| Genre distribution | Bitrate distribution |
|---|---|
![]() |
![]() |
- Install Python 3.9 or higher
- Install
pipenv - Run
pipenv installin the source directory - Locate your beets library database
- Run
MUSICLIBRARY_DB="<path to db file>" pipenv run prodto start the web app in production mode. - Open the device's IP address on port 8000
docker-compose.yaml
Be sure to mount the musiclibrary.db in the volume section
services:
beets-statistics:
container_name: beets-statistics
restart: always
image: ghcr.io/guerda/guerda/beets-statistics:0.0.1
volumes:
- /home/user/.beets/musiclibrary.db:/app/musiclibrary.db:ro
ports:
- 8000:8000
environment:
- MUSICLIBRARY_DB=/app/musiclibrary.db
The development setup is pretty slim with pipenv and ruff.
Installing the necessary tools via pipenv install --dev gets you along.
You can start the web server in dev mode via
pipenv run dev
If you have a correction or an issue, open an issue here or contact me directly. A PR in a separater branch in your fork goes a long way, so feel free to open it up.
This project is licensed under GNU GPL 3.0.




![Screenshot of a web page with a table with two colums. The colums are titled "Bitrate [kbit/s]" and "Number of tracks". The bitrate buckets are listing bitrates from 1410 down to 160 kbit/s. The green progress bar represents the number of tracks in comparison to the total number of tracks. The largest progress bar is at 190 kbit/s with 1752 tracks.](/guerda/beets-statistics/raw/main/img/screenshot-bitrate.png)