home / skills / steipete / agent-scripts / video-transcript-downloader

video-transcript-downloader skill

/skills/video-transcript-downloader

This skill downloads videos, audio, subtitles, and clean transcripts from YouTube and other supported sites for easy saving and reading.

npx playbooks add skill steipete/agent-scripts --skill video-transcript-downloader

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
2.3 KB
---
name: video-transcript-downloader
description: Download videos, audio, subtitles, and clean paragraph-style transcripts from YouTube and any other yt-dlp supported site. Use when asked to “download this video”, “save this clip”, “rip audio”, “get subtitles”, “get transcript”, or to troubleshoot yt-dlp/ffmpeg and formats/playlists.
---

# Video Transcript Downloader

`./scripts/vtd.js` can:
- Print a transcript as a clean paragraph (timestamps optional).
- Download video/audio/subtitles.

Transcript behavior:
- YouTube: fetch via `youtube-transcript-plus` when possible.
- Otherwise: pull subtitles via `yt-dlp`, then clean into a paragraph.

## Setup

```bash
cd ~/Projects/agent-scripts/skills/video-transcript-downloader && npm ci
```

## Transcript (default: clean paragraph)

```bash
./scripts/vtd.js transcript --url 'https://…'
./scripts/vtd.js transcript --url 'https://…' --lang en
./scripts/vtd.js transcript --url 'https://…' --timestamps
./scripts/vtd.js transcript --url 'https://…' --keep-brackets
```

## Download video / audio / subtitles

```bash
./scripts/vtd.js download --url 'https://…' --output-dir ~/Downloads
./scripts/vtd.js audio --url 'https://…' --output-dir ~/Downloads
./scripts/vtd.js subs --url 'https://…' --output-dir ~/Downloads --lang en
```

## Formats (list + choose)

List available formats (format ids, resolution, container, audio-only, etc):

```bash
./scripts/vtd.js formats --url 'https://…'
```

Download a specific format id (example):

```bash
./scripts/vtd.js download --url 'https://…' --output-dir ~/Downloads -- --format 137+140
```

Prefer MP4 container without re-encoding (remux when possible):

```bash
./scripts/vtd.js download --url 'https://…' --output-dir ~/Downloads -- --remux-video mp4
```

## Notes

- Default transcript output is a single paragraph. Use `--timestamps` only when asked.
- Bracketed cues like `[Music]` are stripped by default; keep them via `--keep-brackets`.
- Pass extra `yt-dlp` args after `--` for `transcript` fallback, `download`, `audio`, `subs`, `formats`.

```bash
./scripts/vtd.js formats --url 'https://…' -- -v
```

## Troubleshooting (only when needed)

- Missing `yt-dlp` / `ffmpeg`:

```bash
brew install yt-dlp ffmpeg
```

- Verify:

```bash
yt-dlp --version
ffmpeg -version | head -n 1
```

Overview

This skill downloads videos, audio, subtitles, and produces cleaned paragraph-style transcripts from YouTube and any site supported by yt-dlp. It prioritizes direct transcript APIs for YouTube and falls back to yt-dlp subtitle extraction with cleanup. Use it to fetch media, inspect available formats, or generate readable transcripts for research or archiving.

How this skill works

The tool queries YouTube transcript services when available to produce a single clean paragraph (timestamps optional). If that fails it uses yt-dlp to extract subtitles, then normalizes and strips bracketed cues by default. It also exposes commands to list formats, download chosen format ids, remux containers when possible, and extract audio or specific subtitle languages.

When to use it

  • Save a video or audio file from YouTube or any yt-dlp-supported site.
  • Generate a readable transcript without timestamps for note-taking or summaries.
  • Download subtitles or specific language tracks for accessibility or translation work.
  • List and choose specific format ids or container options before downloading.
  • Troubleshoot format, ffmpeg, or yt-dlp issues when downloads fail.

Best practices

  • Keep default transcript output (single paragraph) unless timestamps are required for reference.
  • Use --keep-brackets only when you need non-speech cues like [Music] preserved.
  • List available formats first to pick an exact format id for quality or size control.
  • Pass additional yt-dlp args after -- to adjust behavior without changing the tool.
  • Prefer remuxing to MP4 to avoid unnecessary re-encoding when compatible.

Example use cases

  • Download a full lecture video and generate a single-paragraph transcript for quick review.
  • Extract podcast audio from a hosted video and save as an audio file for offline listening.
  • Fetch English subtitles for a foreign-language clip for translation or study.
  • List available formats for a long playlist and download selected resolution/audio combinations.
  • Recover a transcript when the native transcript API is unavailable by falling back to subtitle extraction and cleanup.

FAQ

What if yt-dlp or ffmpeg is missing?

Install them (for example via brew install yt-dlp ffmpeg) and verify with yt-dlp --version and ffmpeg -version.

How do I keep timestamps in transcripts?

Use the --timestamps flag when running the transcript command to include timestamps.

Can I pass custom yt-dlp options?

Yes. Add extra yt-dlp arguments after --; they apply to transcript fallback, download, audio, subs, and formats commands.