Chop a continuous DJ set into an album.
Fred again.. & Thomas Bangalter, USB002, Alexandra Palace — the set that started this tool. Thumbnail from the video; this is what concerto thumb --square would hand you as cover art for it.
$ concerto split tracklist.txt --source "USB002.mp3" --list
concerto: 29 track(s), 1:56:23 of 1:56:23 source
01/29 0:01 3:15 Mythologies: X, L'Accouchement x My House
02/29 3:16 4:21 One More Time x We've Lost Dancing x Ain't No Mountain High Enough
03/29 7:37 3:53 Hackney Pigeon (Sammy Virji VIP) - Tessela
…
$ concerto thumb gfF8jzBVWvM -o cover.jpg --square
concerto: fetched maxresdefault thumbnail for gfF8jzBVWvM -> cover.jpg
$ concerto split tracklist.txt --source "USB002.mp3" --cover cover.jpg
[01/29] Mythologies: X, L'Accouchement x My House (3:15)
[02/29] One More Time x We've Lost Dancing x Ain't No Mountain High Enough (4:21)
…
concerto: split into 29 track(s), 1:56:23 -> Fred again.. & Thomas Bangalter - USB002 (Alexandra Palace, London, 27 February 2026)/On 27 February 2026, Fred again.. and Thomas Bangalter played a two‑hour B2B at Alexandra Palace as USB002 — Daft Punk vocals stitched into Thomas's own unreleased mashups, his son singing along to a track his dad made when he was twelve, "Music Sounds Better With You" building itself piece by piece until "the machine finds its soul." It's about as GOATed as a DJ set gets. I downloaded the whole thing as one 235 MB file and wanted it on my phone as an actual album — tracks, art, tags — not a two‑hour blob I'd have to scrub through by hand every time.
Fred had posted a real tracklist in the video's footnotes, just buried in commentary ("I remember!", "shoutout the UK") and — in two places — pasted slightly out of chronological order. Untangling that by hand, then hand‑computing 29 sets of start/end seconds and hand‑writing 29 ffmpeg invocations, was fine to do once. Wanting to do it again, correctly, for the next set like this, is why concerto exists.
brew install jonobri/tap/concertoOr from source:
git clone https://github.com/jonobri/concerto
ln -s "$PWD/concerto/concerto" /usr/local/bin/concertoNeeds Python 3.8+ and ffmpeg/ffprobe (brew install ffmpeg). No pip install — stdlib only, so it keeps working in sandboxes and locked‑down environments where you can't add dependencies.
concerto split <tracklist.txt> --source FILE [options]
concerto thumb <youtube-url-or-id> [options]
| Option | Effect |
|---|---|
--source FILE |
the single long audio file (required) |
--cover FILE |
image to embed as cover art |
-o, --output DIR |
output directory (default <artist> - <album>) |
--artist / --album / --date / --genre / --comment |
override the tracklist header |
--bitrate |
bitrate used only if the source isn't already MP3 (default 320k) |
--list, --dry-run |
print the parsed, timed tracklist and stop — cuts nothing |
--json |
same, as JSON |
-q, --quiet |
suppress per-track progress |
| Option | Effect |
|---|---|
-o, --output FILE |
where to write the image (default cover.jpg) |
--square |
center-crop to a square instead of the native 16:9 |
Tries maxresdefault down to default, so you always get the best resolution YouTube actually has for that video.
artist: Fred again.. & Thomas Bangalter
album: USB002 (Alexandra Palace, London, 27 February 2026)
date: 2026-02-27
genre: Electronic
comment: Live DJ set. Source: https://www.youtube.com/watch?v=gfF8jzBVWvM
0:01 Mythologies: X, L'Accouchement x My House
3:16 One More Time x We've Lost Dancing x Ain't No Mountain High Enough
7:37 Hackney Pigeon (Sammy Virji VIP) - Tessela
A key: value header, a blank line, then one TIMESTAMP Title per track. Timestamps are H:MM:SS, M:SS, or bare seconds. artist: and album: are required; date:, genre:, comment:, cover: are optional. Lines starting with # are ignored.
concerto computes each track's end from the next track's start — the last track runs to the end of the source file — and refuses to run if any timestamp isn't strictly after the one before it, naming the two tracks involved.
concerto does not build this file for you. Turning a YouTube description or an artist's footnotes into a clean, chronological, track-only list — dropping commentary, fixing out-of-order lines — is a judgment call, not something to template. See skills/concerto/SKILL.md for how an LLM agent should approach that part; there's also a full worked example of doing exactly that for USB002.
- Parses the tracklist file.
- Validates that start times are strictly increasing — hard stop otherwise.
- Probes the source's duration and audio codec with
ffprobe. - Computes each track's end time and warns if the last one doesn't line up with the source's actual length.
- Cuts each track with
ffmpeg— stream-copied (lossless) if the source is already MP3, re-encoded otherwise. - Embeds cover art, if given, and writes ID3v2 + ID3v1 tags: title, artist, album artist, album, track n/total, date, genre, comment.
- Names files
NN - Title.mp3, zero-padded to the track count.
- It doesn't read the tracklist for you. Feed it a raw footnote dump with commentary lines still mixed in and you'll get commentary lines as tracks — see Why.
- Cuts on non-MP3 sources are re-encoded, not stream-copied — lossy, controlled by
--bitrate. - MP3 stream-copy cuts land on the nearest frame boundary (~26 ms), not a sample-accurate one. Inaudible in a mix; not what you want if you need exact cuts.
- It will happily overwrite files already sitting in the output directory.
MIT © Jonathan O'Brien