Skip to content

Repository files navigation

transcriptor_youtube

License: MIT

Download transcripts/subtitles from a YouTube playlist or a single video.

A single static binary — no Python, no API key, no external dependencies.

Install

From source

git clone https://github.com/fabricedge/transcriptor_youtube.git
cd transcriptor_youtube
go build -o yt-transcribe .

From release

Download the pre-built binary for your platform from the Releases page.

File Platform
yt-transcribe-linux-amd64 Linux (x86_64)
yt-transcribe-linux-arm64 Linux (ARM64, e.g. Raspberry Pi)
yt-transcribe-windows-amd64.exe Windows (x86_64)

Usage

yt-transcribe [flags] <url>

Accepts a playlist URL, a single video URL, or a bare video/playlist ID — no quotes needed for & in URLs.

Flags

Flag Default Description
--lang en Subtitle language code
--out transcripts Output directory
--format vtt Output format: vtt, srt, txt
--cookies Path to cookies.txt file
--help Show help

Examples

Transcribe a playlist in English (VTT format):

./yt-transcribe "https://www.youtube.com/playlist?list=PLabc123"
yt-transcribe-windows-amd64.exe "https://www.youtube.com/playlist?list=PLabc123"

Transcribe a single video:

./yt-transcribe "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
yt-transcribe-windows-amd64.exe "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

Transcribe using just the playlist ID (no quotes needed):

./yt-transcribe PLUl4u3cNGP63URZnh5iqBzDTDYPUTQT-8

Transcribe in Portuguese as SRT:

./yt-transcribe --lang pt-BR --format srt "https://www.youtube.com/playlist?list=PLabc123"
yt-transcribe-windows-amd64.exe --lang pt-BR --format srt "https://www.youtube.com/playlist?list=PLabc123"

Transcribe using cookies (for age-restricted videos or to bypass rate limits):

./yt-transcribe --cookies cookies.txt "https://www.youtube.com/playlist?list=PLabc123"
yt-transcribe-windows-amd64.exe --cookies cookies.txt "https://www.youtube.com/playlist?list=PLabc123"

Use cases

Windows

Run

Open Command Prompt or PowerShell in the folder where you saved the .exe:

yt-transcribe-windows-amd64.exe "https://www.youtube.com/playlist?list=PLabc123"

In PowerShell, prefix with .\ if the command doesn't run:

.\yt-transcribe-windows-amd64.exe --lang pt-BR --format srt "https://www.youtube.com/playlist?list=PLabc123"

Add to PATH (run from any folder)

  1. Press Win + R, type sysdm.cpl, press Enter
  2. Go to AdvancedEnvironment Variables
  3. Under System variables, select Path, click Edit
  4. Click New, add the folder path (e.g. C:\Users\You\yt-transcribe)
  5. Click OK on all windows, restart your terminal
  6. Now you can run from anywhere:
yt-transcribe-windows-amd64.exe "https://www.youtube.com/playlist?list=PLabc123"

How it works

  1. If given a playlist URL, fetches the RSS feed to list video IDs. If given a single video URL, uses it directly.
  2. For each video, fetches the transcript via YouTube's InnerTube API using the ANDROID/IOS client (bypasses pot-token restrictions).
  3. Saves each transcript as a timed subtitle file.

Output formats

  • vtt — WebVTT (default, widely supported in HTML5 video players)
  • srt — SubRip (compatible with most media players)
  • txt — Plain text, one line per segment (best for LLMs and further processing)

Troubleshooting

"Sign in to confirm you're not a bot"

Export cookies from your browser logged into YouTube and pass them:

./yt-transcribe --cookies ~/cookies.txt "https://www.youtube.com/playlist?list=..."
yt-transcribe-windows-amd64.exe --cookies C:\Users\You\cookies.txt "https://www.youtube.com/playlist?list=..."

No transcripts found

The video may not have captions in the requested language. Try a different language or check if the video has subtitles.

Limitations

  • Single videos and playlists are both supported.
  • Playlists are limited to the first ~50 videos returned by the RSS feed.
  • Age-restricted videos may require cookies.
  • Depends on YouTube's internal API — may break if YouTube changes their endpoints.

License

MIT

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages