https://github.com/katspaugh/youtube-flashcards
Extract screenshots & audio clips from YouTube videos into Anki cards
https://github.com/katspaugh/youtube-flashcards
language-learning
Last synced: 3 months ago
JSON representation
Extract screenshots & audio clips from YouTube videos into Anki cards
- Host: GitHub
- URL: https://github.com/katspaugh/youtube-flashcards
- Owner: katspaugh
- Created: 2016-05-25T08:19:31.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2022-01-04T22:56:13.000Z (over 4 years ago)
- Last Synced: 2024-10-29T16:02:52.736Z (over 1 year ago)
- Topics: language-learning
- Language: Shell
- Homepage:
- Size: 17.6 KB
- Stars: 65
- Watchers: 5
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# YouTube Flashcards
Extract screenshots & audio clips from YouTube videos into Anki cards.
### 📖 [使い方(日本語で)](http://rs.luminousspice.com/anki-card-from-youtobe-caption/)
## Installation
You'll need to install `youtube-dl` and `ffmpeg`:
```
brew install youtube-dl ffmpeg
```
## Usage
### Download
First, download a video that you know has subtitles in your target language:
```
./download.sh 'https://www.youtube.com/watch?v=5P3Tb_v-KnY'
```
That will download the video and subs into the `./downloads` folder.
### Extract
Next, extract the cards (it may take a while):
```
./extract.sh downloads/Frau_Holle.mp4 downloads/Frau_Holle.de.vtt downloads/Frau_Holle.en.vtt > cards.tsv
```
The parameters are:
* The video file
* The subtitles file in your target language
* Optionally: the subtitles file in your native language
### Import
Finally, import the cards into Anki:
* Copy the audio and image files from `./output` to your Anki media collection folder.
* Import the cards TSV into a deck. There are 4 fields in the TSV: original subtitle, translated subtitle, image and audio.

## Offline videos
You can also create cards from local files other than from YouTube. The script requires that the subtitles are in the VTT format. To convert from SRT and other formats, use http://www.webvtt.org/ or https://github.com/nwoltman/srt-to-vtt-converter.