Converts a YouTube video into Anki Cards.
Takes a YouTube video with audio in your target language and transcript (subtitles) in your native language and converts it into an .apkg
file that can easily be imported into Anki. The Anki cards have the target language audio on the front and the native language transcript on the back. I hope this helps improving your listening comprehension.
The preferred way to install this package is using conda:
conda install youtube-to-anki
You can also install it through pip:
pip install youtube-to-anki
However, when you install this package though pip
, you will have to manually install ffmpeg afterwards.
You can use the command like interface like this:
youtube-to-anki <video_id>
Where <video_id>
can be extracted from a YouTube URL like this:
https://www.youtube.com/watch?v=<video_id>
There are some CLI options you can provide, for example for choosing the transcript language. Check youtube-to-anki --help
for details.
youtube-to-anki produces an .apkg
file, which can easily be imported into Anki. In Anki, just click "File" -> "Import".
youtube-to-anki calls youtube-transcript-api for requesting the video transcripts. If you're unsure what value to provide to the --transcript-language
option, you can list all available languages with youtube_transcript_api --list-transcripts <video_id>
.
- 🇯🇵: Yuzuhiko's Cat Hands EP 280 | Atashin'chi
- 🇩🇪: Nicos Weg – A1 – Folge 3: Tschüss! (here you'll have to set
--transcript-language de
)
If your video ID starts with an -
, e.g. -qAuGimugds
the CLI will try to parse this as an option, which can result in strange errors like this:
youtube-to-anki --transcript-language=de -qAuGimugds
Usage: youtube-to-anki [OPTIONS] VIDEO_ID
Try 'youtube-to-anki --help' for help.
Error: no such option: -q
Instead you will have to separate the CLI options and the video ID with a --
like this:
youtube-to-anki --transcript-language de -- -qAuGimugds