YouTube transcripts via yt-dlp audio + Whisper transcription

2026-03-07 · tools-infrastructure knowledge-management · medium · source → · wiki →
key claims
  1. YouTube delivers audio and video streams via the same CDN infrastructure; cloud IP restrictions that block `yt-dlp` video downloads also block `yt-dlp` audio-only downloads from GitHub Actions runners running on AWS IP ranges
  2. As of 2024–2025, yt-dlp downloads from cloud/datacenter IPs (including GitHub Actions) are actively blocked by YouTube, producing HTTP 403 errors or "Sign in to confirm you're not a bot" challenges, regardless of whether the requested format is video or audio
  3. The only currently identified workaround that avoids paid third-party infrastructure is passing browser-exported cookies to yt-dlp via `--cookies`, stored as a base64-encoded GitHub Actions secret — but this requires periodic manual maintenance as cookies expire within weeks to months
  4. Using vanilla `openai-whisper` with the `small` model on a CPU-only GitHub Actions runner, transcribing a 60-minute audio file takes approximately 72–120 minutes — not the "3–5 minutes" estimated in the original item, which appears to assume GPU availability
  5. `faster-whisper` with int8 quantization delivers 4–7x speedup over vanilla `openai-whisper` on CPU, reducing the same 60-min audio to ~7–15 minutes of runner time, making the approach economically viable on the free Actions tier
  6. The Whisper `small` model achieves 3.2–3.4% WER on clean English speech; `medium` achieves 2.7–2.9% WER — a 0.5–0.7 percentage point improvement that widens for noisy or accented audio but is modest for well-recorded English talks
  7. The `small` model requires ~461 MB download; `medium` requires ~1.5 GB. Both should be cached via `actions/cache` to avoid re-downloading on every workflow run
  8. Option B (OpenAI Whisper API at `whisper-1`, $0.006/min) requires `OPENAI_API_KEY`, which is not in the AGENTS.md approved credentials table; it cannot be implemented without explicit owner approval

Research Question

Can we bypass YouTube's IP-based transcript block by downloading the audio track with yt-dlp (a different endpoint from the transcript API) and then transcribing it with OpenAI Whisper?

Findings

Executive Summary

The hypothesis that yt-dlp audio CDN downloads are less restricted than the transcript API on GitHub Actions IPs is false: audio and video both traverse the same YouTube CDN infrastructure and are subject to the same cloud IP block. This means the proposed fallback chain (caption fetch fails → audio download → local Whisper) fails at the second step from any GitHub Actions runner. If the audio download barrier is cleared — most likely via browser cookies stored as a GitHub secret — faster-whisper with int8 quantization on the small model provides a practical transcription path (~7–15 min per 60-min talk, free). Option B (Whisper API) is blocked by the credential gate: OPENAI_API_KEY is not an approved credential.

Key Findings

  1. [high] YouTube delivers audio and video streams via the same CDN infrastructure; cloud IP restrictions that block yt-dlp video downloads also block yt-dlp audio-only downloads from GitHub Actions runners running on AWS IP ranges.
  2. [high] As of 2024–2025, yt-dlp downloads from cloud/datacenter IPs (including GitHub Actions) are actively blocked by YouTube, producing HTTP 403 errors or "Sign in to confirm you're not a bot" challenges, regardless of whether the requested format is video or audio.
  3. [high] The only currently identified workaround that avoids paid third-party infrastructure is passing browser-exported cookies to yt-dlp via --cookies, stored as a base64-encoded GitHub Actions secret — but this requires periodic manual maintenance as cookies expire within weeks to months.
  4. [high] Using vanilla openai-whisper with the small model on a CPU-only GitHub Actions runner, transcribing a 60-minute audio file takes approximately 72–120 minutes — not the "3–5 minutes" estimated in the original item, which appears to assume GPU availability.
  5. [high] faster-whisper with int8 quantization delivers 4–7x speedup over vanilla openai-whisper on CPU, reducing the same 60-min audio to ~7–15 minutes of runner time, making the approach economically viable on the free Actions tier.
  6. [medium] The Whisper small model achieves 3.2–3.4% WER on clean English speech; medium achieves 2.7–2.9% WER — a 0.5–0.7 percentage point improvement that widens for noisy or accented audio but is modest for well-recorded English talks.
  7. [high] The small model requires ~461 MB download; medium requires ~1.5 GB. Both should be cached via actions/cache to avoid re-downloading on every workflow run.
  8. [high] Option B (OpenAI Whisper API at whisper-1, $0.006/min) requires OPENAI_API_KEY, which is not in the AGENTS.md approved credentials table; it cannot be implemented without explicit owner approval.
  9. [medium] The OpenAI Whisper API whisper-1 model is equivalent in quality to large-v2 locally, delivering higher accuracy than any local model size runnable on GitHub Actions CPU within a reasonable time budget.
  10. [medium] Third-party transcript APIs (the companion backlog item 2026-02-28-transcript-via-third-party-apis.md) sidestep the cloud IP block entirely and may offer a better cost/complexity tradeoff than maintaining YouTube cookies in a GitHub secret.

Assumptions

Analysis

The evidence converges on a clear conclusion: the hypothesis is false, and the proposed architecture cannot work without first solving the same cloud IP block problem that the transcript API approach already fails on.

The yt-dlp + Whisper approach has genuine merit as a Tier 2 fallback if audio download succeeds — the faster-whisper int8 optimisation resolves the runtime concern entirely, and the small model accuracy is adequate for research transcription. The approach becomes viable under one of: (a) the cookies workaround is accepted by the owner with its maintenance requirements; (b) a third-party proxy is interposed; or (c) YouTube's blocking policy changes.

The original item's runtime estimate ("~3–5 min for a 60-min talk on a free GitHub runner") deserves correction: it appears to have assumed GPU availability. The ubuntu-latest free runner is CPU-only, and vanilla whisper-small takes 72–120 minutes on that hardware. faster-whisper resolves this but was not mentioned in the original design. Any implementation should use faster-whisper, not openai-whisper.

Option B was correctly identified as the simpler path, but it introduces an unapproved credential. The cost ($0.36/hour) is low enough to be acceptable for a personal research workflow, but the credential gate must be addressed first.

Risks, Gaps, and Uncertainties

Open Questions


Open Questions


sources

Connected items

Loading…

View full knowledge graph →