Mining from Anime¶
Anacreon mpv Script¶
This is a really fast and recent method to mine from anime. Thanks to using mpv it is also compatible with all video formats unlike a web player like Animebook. Making use of mpv scripting capabilities the script (made by Anacreon from the DJT thread; check out his site here) captures the entire context in the form of sentence, audio and screenshot and adds it to your Anki cards fully automatically. Here is a video demonstration:
- A mining deck set up with Yomichan (you can find a template deck you can use here).
- The mpv player.
mpv (get it here) is a free video player with great scripting capabilities.
- The script itself. The newest version can always be found here: https://mega.nz/folder/349ziIYT#gtEzi4UtnyDVr4_wJAvBlg
- A text hooking page (preferably download it for local access) and clipboard watcher (Chrome or Firefox) (also useful for visual novels).
- (Linux users only) Make sure xclip is installed.
Ensure Yomichan (and the clipboard plugin too) have access to file URLs otherwise Yomichan can't capture text from the text hooking page.
- After installing mpv move the script to the mpv script folder usually at:
C:/Users/Username/AppData/Roaming/mpv/scripts/(If it doesn't exist create it.)
You can reach the appdata folder by simply typing
%appdata%into the address bar or the search.
- Open the script in a text editor and adjust the values to fit your mining deck.
If you are using the template deck above and didn't edit the fields you can copy this to get the correct field information:
------------- User Config ------------- -- Set these to match your field names in Anki local FRONT_FIELD = "front" local SENTENCE_AUDIO_FIELD = "SentenceAudio" local SENTENCE_FIELD = "Sentence" local IMAGE_FIELD = "Picture"
- Don't forget to adjust the path information (
[[Anki2\User 1\collection.media]]) so it matches your Anki user name and links to a valid media folder. The script will not work if this folder is not correctly set.
- You need to have separate fields for word audio and sentence audio in the script settings and on your card format.
For MacOS users: Use jpeg instead of webp in your IMAGE_FORMAT setting and brew install the latest version of MPV.
Windows 7 users: Update to the latest version of PowerShell for proper clipboard insertion.
Set your preferred options for the other settings as well. I like to confirm the audio is correct after capture so I would set
local AUTOPLAY_AUDIO = true but that is mere preference.
- Open the clipboard page and activate the clipboard inserter plugin by clicking on it.
It is advised to use the html page linked above (or here) as other pages may add symbols that break the script on certain browsers.
- Open your anime with mpv and Japanese subtitle.
The subtitles will appear on the html page and you can scan them with Yomichan.
- When there is a word you want to mine, create a card with Yomichan.
- Select the entire sentence/section you want to have as context on your card and copy it.
- Go back into the mpv window and press Ctrl + v
A notification should appear saying that the card got updated. The card should now be updated.
If something did not work try these things:
- Ensure both the fields and the path is correctly set.
- Try updating mpv if you are using an older version.
- Cards can't be updated while selected in the card browser. Exit the card browser and try again.
Animebook is a web video player that displays subtitles next to the video played. The advantage is that you can look up the subtitles directly on the video with Yomichan and that they are displayed next to the video so you don't have to alt tab, but less video formats are supported (although this shouldn't be a problem if you are using a Chromium build with extended codecs).
- For a full overview of video compatibility see here: https://github.com/animebook/animebook.github.io#video-format-support
- Although you can automatically add audio with the animebook extension this only works for one line, for more than one line you can record using ShareX.
- If you don't know how to record audio or take screenshots with ShareX yet see the ShareX setup section.
- If you don't have Yomichan setup yet with a mined card format see the Yomichan setup section.
Usage without Animebook extension¶
- Mine a word using Yomichan
- Copy the sentence and paste it into the sentence field
- Use the sidebar and click on where you would like to start capturing the audio from
- Record the audio using ShareX and paste it into the audio field
- Take a screenshot with ShareX and paste it into the screenshot field
Usage with Animebook extension¶
- See the extension settings page