youtube-extract-transcript

Extract and clean YouTube video transcripts via API, Whisper, or OCR.

Updated Jul 1, 2024
One-click install
npx skills add https://github.com/yongseongkim/sunrei --skill youtube-extract-transcript
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: youtube-extract-transcript
Source: https://github.com/yongseongkim/sunrei/tree/main/.claude/skills/youtube-extract-transcript
Command: npx skills add https://github.com/yongseongkim/sunrei --skill youtube-extract-transcript

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires youtube-transcript-api, python-dotenv, yt-dlp, openai-whisper, easyocr, opencv-python-headless, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the extraction and cleaning of transcripts from YouTube videos, making video content more accessible and processable for further analysis or workflow integration.

Core Features & Use Cases

  • Automated Transcript Extraction: Leverages YouTube Data API and fallback methods like Whisper and OCR for robust transcript retrieval.
  • Intelligent Cleaning: Corrects auto-generated errors, removes noise, fixes formatting, and preserves timestamps.
  • Use Case: Automatically process a YouTube video to get a clean, accurate transcript, which can then be used to identify key locations mentioned in the video for a travel application.

Quick Start

Extract and clean the transcript for the YouTube video with ID 'VIDEO_ID'.

Frequently Asked Questions about youtube-extract-transcript

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

FAQPage Schema
How do I extract and clean a YouTube video transcript automatically?

To extract a YouTube transcript automatically, this Skill uses the YouTube Data API for direct retrieval and applies intelligent cleaning to fix auto-generated errors, remove noise, and preserve timestamps. It handles rate limiting and provides context-aware corrections for accurate text output.

What is the best way to get captions from a YouTube video without subtitles?

When standard YouTube captions are unavailable, extracting transcripts requires fallback methods like Whisper for audio transcription or EasyOCR for on-screen text. This Skill integrates these tools to ensure you can retrieve video text even without native subtitle tracks.

Do I need a YouTube Data API key to use this transcript extraction tool?

Yes, you need a YouTube Data API key for the full transcript extraction workflow. The Skill uses this key for direct API calls to retrieve captions and requires environment configuration via python-dotenv to manage your credentials securely.

How does OCR work for extracting on-screen text from YouTube videos?

OCR extracts on-screen text from YouTube videos by analyzing video frames using EasyOCR and OpenCV. This Skill leverages OCR as a fallback mechanism to capture visible text overlays when audio transcription or direct caption APIs are insufficient.

Why does YouTube transcript extraction fail and how can I handle rate limiting?

YouTube transcript extraction can fail due to API rate limiting or missing caption tracks. This Skill handles rate limiting with error fallbacks, automatically switching to Whisper or OCR methods to ensure continuous text extraction without interruptions.

Can I use Whisper to transcribe YouTube audio when the API fails?

Yes, you can use Whisper to transcribe YouTube audio as a fallback. When the direct YouTube transcript API fails or lacks captions, this Skill utilizes yt-dlp to download the video and OpenAI Whisper to generate an accurate transcript from the audio track.