video-audio-extractor

Extract audio from video files or URLs (including YouTube). Supports MP3, WAV, M4A, FLAC, OGG, and OPUS formats. Can process local video files or download from URLs. For YouTube videos, uses yt-dlp for direct audio extraction when possible.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "video-audio-extractor" with this command: npx skills add kantylee/video-audio-extractor/kantylee-video-audio-extractor-video-audio-extractor

Video Audio Extractor

Extract audio from video files or URLs. Supports various output formats including MP3, WAV, M4A, FLAC, OGG, and OPUS.

Features

  • ✅ Extract audio from local video files
  • ✅ Download and extract from direct video URLs
  • YouTube support - Direct audio extraction (requires yt-dlp)
  • ✅ Multiple output formats with quality control
  • ✅ Automatic cleanup of temporary files

Prerequisites

# Required
brew install ffmpeg

# Optional - for YouTube support
pip3 install yt-dlp

Quick Start

Extract from local file

{baseDir}/scripts/extract-audio.py video.mp4
# Creates: video.mp3

Extract from YouTube

{baseDir}/scripts/extract-audio.py "https://youtube.com/watch?v=..."

Different formats

{baseDir}/scripts/extract-audio.py video.mp4 -f wav    # WAV format
{baseDir}/scripts/extract-audio.py video.mp4 -f m4a    # Apple format
{baseDir}/scripts/extract-audio.py video.mp4 -f flac   # Lossless

Usage

extract-audio.py [-h] [-o OUTPUT] [-f {mp3,wav,m4a,aac,flac,ogg,opus}]
                 [-b BITRATE] [-r SAMPLE_RATE] [--keep-video] [--video-only]
                 input

Options

OptionDescriptionDefault
inputVideo file path or URL(required)
-o, --outputOutput audio file pathAuto-generated
-f, --formatOutput formatmp3
-b, --bitrateAudio bitrate192k
-r, --sample-rateSample rate (Hz)Original
--keep-videoKeep downloaded videoDelete after
--video-onlyDownload video without extractingDisabled

Supported Formats

FormatCodecNotes
MP3libmp3lameBest compatibility
WAVpcm_s16leUncompressed, large files
M4AAACApple ecosystem
FLACFLACLossless compression
OGGVorbisOpen format
OPUSOpusStreaming optimized

Examples

High quality MP3

{baseDir}/scripts/extract-audio.py video.mp4 -b 320k -r 48000

YouTube to M4A

{baseDir}/scripts/extract-audio.py "https://youtu.be/xxxxx" -f m4a

Custom output location

{baseDir}/scripts/extract-audio.py video.mp4 -o ~/Music/my-song.mp3

Download YouTube video (keep it)

{baseDir}/scripts/extract-audio.py "https://youtube.com/watch?v=..." --video-only --keep-video

YouTube Support

For YouTube videos, the tool uses yt-dlp to extract audio directly when possible. This is faster and more efficient than downloading the full video.

YouTube Limitations

YouTube actively blocks automated downloads. If you encounter errors:

  1. Update yt-dlp: pip3 install -U yt-dlp
  2. Try different URLs - Some videos have stricter restrictions
  3. Use --video-only to download the video first, then extract
  4. Browser extension - Use a YouTube downloader extension, then process the file

Common YouTube Errors

  • 403 Forbidden: YouTube blocked the request. Try updating yt-dlp or use a different video.
  • Sign in required: Video requires authentication. Use browser download instead.
  • Timeout: Video too large or connection slow. Try --video-only first.

Technical Details

  • Uses ffmpeg for audio extraction
  • Uses yt-dlp for YouTube downloads
  • Downloads to temporary directory, auto-cleanup by default
  • Preserves original audio codec when possible
  • Progress indicators for long operations

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Maintenance

Maintenance makes home management simple. Record, search, and analyze your data with clear terminal output.

Registry SourceRecently Updated
General

ManualExpert

Professional translator for hardware and technical manuals delivering complete, page-by-page bilingual tables and Word exports for accurate DTP preparation.

Registry SourceRecently Updated
General

Semantic Router

让 AI 代理根据对话内容自动选择最合适的模型。四层识别(系统过滤→关键词→指示词→语义相似度),四池架构(高速/智能/人文/代理),五分支路由,全自动 Fallback 回路。支持 trigger_groups_all 非连续词组命中。

Registry SourceRecently Updated
General

Campaign

Campaign - command-line tool for everyday use

Registry SourceRecently Updated