sleeve

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.

nightjar-quartet-live.webm 2:13:35
one file · no track marks 8 chapters found → 8 tracks
  1. 01Copper Wire6:41
  2. 02Marsh Light9:03
  3. 03Slow Ascent7:28
  4. 04Paper Lantern5:12
  5. 05Ninth of March8:47
  6. 06Tidewrack6:03
  7. 07Heron's Landing9:42
  8. 08Undertow11:16
$ curl -fsSL https://raw.githubusercontent.com/alexnodeland/sleeve/main/install.sh | sh
Source

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.

read the markers the track listing download once best audio, untouched square the art find the bars, then pad cut, tag, embed one file per chapter yt-dlp reads and fetches · ffmpeg cuts, encodes and tags read the markers the track listing download once best audio, untouched square the art find the bars, then pad cut, tag, embed one file per chapter yt-dlp reads and fetches ffmpeg cuts, encodes and tags
One generation

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.

No inherited chapters

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.

Padded, not cropped

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.

as served bars baked in detected the real picture squared padded, never cropped as served bars baked in detected the real picture squared padded, never cropped

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.

FormatCodecCover artApple MusicUse it when
m4aAAC 256k EmbeddedYes The default. Apple-native and plays essentially everywhere.
mp3LAME 320k EmbeddedYes Something old needs to play it — a car stereo, a hardware player.
opusstream copy Beside the tracksNo You want the audio untouched and your player handles Ogg.

Install

Two commands to first album

first
brew install yt-dlp ffmpeg

sleeve drives both. It checks for them at startup rather than failing after a long download.

then
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.

run
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.