Modern Python CLI for archiving YouTube playlists with media-server-friendly sidecar files.
- Python 3.14+
uv- FFmpeg on
PATH - (Recommended) External JavaScript runtime (
denoorNode.js) for full yt-dlp extraction compatibility - (Recommended) Firefox for browser cookie extraction
- (Optional) Rust for setup TUI development
Install with uv (recommended):
uv tool install ytdl-archiverOr with pip:
pip install ytdl-archiverFrom source (development):
git clone https://github.com/htmlgxn/ytdl-archiver.git
cd ytdl-archiver
uv syncytdl-archiver archiveIf ~/.config/ytdl-archiver/config.toml is missing, setup runs automatically on non-help commands and generates:
~/.config/ytdl-archiver/config.toml~/.config/ytdl-archiver/playlists.toml
You can also run setup directly:
ytdl-archiver initEdit ~/.config/ytdl-archiver/playlists.toml:
[[playlists]]
id = "UUxxxxxxxxxxxxxxxxxxxxxx"
path = "Music/Example Channel"
name = "Example Music Channel"
[playlists.download]
format = "bestaudio"
write_subtitles = false
write_thumbnail = trueNotes:
[[playlists]]entries are loaded from theplaylistsarray.- If both
playlists.tomlandplaylists.jsonexist in the config directory, TOML is preferred. - Playlist download overrides accept canonical snake_case keys and yt-dlp-style aliases (for example
write_subtitlesandwritesubtitles).
ytdl-archiver archivearchive: download playlists and generate sidecarsmetadata-backfill: backfill sidecars for already archived IDs in.archive.txtsearch: discover channels/playlists and append selected entries toplaylists.tomlconvert-playlists: convert legacy JSON playlists files to TOMLinit: run interactive setup
Successful archive runs produce:
- Media output (for example
.mp4) - Metadata sidecars:
<stem>.info.jsonand<stem>.metadata.json - Media-server sidecar:
<stem>.nfo(when enabled) - Container policy defaults to max-quality/no-webm outputs (prefers mp4 when quality-tied, otherwise remuxes to mp4/mkv)
- Subtitle sidecars (language-suffixed, for example
<stem>.en.srt) with embedding enabled by default - Thumbnail sidecar (for example
<stem>.jpg) when enabled
ytdl-archiver --help
ytdl-archiver archive --help
ytdl-archiver metadata-backfill --help
ytdl-archiver search --help
ytdl-archiver convert-playlists --help
ytdl-archiver init --help- Docs index:
docs/index.md - CLI reference:
docs/cli.md - Configuration reference:
docs/configuration.md - Terminal output modes:
docs/terminal-output.md - Development/contributing:
docs/development.md - Migration notes:
MIGRATION.md - Release notes (
v0.3.0):docs/releases/0.3.0.md - Changelog:
CHANGELOG.md

