Get the FREE Ultimate OpenClaw Setup Guide →

youtube-downloader

npx machina-cli add skill ComposioHQ/awesome-claude-skills/video-downloader --openclaw
Files (1)
SKILL.md
2.6 KB

YouTube Video Downloader

Download YouTube videos with full control over quality and format settings.

Quick Start

The simplest way to download a video:

python scripts/download_video.py "https://www.youtube.com/watch?v=VIDEO_ID"

This downloads the video in best available quality as MP4 to /mnt/user-data/outputs/.

Options

Quality Settings

Use -q or --quality to specify video quality:

  • best (default): Highest quality available
  • 1080p: Full HD
  • 720p: HD
  • 480p: Standard definition
  • 360p: Lower quality
  • worst: Lowest quality available

Example:

python scripts/download_video.py "URL" -q 720p

Format Options

Use -f or --format to specify output format (video downloads only):

  • mp4 (default): Most compatible
  • webm: Modern format
  • mkv: Matroska container

Example:

python scripts/download_video.py "URL" -f webm

Audio Only

Use -a or --audio-only to download only audio as MP3:

python scripts/download_video.py "URL" -a

Custom Output Directory

Use -o or --output to specify a different output directory:

python scripts/download_video.py "URL" -o /path/to/directory

Complete Examples

  1. Download video in 1080p as MP4:
python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -q 1080p
  1. Download audio only as MP3:
python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -a
  1. Download in 720p as WebM to custom directory:
python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -q 720p -f webm -o /custom/path

How It Works

The skill uses yt-dlp, a robust YouTube downloader that:

  • Automatically installs itself if not present
  • Fetches video information before downloading
  • Selects the best available streams matching your criteria
  • Merges video and audio streams when needed
  • Supports a wide range of YouTube video formats

Important Notes

  • Downloads are saved to /mnt/user-data/outputs/ by default
  • Video filename is automatically generated from the video title
  • The script handles installation of yt-dlp automatically
  • Only single videos are downloaded (playlists are skipped by default)
  • Higher quality videos may take longer to download and use more disk space

Source

git clone https://github.com/ComposioHQ/awesome-claude-skills/blob/master/video-downloader/SKILL.mdView on GitHub

Overview

Download YouTube videos with customizable quality and format options. It supports best, 1080p, 720p, 480p, 360p, and worst quality, and formats including mp4, webm, and mkv, plus audio-only MP3 downloads. The tool uses yt-dlp to fetch video info, select the best streams, and merge audio/video when needed, saving files to /mnt/user-data/outputs/ with filenames based on the video title.

How This Skill Works

The skill relies on yt-dlp, which it will automatically install if missing. It retrieves video metadata, then selects the best streams that match your -q and -f criteria, merging audio and video as needed. It supports a wide range of YouTube formats and writes the output to the default directory.

When to Use It

  • You want to download a YouTube video in a specific quality (e.g., 1080p) for offline viewing.
  • You need an audio-only MP3 version for music, podcasts, or ringtones.
  • You want to save in a particular container (MP4, WebM, or MKV) for compatibility or editing.
  • You want to download to a custom directory for a project workflow.
  • You want to avoid playlists and download only a single video (playlists are skipped by default).

Quick Start

  1. Step 1: Run the script with a YouTube URL: python scripts/download_video.py "URL"
  2. Step 2: Add -q, -f, or -a to tailor quality, format, or audio-only output
  3. Step 3: Use -o to set a custom output directory, or omit for the default /mnt/user-data/outputs/

Best Practices

  • Verify the YouTube URL before starting to avoid failed downloads.
  • Choose a quality that matches your device and bandwidth (best, 1080p, 720p, 480p, 360p).
  • Use -a for audio-only MP3 when you need smaller files or audio-focused content.
  • Prefer mp4 for broad compatibility across players and platforms.
  • Rely on yt-dlp installation being automatic to keep the setup simple.

Example Use Cases

  • Download 1080p video as MP4: python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -q 1080p
  • Download audio only as MP3: python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -a
  • Download 720p WebM to a custom directory: python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -q 720p -f webm -o /custom/path
  • Download best available quality as MP4 (default): python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -q best
  • Use default settings to save to the standard output directory: python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers