Bỏ qua đến nội dung

Youtube to Anki

Chờ xử lý #anki #addon #youtube
https://github.com/kamui-fin/yt-to-anki/issues
9/6/2024

Cách tải addon Youtube to Anki

Bạn có thể tải addon bằng một trong hai cách sau:

Click nút Copy bên dưới để copy code vào clipboard

964531817

Sau đó mở Anki → Tools → Add-ons → Get Add-ons → Dán code → OK

Mở trang addon trên AnkiWeb và tìm mã code ở cuối trang

Mở trên AnkiWeb

Cuộn xuống cuối trang AnkiWeb, tìm dòng có mã code 964531817 và copy

10
10

Mô tả chi tiết

An Anki addon that generates a full-fledged deck with audio and pictures from a YouTube link using subtitles with the click of a button. This eliminates the need for having to download a video, or the accompanying subtitles, re-timing them, and dealing with TSV files to import. For those of you familiar with Subs2SRS, consider this to be the YouTube version.

This addon offers several features:

Supports all languages Fallback to automatically generated subs if man-made captions could not be found Set a limit to how many cards are generated Choose the dimensions of the pictures Fast card generation

Installation

In Tools > Addons, click Get addon and use the code 964531817 Restart Anki for changes to take place If you are a Linux or Mac user, make sure to install ffmpeg using your package manager.

Usage

Enter the YouTube link for the video Choose the appropriate note type and fields for the card data Specify the subtitle language (default: English) Hit generate. After a bit, refresh your decks, and you should see a deck named after the title of the video

Quality of the subtitles

TL;DR: In order to get the best learning experience, work with the videos that have high-quality manually generated subtitles (e.g., TED talks). Enable the option “Optimize subtitles” to get sentence-based Anki cards: one card per sentence.

The YouTube to Anki (Y2A) extension uses subtitle ranges to cut the corresponding audio fragments out of the downloaded video. If the subtitles are well-crafted by the creators of a YouTube video, the resulting Anki cards will 90%+ perfectly match the audio from the MP3 files generated by the extension.

YouTube’s videos can have automatically and manually generated subtitles.

When a video has manually generated subtitles, it is likely to have:

Capitalized sentences and correct punctuation. Subtitle ranges match the actual sentences as they are spoken on a video. For the manually generated subtitles, the Y2A extension provides an optimization that merges the subtitle texts so that the full sentences are formed, one sentence per one Anki card. The optimization relies on the punctuation found in the subtitles, e.g. ”.”, ”,”, ”?” in order to decide when a sentence should end. The option is enabled with the “Optimize subtitles” flag.

Examples of good YouTube videos that can be used for testing this extension:

The strongest predictor for success | Angela Lee Duckworth Elon Musk: A future worth getting excited about | TED | Tesla Texas Gigafactory interview When a video has automatically generated subtitles, it is most often that the extension cannot produce good Anki cards: the subtitle text will have neither capitalized letters nor punctuation, and therefore the Anki cards will not be sentence-based.

Contributing

All contributions are gladly welcomed! Feel free to open an issue or create a pull request if you have any new changes/ideas in mind.


Liên kết hỗ trợ


Reviews (20)

👍 2026-01-18

I cannot study without this. Thank you.

👍 2024-12-17

Get an error “all 3 fields must be different” … what fields?

👍 2024-09-24

Unfortunately, he still cannot function properly. This is the error I encountered

Anki 24.06.3 (d678e393) (ao) Python 3.9.18 Qt 6.6.2 PyQt 6.6.1 Platform: Windows-10-10.0.22621

Traceback (most recent call last): File “C:\Users\ZHANGQIAN\AppData\Roaming\Anki2\addons21\964531817\worker.py”, line 169, in add_card audiofname = mw.col.media.add_file(subtitle_range.audio_path) File “anki.media”, line 94, in add_file OSError: [Errno 22] Invalid argument: ‘C:\Users\ZHANGQ~1\AppData\Local\

👍 2024-09-01

This add-on worked perfectly to my Anki ver 24.06.3 for a while. But recently below error have occurred: ERROR: unable to download video data: HTTP Error 403: Forbidden. Could you please fix it?

👍 2024-07-09

I’m using Anki ver. 24.04.1 and it works great. This was just what I was looking for! Thanks for creating such a useful add on! Your hard work is greatly appreciated.

👍 2024-06-29

play no role

👍 2024-06-09

It’s not working yet. But it’s a good idea. Perhaps in the future you should reboot the addon to get rid of negative reviews. So far, I don’t like that I need to specify the width and height of the image. I would like to point out one thing. I also didn’t want the addon to generate information for another field, such as the video information + the time range for which the map was generated.

👍 2024-05-28

Windows 11 Version ⁨2.1.66 (70506aeb)⁩ Python 3.9.15 Qt 6.5.2 PyQt 6.5.2 Does not work. The files are downloading. No processing occurs. 0 cards processed in 0 seconds.

👍 2024-05-16

Anki 24.04.1 it’s not working. Error 0 generate cards.

👍 2024-05-12

Does anybody know how to make it work

👍 2024-02-24

This sounded great, but it does not work with the latest version Comment from author Sorry about the delay, just fixed it to support the latest version!

👍 2024-01-28

Sadly does not work with the latest version of Anki (23.12.1) Comment from author It should now support the latest version.

👍 2023-12-28

If you used Brew to install ffmpeg (which I think most technical Mac users will be doing), this addon won’t find it because it doesn’t check the default install location of /opt/homebrew/bin/ffmpeg. Even after copying ffmpeg to a location the addon checks (sudo cp /opt/homebrew/bin/ffmpeg /usr/local/bin/) I unfortunately still hit errors (apparently a directory created during the card creation process wasn’t found).

👍 2023-11-13

So my previous comment, I realized I was hitting a bug where it would crash the app if you were trying to download a youtube video from a playlist. However, now the issue I have now is it won’t generate any anki cards unfortunately. It says it generated 0 cards.

👍 2023-07-26

  1. Instructions say to “set output folder” but there is no field to set output folder.

  2. The cards aren’t created.

👍 2023-07-14

I still don’t understand how to install it on mac, can you elaborate?

👍 2023-06-15

It is very nice. I like it. Thank you very much

👍 2023-04-04

Hey! this is very great work!! I bet you are a very handsome young man!!

👍 2023-03-13

Sigh, it dosen’t work. The deck wasn’t created! Comment from author Hey, could you try again with the latest version? I’ve tested it on different machines and it seems to work fine.

👍 2023-02-18

not working