Classical Music Metadata Tagger

Personal Utility

2026

Overview

I have hundreds of FLAC files of classical music that I acquired over the years. The problem? The metadata was a disaster. Wrong composers, missing movements, filenames that made no sense. Fixing them manually would take forever, so I did what any reasonable person would do: spent a weekend building a tool.

The core idea is simple: throw the filename at an AI, let it parse out the composer, work, movement, performers, and everything else. The AI is surprisingly good at this, even with messy filenames. Then write all that to proper FLAC tags and rename the file to something searchable.

Built it with Python because I wanted something quick and scriptable. Used Rich for the TUI because terminal apps should still look good. Added ffmpeg integration to convert M4A files to FLAC automatically. The audit mode scans your whole library and fixes inconsistencies.

The cover art generator was a fun addition. Uses Pillow to create minimal, luxurious covers based on the metadata. Deep colors, elegant typography, unique per-track based on the title hash. Looks way better than the generic placeholder images most files had.

Key Highlights

  • 01

    AI-powered metadata extraction via OpenRouter, parses filenames that MusicBrainz couldn't handle

  • 02

    Rich TUI with interactive menus, progress bars, and color-coded output

  • 03

    Automatic M4A/MP4 to FLAC conversion using ffmpeg, backs up originals to Desktop

  • 04

    Audit mode reviews ALL files for consistency, can auto-approve or review each change

  • 05

    Cover art generator creates unique minimal covers using Pillow and metadata-seeded colors

  • 06

    Dry-run mode so you can preview changes without destroying your library

Technologies

PythonRichMutagenOpenRouterffmpegPillow