/media-os:media-ytdlp [url]from media-os
Downloads videos, audio, playlists, and channels from YouTube, Twitch, Twitter/X, TikTok, Instagram, Vimeo, Facebook, and 1000+ other sites using yt-dlp. Use when the user asks to download a YouTube video, rip a playlist, grab a Twitch VOD, download audio as MP3, extract subtitles, or archive web video.
Ships in media-os. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Context: $ARGUMENTS
yt-dlp is an actively-maintained fork of youtube-dl. Always prefer it — upstream youtube-dl is effectively dormant and its YouTube extractors break monthly. yt-dlp ships a far larger extractor set (1000+ sites), smarter format selection, throttling work-arounds, SponsorBlock hooks, and native post-processors.
yt-dlp -f "bv*+ba/b" URL → Step 3yt-dlp -f "bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]" URL → Step 3yt-dlp -x --audio-format mp3 --audio-quality 0 URL → Step 3yt-dlp -f "bv*[height<=1080]+ba/b[height<=1080]" URL → Step 2# macOS (Apple Silicon + Intel). Homebrew installs yt-dlp AND ffmpeg cleanly.
brew install yt-dlp ffmpeg
# Or keep yt-dlp on the bleeding edge with pip (extractors break weekly; pip is fastest to refresh)
python3 -m pip install -U yt-dlp
# Verify
yt-dlp --version # e.g. 2025.10.26
ffmpeg -version | head -1
yt-dlp needs ffmpeg on $PATH whenever a site serves video and audio as separate streams (YouTube almost always does). Without ffmpeg the merge step silently fails and you get a video-only or audio-only file.
Update in-place without reinstalling:
yt-dlp -U # binary builds
python3 -m pip install -U yt-dlp # pip installs
yt-dlp -F URL lists every available format (id, ext, resolution, fps, vcodec, acodec, tbr, size). Then build a selector:
| Goal | Selector |
|---|---|
| Absolute best (any codec) | -f "bv*+ba/b" |
| Best MP4 (H.264+AAC) | -f "bv*[ext=mp4][vcodec^=avc1]+ba[ext=m4a]/b[ext=mp4]" |
| Cap resolution | -f "bv*[height<=1080]+ba/b[height<=1080]" |
| Cap filesize (rough) | -f "b[filesize<500M]" |
| Prefer AV1 → VP9 → H.264 | -f "bv*[vcodec=av01]+ba/bv*[vcodec=vp9]+ba/bv*+ba/b" |
| Audio only | -f "ba/b" |
Selector grammar: bv* = best video (incl. muxed), ba = best audio, b = best single muxed file, / = fallback, + = merge. See references/ytdlp.md for filters and sort keys.
# Single URL, best quality, sensible filename.
yt-dlp -f "bv*+ba/b" --restrict-filenames \
-o "%(uploader)s - %(title)s [%(id)s].%(ext)s" URL
# Playlist (each video in its own folder, 3-digit padded index).
yt-dlp -o "%(playlist)s/%(playlist_index)03d - %(title)s.%(ext)s" PLAYLIST_URL
# Entire channel uploads.
yt-dlp 'https://www.youtube.com/@channelname/videos'
# Twitch VOD (works with the direct /videos/ID URL).
yt-dlp -f best 'https://www.twitch.tv/videos/123456789'
# Live stream, from the current start marker (catch-up DVR).
yt-dlp --live-from-start URL
# Audio-only extraction, 320kbps MP3.
yt-dlp -x --audio-format mp3 --audio-quality 0 URL
# Archive mode — skip anything already grabbed. Safe to rerun forever.
yt-dlp --download-archive archive.txt -o "%(uploader)s/%(title)s.%(ext)s" URL
Helper script (scripts/ytdlp.py) wraps common subcommands: check, list-formats, download, playlist, live, audio.
python3 ${CLAUDE_SKILL_DIR}/scripts/ytdlp.py check
python3 ${CLAUDE_SKILL_DIR}/scripts/ytdlp.py download --url URL --quality 1080p --subs
python3 ${CLAUDE_SKILL_DIR}/scripts/ytdlp.py playlist --url URL --outdir ./dl --archive ./dl/archive.txt
yt-dlp's built-in post-processors handle most cases without shelling out to ffmpeg yourself:
# Embed thumbnail + chapter markers + metadata into a single MP4/M4A.
yt-dlp --embed-thumbnail --embed-metadata --embed-chapters URL
# Pull English subtitles (and auto-generated fallback) as .srt, embed into MKV.
yt-dlp --write-subs --write-auto-subs --sub-langs "en.*" \
--convert-subs srt --embed-subs --merge-output-format mkv URL
# Save the full metadata sidecar (handy for pipelines).
yt-dlp --write-info-json --write-description --write-thumbnail URL
# Split a video with chapters into one file per chapter.
yt-dlp --split-chapters URL
For anything beyond embedding (trimming around ads, stitching multiple downloads, re-encoding to a specific codec), hand the output off to another skill:
ffmpeg-cut-concat — trim / concat downloaded clips.ffmpeg-transcode — re-encode to a specific codec / CRF / container.ffmpeg-subtitles — burn or convert subtitle formats.media-whisper — re-transcribe when the site's captions are missing or bad.scripts/ytdlp.py — argparse wrapper around the yt-dlp CLI. Subcommands: check, list-formats, download, playlist, live, audio. Stdlib only, --dry-run and --verbose for safe inspection.references/ytdlp.md when you need the full format-selector grammar, the output-template field list, site-specific quirks (YouTube / Twitch / X / TikTok / IG / Vimeo / FB / Reddit / SoundCloud / Bandcamp), cookie strategies, or the recipe gallery.yt-dlp over youtube-dl. youtube-dl has not had a usable release cadence in years; yt-dlp is the community fork everyone actually uses.bv*+ba/b means "best video + best audio, fallback to best muxed". The * matters — without it you only match non-muxed video.$PATH. On macOS that means brew install ffmpeg (Apple Silicon Homebrew lives at /opt/homebrew/bin; Intel at /usr/local/bin). If ffmpeg is missing, fall back to -f b (single muxed file) or accept a video-only download.--cookies-from-browser chrome (or firefox, safari, edge, brave) — yt-dlp pulls the live session cookie. Manual --cookies cookies.txt also works but the Netscape file format is fiddly.-r 1M caps throughput at 1 MB/s. --sleep-interval 5 --max-sleep-interval 15 randomizes per-request pauses. On large channels / playlists this avoids 429 throttle bans.--live-from-start, yt-dlp begins recording at "now" — you lose everything before you hit enter. With it, yt-dlp walks the HLS playlist back to the stream start.%(playlist_index)03d sorts correctly alongside shell tools; the bare %(playlist_index)s does not.%()s formatting. Useful fields: title, uploader, uploader_id, channel, upload_date (YYYYMMDD), id, ext, height, width, fps, vcodec, acodec, playlist, playlist_index, epoch, timestamp.--restrict-filenames strips shell-unsafe characters (spaces, quotes, slashes, non-ASCII). Recommended for pipelines.--embed-subs works best in MKV (supports SRT/ASS natively). For MP4, subtitles must be converted to mov_text — yt-dlp does this automatically when you combine --embed-subs --merge-output-format mp4.https://twitter.com/user/status/ID (or x.com). Both work; sometimes the x.com extractor lags — fall back to twitter.com if you see extractor errors.--cookies-from-browser even for public posts (anti-bot gating).yt-dlp --list-extractors | grep -i <site> shows every registered extractor. If the site is missing, try --force-generic-extractor — yt-dlp can often pull a naked <video> tag or HLS manifest.--merge-output-format mkv forces MKV when an MP4 merge is impossible (e.g. Opus audio + VP9 video). Prefer MKV over re-encoding.yt-dlp -U or pip install -U yt-dlp. The fix is almost always already shipped on master.--sleep-interval.--no-check-certificate disables TLS verification. Only use it on servers you control that have broken CA trust, and understand the MITM risk. Never use it on a shared laptop.yt-dlp \
--download-archive ./archive.txt \
-f "bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]" \
--merge-output-format mp4 \
--embed-thumbnail --embed-metadata --embed-chapters \
--write-subs --write-auto-subs --sub-langs "en.*" --convert-subs srt \
--restrict-filenames \
-o "%(uploader)s/%(upload_date)s - %(title)s [%(id)s].%(ext)s" \
'https://www.youtube.com/@channelname/videos'
Rerunning the same command is idempotent — archive.txt tracks video IDs already fetched.
yt-dlp -x --audio-format mp3 --audio-quality 0 \
--embed-thumbnail --embed-metadata \
-o "%(playlist)s/%(playlist_index)03d - %(title)s.%(ext)s" \
PLAYLIST_URL
yt-dlp --live-from-start \
-f "bv*+ba/b" \
-o "%(uploader)s - %(title)s - %(upload_date)s.%(ext)s" \
URL
Start this as soon as you notice the stream is live; yt-dlp holds the HLS manifest open until the stream ends.
ERROR: Requested format is not availableCause: selector matched zero formats (common after a site restricts a resolution tier or changes codec availability).
Solution: run yt-dlp -F URL to see what's actually offered, then relax the selector — e.g. drop the [ext=mp4] filter, or fall back to -f b.
ERROR: ffprobe/ffmpeg not foundCause: yt-dlp cannot merge separate video+audio streams, or cannot run an audio-extraction post-processor.
Solution: brew install ffmpeg (macOS) / apt install ffmpeg (Debian) / choco install ffmpeg (Windows). Verify ffmpeg -version on $PATH.
HTTP Error 403: Forbidden or HTTP Error 429: Too Many RequestsCause: the site is rate-limiting or geo-blocking your IP, or the video requires auth.
Solution: add --sleep-interval 5 --max-sleep-interval 30 -r 500K, pass --cookies-from-browser chrome, or route through a VPN. For YouTube specifically, a logged-in cookie often unlocks throttled streams.
ERROR: Unable to extract ... / extractor tracebacksCause: the site changed its page structure; your yt-dlp is out of date.
Solution: yt-dlp -U (binary) or pip install -U yt-dlp. If still broken, check the issue tracker at github.com/yt-dlp/yt-dlp — fixes typically land within days.
Cause: you launched yt-dlp without --live-from-start.
Solution: add --live-from-start. For streams that have already ended, download the VOD instead (YouTube usually publishes one within minutes of end-of-stream).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
video-download, audio-extraction, playlist-ripping, yt-dlp, streaming
npx claudepluginhub damionrashford/media-os --plugin media-os110 skills in this plugin
/audio-coreaudioManipulate macOS audio at the Core Audio HAL layer: afinfo (audio file metadata), afplay (play), afconvert (convert format/rate/bit-depth/channel layout), say (TTS), SwitchAudioSource (change default input/output/system device — brew install switchaudio-osx), audiodevice CLIs (npm/Go variants), AppleScript via osascript to drive System Preferences Sound. HAL plugins at /Library/Audio/Plug-Ins/HAL/ load virtual drivers (BlackHole 2ch/16ch/64ch, Loopback, Background Music). Aggregate Device (drift-corrected multi-in) and Multi-Output Device via Audio MIDI Setup.app or AudioHardwareCreateAggregateDevice. Use when the user asks to change default macOS audio device, route audio between apps on Mac, install BlackHole, build an Aggregate Device, convert audio files with afconvert, or script Mac audio from the terminal.
/audio-jackRoute professional low-latency audio with JACK Audio Connection Kit (jackaudio.org): jackd server (ALSA/CoreAudio/PortAudio/ASIO backends), jack_control (D-Bus JACK2 config), jack_lsp (list ports/connections), jack_connect/jack_disconnect (manage links), jack_cpu_load, jack_samplerate, jack_bufsize (runtime period size), jack_transport, jack_rec (multi-channel WAV recording), jack_iodelay (round-trip latency), jack_wait, jack_midi_dump. JACK1 C maintenance vs JACK2 C++ multicore. Modern Linux swaps jackd for PipeWire's libjack shim — same client API. JackTrip for uncompressed multichannel UDP over the Internet. Use when the user asks to run a JACK server, connect audio clients, measure roundtrip latency, record from JACK ports, set JACK period size, or bridge JACK over the network with JackTrip.
Other plugins' skills for the same job