yt-transcript

Extract YouTube video transcripts into Markdown files with metadata.

Updated Dec 9, 2023
One-click install
npx skills add https://github.com/gauravprwl14/dev-environment-setup --skill yt-transcript-gauravprwl14
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: yt-transcript
Source: https://github.com/gauravprwl14/dev-environment-setup/tree/main/skills/yt-transcript
Command: npx skills add https://github.com/gauravprwl14/dev-environment-setup --skill yt-transcript-gauravprwl14

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires youtube-transcript-api, yt-dlp, and includes scripts (resource) components.

What problem does it solve?

Extract transcripts from YouTube videos and convert them into a clean, markdown-formatted document that includes video metadata.

Core Features & Use Cases

  • Primary transcript extraction via youtube-transcript-api with a robust fallback to yt-dlp auto-subtitles.
  • Outputs a self-contained transcript.md containing title, URL, duration, and full transcript ready for documentation or notes.
  • Graceful error handling for invalid URLs and videos without captions, with clear messaging and no file generation when unavailable.

Quick Start

Run the YouTube Transcript Extractor with a YouTube URL to produce transcript.md.

Frequently Asked Questions about yt-transcript

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract a YouTube transcript to Markdown?

To extract a YouTube transcript to Markdown, supply a video URL. The tool fetches captions via youtube-transcript-api and outputs a transcript.md file containing video metadata and text.

What happens if a YouTube video has no subtitles or captions?

If a YouTube video lacks captions, the tool attempts a fallback using yt-dlp auto-subtitles. If unavailable, it reports missing captions gracefully without generating a file.

Can I use yt-dlp as a fallback for extracting YouTube video transcripts?

Yes, you can use yt-dlp as a fallback. When the primary youtube-transcript-api fails, the tool automatically fetches auto-subtitles using yt-dlp to ensure successful transcript extraction.

Does the YouTube transcript extractor include video metadata in the output?

Yes, the YouTube transcript extractor includes video metadata in the output. The generated Markdown file contains the video title, URL, duration, and the full transcript text.

How are invalid URLs handled when extracting YouTube subtitles?

Invalid URLs are handled gracefully during YouTube subtitle extraction. The tool detects invalid links and reports a clear error message without generating any output files.

Where does the YouTube transcript Markdown file get saved?

The YouTube transcript Markdown file is saved to a date-based slug directory. This directory is created under the configured CONTENT_PIPELINE_OUTPUT environment variable.