This mpv script uses the Anilist API to retrieve information about the anime being watched. It attempts to parse the anime title from the filename and when it fails to do so the user can manually search for the correct one.
Info shown as of now:
- Title (Kanji, Romaji, English)
- Studio(s)
- Release year and Season
- Characters and original voice actors
Possibly added in the future:
- Anime staff
- Episode staff
- Dub voice actors
- OP/ED titles and artists
get_anime_info_demo.mp4
Locate your mpv config folder. It is typically found at ~/.config/mpv/ on Linux/MacOS and C:\users\USERNAME\AppData\Roaming\mpv\ on Windows. Files section in mpv's manual for more info. I will refer to the path of this folder as <mpv config directory> for the rest of this file.
To install the mpv script you can use the precompiled binaries without having to install anything else. Otherwise you can setup a python environent to run the script. Binaries have not been thoroughly tested, open an Issue if you encounter any problem.
-
Download the build version matching your system from the Release page and extract its contents
-
Place the
get_anime_infofolder inside thescriptsfolder in<mpv config directory>. If it doesn't exist you should create it. -
If you are on macOS you may need to run the following command in Terminal to allow the system to run the sctipt since it is not signed:
xattr -dr com.apple.quarantine ~/.config/mpv/scripts/get_anime_info/bin
Running the script for the first time might take a while so if nothing seems to happen just wait. Afterwards it should start almost instantly.
-
Download the source code from Release section.
-
Place the
get_anime_infofolder inside thescriptsfolder in<mpv config directory>. If it doesn't exist you should create it.
If you don't already have python 3.10 or above installed on your machine, install it. On Windows make sure python is added to PATH.
Optional: Create and activate a virtual environment named
.mpv_venvin<mpv config directory>. While optional, it is highly reccomended to keep the script isolated from the system python.If you chose a different name for the virtual environment or you want to use a different version of pyhton, open
main.luain a text editor and set thecustom_python_cmdvariable to a string containing your preferred command or path to binary.
Install dependencies (substitute / with \ if you are on Windows)
cd <mpv config directory>
cd scripts/get_anime_info
pip install -r requirement.txt
On mpv, use the keybindings below to start the script. While the script is running, you can use CTRL+f if the results from the automatic title parsing are wrong.
To change the keybindings, add the following lines to your input.conf file after replacing the right part with whatever key combinations you prefer
# get_anime_info
Ctrl+F6 script-binding get_anime_info/cast_info_full
Ctrl+F7 script-binding get_anime_info/cast_info_native
-
cast_info_full: characters and voice actors are shown in romaji -
cast_info_native: characters and voice actors are shown in their native form (Kanji/Katakana/Hiragana/Romaji)
NOTE: If you are not using the standard mpv build, your player might ignore the
input.conffile (e.g. mpv.net, IINA) so you might need to use the in-app options to set the keybindings.
| Name | LICENSE |
|---|---|
| aniparse | Mozilla Public License 2.0 (MPL 2.0) |
| python-mpv-jsonipc (TnTora) forked from python-mpv-jsonipc (iwalton3) |
Apache-2.0 |
| requests | Apache-2.0 |
Binaries are compiled using Nuitka.