Bootleg-Link Skill
DJ music downloader - Downloads music from YouTube channels/playlists and converts to high-quality MP3.
What It Does
Download music from YouTube channels or playlists, convert to 320kbps MP3 with metadata, and manage batch downloads with resume capability.
Features
- - Batch Download: Process multiple channels/playlists from a text file
- Resume Support: Skip already downloaded videos using INLINECODE0
- High Quality: Convert to 320kbps MP3 with thumbnail embedding
- Smart Deduplication: Automatically skip previously downloaded content
- Concurrent Download: Utilize multiple CPU cores for parallel downloads
Usage
Single Channel/Playlist
CODEBLOCK0
Batch Mode
CODEBLOCK1
Resume Interrupted Download
CODEBLOCK2
Custom Output Directory
CODEBLOCK3
Configuration
Environment Variables
| Variable | Default | Description |
|---|
| INLINECODE1 | INLINECODE2 | Default output directory |
| INLINECODE3 |
320 | MP3 bitrate (128, 192, 256, 320) |
|
BOOTLEG_CONCURRENCY |
8 | Number of concurrent downloads |
|
BOOTLEG_ARCHIVE_FILE |
download-archive.txt | File to track downloaded videos |
Link File Format (.bootleg-link.txt)
CODEBLOCK4
Advanced Options
CPU-Based Concurrency
Automatically adjusts based on CPU cores:
| CPU Cores | Videos | Fragments per Video |
|---|
| 4 | 2 | 2 |
| 8 |
4 | 4 |
| 16 | 8 | 4 |
| 32+ | 16 | 8 |
Use -N for concurrent videos and --concurrent-fragments for per-video parallelism.
Custom Filename Template
CODEBLOCK5
Audio Format Options
CODEBLOCK6
Troubleshooting
JS Challenge Error
If YouTube JS challenge decryption fails, it falls back to format 251 (opus 128kbps) - still good quality.
Network Timeout
Auto-retries on timeout. For persistent issues, increase
--socket-timeout.
Rate Limiting
Add
--sleep-interval between downloads:
CODEBLOCK7
Dependencies
- - yt-dlp: YouTube downloader
- ffmpeg: Audio conversion
- mutagen (optional): For metadata embedding
Installation
CODEBLOCK8
Example Output
CODEBLOCK9
Notes
- - Uses
--download-archive to track downloaded videos - Automatically creates playlist-named subdirectories
- Embeds thumbnail as album art in MP3 files
- Run again with same output dir to resume seamlessly
Bootleg-Link 技能
DJ音乐下载器 - 从YouTube频道/播放列表下载音乐并转换为高质量MP3。
功能概述
从YouTube频道或播放列表下载音乐,转换为带元数据的320kbps MP3,并支持断点续传的批量下载管理。
特色功能
- - 批量下载:通过文本文件处理多个频道/播放列表
- 断点续传:使用--download-archive跳过已下载视频
- 高质量输出:转换为320kbps MP3并嵌入缩略图
- 智能去重:自动跳过先前已下载的内容
- 并发下载:利用多CPU核心进行并行下载
使用方法
单个频道/播放列表
bash
bootleg-link https://www.youtube.com/@VeryHouseMusic
批量模式
bash
bootleg-link --batch /path/to/channels.txt
恢复中断的下载
bash
bootleg-link --batch /path/to/output/directory
自定义输出目录
bash
bootleg-link https://www.youtube.com/@ChannelName -o /path/to/output
配置说明
环境变量
| 变量 | 默认值 | 描述 |
|---|
| BOOTLEGOUTPUTDIR | /mnt/e/bootleg-link-downloader/output | 默认输出目录 |
| BOOTLEG_QUALITY |
320 | MP3比特率(128、192、256、320) |
| BOOTLEG_CONCURRENCY | 8 | 并发下载数量 |
| BOOTLEG
ARCHIVEFILE | download-archive.txt | 记录已下载视频的文件 |
链接文件格式(.bootleg-link.txt)
https://www.youtube.com/@Channel1
https://www.youtube.com/playlist?list=PLxxx
https://www.youtube.com/@Channel2
高级选项
基于CPU的并发控制
根据CPU核心数自动调整:
4 | 4 |
| 16 | 8 | 4 |
| 32+ | 16 | 8 |
使用-N控制并发视频数,--concurrent-fragments控制每视频并行度。
自定义文件名模板
bash
--output-template %(title)s.%(ext)s
音频格式选项
bash
--format bestaudio --extractor-args youtube:player_client=android
故障排除
JS挑战错误
如果YouTube JS挑战解密失败,将回退到格式251(opus 128kbps)——音质仍然不错。
网络超时
自动重试超时连接。对于持续性问题,请增加--socket-timeout。
速率限制
在下载之间添加--sleep-interval:
bash
bootleg-link --batch . --sleep-interval 5
依赖项
- - yt-dlp:YouTube下载器
- ffmpeg:音频转换
- mutagen(可选):用于元数据嵌入
安装方法
bash
安装依赖
pip install yt-dlp mutagen
赋予可执行权限(如果作为脚本提供)
chmod +x bootleg-link
输出示例
[download] 正在下载频道:VeryHouseMusic
[download] 频道共有9926个视频
[download] 已下载:388 / 9926(3.9%)
[download] 开始下载剩余9538个视频...
[download] 输出目录:/mnt/e/bootleg-link-downloader/output/house(VeryHouseMusic Dump)/
注意事项
- - 使用--download-archive记录已下载视频
- 自动创建以播放列表命名的子目录
- 将缩略图作为专辑封面嵌入MP3文件
- 使用相同输出目录再次运行即可无缝续传