audio-extraction
Audio Extraction: Extracting audio from videos, converting formats, and managing audio collections
npx skills add cosmicstack-labs/mercury-agent-skills --skill audio-extraction --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Extract high-quality audio from video files, convert between formats, manage metadata, and build organized audio collections. This skill covers everything from one-off audio rips to batch processing pipelines.
How it works
Provides concrete command sequences and Python/Bash scripts for:
- Audio extraction from videos using yt-dlp and FFmpeg, including format selection (mp3, flac, m4a, opus, wav) and metadata embedding options.
- FFmpeg-based processing for format conversion, trimming, merging, and normalization (EBU R128 and peak methods).
- Metadata tagging with eyeD3 for MP3 and Mutagen for all formats, including batch tagging from filenames.
- Podcast RSS download workflows using yt-dlp and gPodder, plus a custom Python downloader that parses RSS and saves audio enclosures.
- Batch processing of multiple files: directory-wide extraction scripts, recursive traversal, and parallel processing using ThreadPoolExecutor.
- Audio normalization and leveling through FFmpeg filters and a Python wrapper for loudness normalization (EBU R128).
- Splitting audio by chapters via FFprobe/FFmpeg, extracting each chapter to separate files.
- Speech-to-text preparation: extracting mono 16 kHz WAV optimized for transcription.
Each section includes exact command blocks and code samples that an agent would execute to perform the tasks described.
When to use it
Use when you need to:
- Extract audio from videos in preferred formats with options for quality and metadata embedding.
- Convert between MP3, FLAC, M4A, Opus, and WAV, with control over bitrate and quality.
- Tag and organize large audio collections with consistent metadata.
- Download and process podcast episodes via RSS or custom scripts.
- Process large batches of video files efficiently, including parallel processing.
- Normalize loudness and split audio by chapters.
- Prepare audio for speech transcription.
What it can touch
Tools and scripts explicitly referenced:
- yt-dlp
- ffmpeg
- eyeD3
- Mutagen (Python)
- Python scripts (os, subprocess, requests, feedparser, threading)
- gPodder (CLI) depending on usage
- Shell commands and bash loops
- File paths and patterns used in provided examples
Caveats
License: MIT Notes include preserving original sources before transcoding, tagging with metadata, and maintaining organized archives. The skill emphasizes starting from the best available source and clearly tagging and logging actions; no guarantees about output quality beyond following source and format rules.
# Audio Extraction Extract high-quality audio from video files, convert between formats, manage metadata, and build organized audio collections. This skill covers everything from one-off audio rips to batch processing pipelines. ## Core Principles ### 1. Source Quality Determines Output Quality You cannot create quality that wasn't captured. Start with the highest quality source available — lossy-to-lossy transcoding degrades audio further. Always extract from the best original source. ### 2. Choose the Right Format for the Use Case - **MP3** (lossy): Universal compatibility, great for music players and portable devices - **FLAC** (lossless): Archival quality, for listening on quality equipment or future transcoding - **AAC/M4A**: Better quality than MP3 at the same bitrate, native to Apple ecosystem - **OGG/Opus**: Best quality-per-bitrate, perfect for streaming and podcasts - **WAV** (uncompressed): Editing and production, not for everyday listening ### 3. Metadata Is Not Optional Untagged audio files are unmanageable at scale. Proper ID3 tags, cover art, and consistent naming conventions turn a pile of files into a browsable music library. ### 4. Preserve the Original Always kee
- Core Principles
- 1. Source Quality Determines Output Quality
- 2. Choose the Right Format for the Use Case
- 3. Metadata Is Not Optional
- 4. Preserve the Original
- Audio Extraction with yt-dlp
- Basic Audio Extraction
- Format Conversion Options
- Audio-Only Format Selection
- FFmpeg Audio Processing
- Format Conversion
- Trimming Audio
- Merging Audio Files
- Audio Normalization
Simplest audio extraction (best quality) yt-dlp -x "https://youtube.com/watch?v=VIDEO_ID" Specific audio format yt-dlp -x --audio-format mp3 "https://youtube.com/watch?v=VIDEO_ID" Best quality with metadata yt-dlp -x --audio-format mp3 --audio-quality 0 \ MP3 at various quality levels yt-dlp -x --audio-format mp3 --audio-quality 0 "URL" # 320kbps (best) yt-dlp -x --audio-format mp3 --audio-quality 2 "URL" # ~256kbps yt-dlp -x --audio-format mp3 --audio-quality 5 "URL" # ~192kbps (good)
What does the audio-extraction skill do?
Audio Extraction: Extracting audio from videos, converting formats, and managing audio collections
How do I install it?
Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill audio-extraction --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From cosmicstack-labs/mercury-agent-skills, a repository with 364 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.