Turn any captioned YouTube video into study-ready flashcard assets — one folder per caption line, each containing an audio clip, a video frame, and the subtitle text. Then upload directly to Anki.
- Downloads a YouTube video via
yt-dlp - Extracts captions (manual or auto-generated)
- Splits the video into per-sentence segments
- Saves each segment as a card folder:
card_001/
audio.mp3 — the spoken line
frame.jpg — screenshot from that moment
text.txt — the caption text
- Anki Upload — search through generated cards, select sentences, and upload to Anki with:
- Sentence + audio + screenshot
- Dictionary lookups (German or Japanese)
- Word-level TTS audio
| Language | EN Dictionary | Native Dictionary | TTS Voice |
|---|---|---|---|
| German | dict.cc | DWDS / Wiktionary | Anna (macOS) |
| Japanese | Jisho.org | Kotobank | Kyoko (macOS) |
Source: Resident Evil Requiem #09 (German auto-captions)
Frame:
Text:
gerade glaube ich hier ein bisschen
Audio: Listen to audio clip
- Python 3.10+
yt-dlpffmpeg- Node.js (required for YouTube's JS challenge solver)
- Anki + AnkiConnect (for Anki upload feature)
brew install yt-dlp ffmpeg nodepip install pywebview psutilpython app.pyOr double-click the YouTube to Flashcard.app if you have the built app.
python youtube_to_cards.py "https://www.youtube.com/watch?v=VIDEO_ID"
python youtube_to_cards.py "https://www.youtube.com/watch?v=VIDEO_ID" -o my_cards -l de| Flag | Description | Default |
|---|---|---|
-o, --output |
Output directory | output |
-l, --lang |
Caption language code (e.g. en, de, ja) |
auto-detect |
- Only works with videos that have captions (manual or auto-generated). Videos without captions will show an error.
- Video quality can be set to 480p or 720p in the app to balance download speed and quality.
- If YouTube blocks the download with a bot check, make sure you are logged into YouTube in Chrome. The app automatically uses Chrome cookies for authentication.
- As a fallback, you can export cookies via the "Get cookies.txt LOCALLY" browser extension and load them in the app.
- Auto-generated captions are automatically de-duplicated to remove repeated fragments.



