Skill 详情
openakita/skills@video-downloader
下载YouTube视频,支持可自定义的画质和格式选项,包括仅音频的MP3下载。
使用前先检查
自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。
SKILL.md
这段内容是审核时保存的快照。外部来源才是完整且最新的版本。
---
name: openakita/skills@video-downloader
description: Download YouTube videos with customizable quality and format options. Use this skill when the user asks to download, save, or grab YouTube videos. Supports various quality settings (best, 1080p, 720p, 480p, 360p), multiple formats (mp4, webm, mkv), and audio-only downloads as MP3.
license: MIT
metadata:
author: openakita
version: "1.1.0"
openakita:
python:
dependencies:
- yt-dlp>=2025.6.30
---
# YouTube Video Downloader
Download YouTube videos with full control over quality and format settings.
## Quick Start
The simplest way to download a video:
```powershell
uv run python scripts/download_video.py "https://www.youtube.com/watch?v=VIDEO_ID"
```
This downloads the video in best available quality as MP4 to `./downloads/`, or to
`OPENAKITA_OUTPUT_DIR` when that environment variable is set.
## 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:
```bash
uv run 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:
```bash
uv run python scripts/download_video.py "URL" -f webm
```
### Audio Only
Use `-a` or `--audio-only` to download only audio as MP3:
```bash
uv run python scripts/download_video.py "URL" -a
```
### Custom Output Directory
Use `-o` or `--output` to specify a different output directory:
```bash
uv run python scripts/download_video.py "URL" -o /path/to/directory
```
## Complete Examples
1. Download video in 1080p as MP4:
```bash
uv run python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -q 1080p
```
2. Download audio only as MP3:
```bash
uv run python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -a
```
3. Download in 720p as WebM to custom directory:
```bash
uv run 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:
- Reports a clear installation requirement if `yt-dlp` is unavailable
- 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 `OPENAKITA_OUTPUT_DIR` or `./downloads/` by default
- Video filename is automatically generated from the video title
- Install the dependency with `uv tool install yt-dlp` when it is not managed by OpenAkita
- Only single videos are downloaded (playlists are skipped by default)
- Higher quality videos may take longer to download and use more disk space
在 GitHub 阅读完整来源 (打开外部页面)