One long video in.
A tagged album out.
Full albums and concert recordings get posted as a single video, with the track listing living only in the chapter markers. sleeve reads those markers and gives you back an album.
- 01Copper Wire6:41
- 02Marsh Light9:03
- 03Slow Ascent7:28
- 04Paper Lantern5:12
- 05Ninth of March8:47
- 06Tidewrack6:03
- 07Heron's Landing9:42
- 08Undertow11:16
curl -fsSL https://raw.githubusercontent.com/alexnodeland/sleeve/main/install.sh | sh
Needs yt-dlp and ffmpeg. macOS and Linux. MIT or Apache-2.0.
How it works
Four steps, one download
Every track is cut from a single fetch of the source audio, so each one is one encode away from the original rather than two.
Tracks are cut from a single download of the source audio, never from an intermediate file.
Cutting from a transcode would stack a second round of loss on every track.
Each track drops the source's chapter list instead of carrying it along.
Without that, track 3 of an 8-track album advertises all 8 markers and players show it as the whole album — while its duration still looks right.
Cover art is padded out to a square, after any bars already in the thumbnail are removed.
Padding costs background. Cropping costs the picture — and on a title card, it costs the text.
Cover art
The thumbnail is rarely the picture
Uploaders routinely export a square or 4:3 graphic into a 16:9 frame, so the real image is a sub-rectangle of the file. sleeve finds it, crops to it, and only then pads out to a square.
What lands on disk
An album, not a pile of clips
Every tag filled in
Title, artist, album artist, album, date, genre, track n/total, disc and comment — so an album stays one album instead of fragmenting.
Art in every file
Square cover embedded track by track, taken from the video's own thumbnail.
Named to sort
03 - Slow Ascent.m4a, zero-padded to the width of the track count, filed under Artist - Album.
Into Apple Music
One flag hands the finished tracks to your library — through the watched import folder, so no Automation permission is involved.
Look before you download
--list prints the track listing with no download at all. --dry-run shows exactly what would be written.
Tested without the network
93 tests, none of which spawn ffmpeg or reach the internet. The suite finishes in under a second, so it runs on every push.
Formats
Three, and one of them never re-encodes
YouTube's best audio is usually Opus. Asking for Opus out copies that stream straight through, so the result is bit-identical to the source — at the cost of embedded art, which the Ogg container will not carry.
| Format | Codec | Cover art | Apple Music | Use it when |
|---|---|---|---|---|
| m4a | AAC 256k | Embedded | Yes | The default. Apple-native and plays essentially everywhere. |
| mp3 | LAME 320k | Embedded | Yes | Something old needs to play it — a car stereo, a hardware player. |
| opus | stream copy | Beside the tracks | No | You want the audio untouched and your player handles Ogg. |
Install
Two commands to first album
brew install yt-dlp ffmpeg
sleeve drives both. It checks for them at startup rather than failing after a long download.
curl -fsSL https://raw.githubusercontent.com/alexnodeland/sleeve/main/install.sh | sh
Detects your platform, checks the published SHA-256 before installing, and
falls back to ~/.local/bin when /usr/local/bin is not
writable. It never quietly reaches for sudo.
sleeve https://youtu.be/VIDEO_ID
Artist, album and year come from the video title and upload date. Every one of them can be overridden.
Prefer cargo?
cargo install --git https://github.com/alexnodeland/sleeve
Pin a version
SLEEVE_VERSION=v0.1.1 SLEEVE_PREFIX=~/.local
A note on what you rip
sleeve makes your own copies playable and organized. Whether a given video is yours to download is between you, the uploader, and the rights holder.
Titles and artwork come from the uploader's own chapter list and thumbnail, so a rip is a personal-library artifact — not a released album, and it will not match anything in a store.