Autotagging — Matching Against MusicBrainz
Outcome: you know what an autotag match is made of, what a candidate session asks you, and why the lab's perfect score is both a success and a warning. This is beets' famous feature and its most misunderstood: the matcher is careful, tireless — and deaf.
What a match is made of
For each album you import without
-A, beets takes what it has — the
existing tags, the number of tracks,
and above all each track's length
— and searches MusicBrainz for
releases that fit. Candidates are
scored: artist and album names
similar, track count equal, lengths
within a small tolerance, track
titles alike. The result is a
percentage, and for the winner beets
shows you a diff — field by field,
your value against theirs — and asks
what to do. That session, the
candidate session, is where
autotagging is honest: matches above
a threshold apply themselves (the
next section shows one), weaker ones
wait for your judgement among
Apply, More candidates, Skip,
Use as-is, and typing a MusicBrainz
ID yourself when you already know it.
Two supporting facts keep the model
straight. Beets does not analyse the
audio for this (an optional plugin,
chroma, adds acoustic fingerprints;
it is documented-only here and the
core matcher does without). And the
identifiers it stores — mb_albumid,
mb_trackid — are the receipt: an
item with them has been matched;
an item without them, however tidy
its tags, has only been trusted.
The lab's match: 100.0%, and what it proves
Transcript t10-autotag-attempt.txt
is the whole experiment. The lab
generated a 2:05 sine tone, tagged it
as a famous 1965 recording of exactly
2:05, and imported it in singleton
mode (beet import -s — match one
track, not an album):
Match (100.0%):
The Beatles - Yesterday
MusicBrainz, Index None, Track None,
https://musicbrainz.org/recording/72ceea4a-4129-48d7-bf87-508719a06344
* Artist: The Beatles
* Track: Yesterday
A match that strong needed no
confirmation; the import completed,
and the database record carries the
real mb_trackid, which the
transcript verifies. So the metadata
path works end to end, live, against
the real MusicBrainz.
Now the warning, and it is the chapter's real outcome: the file beets matched contains a sine tone. It has never contained that performance, and no part of beets noticed, because no part of beets listened. Tags said the right names, the length was the right length, and that was sufficient — it would have been equally sufficient for a mistagged file, a live version of conveniently equal length, or a radio edit wearing the studio version's tags. Autotagging launders metadata; it does not authenticate audio. Use it as what it is — an extremely good proposal engine whose diffs deserve a human read, especially at album scale, where one confident wrong release can retitle fourteen tracks at a stroke.
Album sessions, quiet and timid
The full album session — several candidates, distance penalties, your files' track titles argued over one by one — is documented-only in this guide: the lab's invented albums have no MusicBrainz entries, and a staged session would be theatre, not evidence. From the documentation, the controls that matter:
- Default asks about each album, showing the best candidate's diff.
--timid(-t) asks even when the match is certain — the mode for a library you care about.--quiet(-q) never asks; albums with no strong match are skipped (logged if you pass-l), andquiet_fallbackin the config choosesskiporasisfor the leftovers.--search-id(-S) skips the search when you know the exact MusicBrainz release ID — the expert lane, and the fastest way to fix a session that keeps offering the wrong pressing.
The other question every import asks
Import may interrupt for a different
reason than matching: the album
seems to be in the library already.
The prompt offers Skip new,
Merge all, Remove old, Keep
all, Upgrade — and it waits for a
single keypress, which means an
unattended import stops here and
waits forever (chapter 13 has that
story). The config setting
import.duplicate_action answers in
advance: ask (the default), skip,
keep, merge, or remove. The
lab used keep to admit a known
duplicate for chapter 8
(beets-lab/config-keep.yaml), and
merge in chapter 6 — where, to
repeat that chapter's finding, merge
serves true duplicates of the same
tracks and does not combine two
album records' different tracks.
Choose the action to match the
situation, and let interactive
imports stay interactive: a human at
the duplicate prompt is a feature
when you are that human.