chapter 8 of 18

Music recognition

This is real Shazam. Not a lookalike, not a guess from the title.

After the download, ffmpeg cuts the first 20 seconds, mixes it to mono 16 kHz WAV, and hands that to a bundled tool called recognise: a PyInstaller-frozen build of the shazamio library, which queries Shazam's own service. It returns the track title, the artist and a link to the track. All three land on the card, and the title and artist are searchable.

Worth knowing:

  • It needs the internet. Offline, there is no result.
  • No API key is involved. This is an unofficial client, not a Shazam SDK; if those endpoints ever close, the feature stops, and only an app update can fix it.
  • It runs once per card that finds something. A card that already has a track is not re-identified on a re-download. A card that never resolved one — no music in the clip, or a lookup that failed — is asked again on every re-download, because "no track" and "never asked" look identical from the outside.
  • Images and carousels never get music.
  • Failure is silent. A clip with no music, a network failure and a broken recogniser build all look identical: the line simply is not there. No error is shown. That is deliberate, but it means a broken recogniser goes unnoticed.
  • It updates with the app, never at runtime — and so does everything else in bin/. Nothing here reaches out and replaces itself. yt-dlp used to: it ran its own -U at start-up and once a day, and that was removed deliberately, because the yt-dlp ReelPile ships is built without the YouTube extractor and an upstream self-update would have quietly put it back within a day.

Something here wrong, or something missing? Tell us — the manual is corrected against the app, not the other way round.