Communitygithub.com

YouTube 동영상 텍스트 변환

OpenAI Whisper와 yt-dlp를 사용하여 YouTube 동영상을 텍스트로 변환합니다.

YouTube 동영상 텍스트 변환란 무엇인가요?

이 스킬은 yt-dlp를 사용하여 YouTube 동영상에서 오디오를 다운로드하고 OpenAI Whisper 모델로 텍스트로 변환하는 방법을 제공합니다. 다양한 출력 형식(txt, srt, vtt, json)과 여러 모델 크기(tiny부터 large까지)를 지원하여 정확도와 속도 간의 균형을 맞출 수 있습니다. CLI 및 Python 접근 방식을 모두 지원하며, 특히 yt-dlp와 whisper를 결합한 원라인 파이프라인을 통해 빠른 변환 워크플로우를 제공합니다. 긴 동영상(1시간 이상)에서는 small 또는 medium 모델을 권장하며, 언어를 지정하면 정확도가 크게 향상됩니다. 또한 CUDA GPU를 사용하면 CPU 대비 5~10배 빠른 처리가 가능합니다.

지원 대상~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/TerminalSkills/skills/youtube-transcription

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

YouTube 동영상 텍스트 변환은(는) 무엇을 하나요?

OpenAI Whisper와 yt-dlp를 사용하여 YouTube 동영상을 텍스트로 변환합니다.

개요

이 스킬은 yt-dlp를 사용하여 YouTube 동영상에서 오디오를 다운로드하고 OpenAI의 Whisper 모델로 텍스트로 변환합니다. 다양한 출력 형식(txt, srt, vtt, json)과 여러 모델 크기를 지원하여 정확도/속도 트레이드오프를 조정할 수 있습니다.

지침

1. 종속성 설치

# whisper와 yt-dlp 설치
pip install openai-whisper yt-dlp

# ffmpeg 설치 확인 (오디오 처리에 필요)
ffmpeg -version

ffmpeg가 없으면:

2. YouTube에서 오디오 다운로드

# 최고 오디오 품질을 WAV로 다운로드
yt-dlp -x --audio-format wav -o "%(title)s.%(ext)s" "YOUTUBE_URL"

# MP3로 다운로드 (파일 크기 작음)
yt-dlp -x --audio-format mp3 -o "%(title)s.%(ext)s" "YOUTUBE_URL"

# 비디오 ID를 파일명으로 사용 (특수 문자에 안전)
yt-dlp -x --audio-format wav -o "%(id)s.%(ext)s" "YOUTUBE_URL"

3. Whisper 모델 선택

모델파라미터VRAM상대 속도사용 사례
tiny39M~1 GB~32x빠른 초안, 테스트
base74M~1 GB~16x빠른 텍스트 변환
small244M~2 GB~6x좋은 균형
medium769M~5 GB~2x높은 정확도
large1550M~10 GB1x최고 정확도

영어 전용 모델(tiny.en, base.en, small.en, medium.en)은 영어 콘텐츠에서 더 빠릅니다.

4. 텍스트 변환 실행

CLI 접근 방식:

# 기본 텍스트 변환 (언어 자동 감지)
whisper audio.wav --model medium

# 언어를 지정하여 정확도 향상
whisper audio.wav --model medium --language en

# 특정 출력 형식
whisper audio.wav --model medium --output_format srt

# 모든 형식을 한 번에
whisper audio.wav --model medium --output_format all

# 출력 디렉토리 지정
whisper audio.wav --model medium --output_dir ./transcripts

Python 접근 방식:

import whisper

# 모델 로드 (첫 실행 시 다운로드)
model = whisper.load_model("medium")

# 텍스트 변환
result = model.transcribe("audio.wav", language="en")

# 일반 텍스트 가져오기
print(result["text"])

# 타임스탬프가 포함된 세그먼트 가져오기
for segment in result["segments"]:
    print(f"[{segment['start']:.2f} - {segment['end']:.2f}] {segment['text']}")

5. 원라인 파이프라인

다운로드와 텍스트 변환 결합:

# 한 명령으로 다운로드 및 텍스트 변환
yt-dlp -x --audio-format wav -o "audio.wav" "YOUTUBE_URL" && whisper audio.wav --model medium --output_format all

6. 대안: yt-whisper 도구

더 간단한 워크플로우를 위해 전용 yt-whisper 패키지 사용:

# 설치
pip install git+https://github.com/m1guelpf/yt-whisper.git

# URL에서 직접 텍스트 변환
yt_whisper "https://www.youtube.com/watch?v=VIDEO_ID"

# 옵션 포함
yt_whisper "YOUTUBE_URL" --model medium --language en --output_format srt

출력 형식

형식확장자설명
txt.txt일반 텍스트 변환본
srt.srtSubRip 자막 형식 (타임스탬프 포함)
vtt.vttWebVTT 자막 형식
tsv.tsv탭으로 구분된 값
json.json단어 수준 타임스탬프가 포함된 전체 데이터

예제

지침

  • 음성 언어를 알고 있으면 --language 플래그를 사용하여 정확도를 크게 향상시키세요.
  • 긴 동영상(1시간 이상)의 경우 small 또는 medium 모델을 사용하여 속도와 정확도의 균형을 맞추세요.
  • 영어 전용 모델(.en 접미사)은 영어 콘텐츠에서 더 빠르고 정확합니다.
  • CUDA GPU는 텍스트 변환 속도를 크게 높입니다. CPU도 작동하지만 5~10배 느립니다.
  • 텍스트 변환이 실패하면 ffmpeg가 올바르게 설치되고 PATH에 있는지 확인하세요.
  • 배경 음악이 있는 동영상의 경우 더 큰 모델(medium/large)이 더 잘 처리합니다.
  • 텍스트 변환 후 오디오 파일을 정리하여 디스크 공간을 절약하세요.
  • --output_format all을 사용하여 모든 형식을 한 번에 가져온 후 필요한 것을 선택하세요.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

관련 스킬