Important
This project is archived as of February 23, 2026.
No further updates or maintenance.
I'm now developing a completely new version in Go. with better architecture, more features, and improved UX/UI.
→ Check out the successor project:
hianime-cli
A CLI Python tool for streaming anime from hianime.to—the standout site for its superior soft-subbed episodes—straight into your local MPV player. Unlike other anime platforms, this lets you override them with your own, especially people want to use Japanese originals sub fetched via the Jimaku API. Perfect for people wants a lightweight hianime MPV extension with series pinning, history tracking, and seamless multi-language subtitle swaps.
This tool is for educational and personal use only. It demonstrates web scraping and media integration techniques—use responsibly, respect site terms of service, and be mindful of copyrights. I'm not affiliated with any third-party sites or services.
This code was mostly written with AI assistance. I just gave the idea for what to build, then handled some code tweaks and cleanup. It's great for people who want to importing subtitles in other languages and using MPV extensions for hianime.
cli-demo.mp4
- Huge thanks to the MediaVanced repo—this project wouldn't have been possible without it!
- And big props to aniyomi-extensions for the inspiration.
- 📌 Pin Series: Save your favorites for quick access.
- 📺 Recent History: Pick up where you left off.
- 🌐 Jimaku API Integration: Fetch and import Japanese subtitles.
Pair this tool with these for an even better experience:
- For automatic subtitle syncing with the English subs from hianime.to, check out AutoSubSync-MPV. It handles unsync subs automatically. Select to 'Sync to another subtitle' then select the sub_english_temp..srt (It should be in the last order and the format is .srt).
- Python 3.12+
- MPV player (install via official site) and add to PATH. Test with
mpv --version - yt-dlp (download the latest release here place
yt-dlp.exein the same directory as MPV or another PATH directory) - FFmpeg (install via official site or with
winget install ffmpeg) and add to PATH. Test withffmpeg -version - Key libraries (via
requirements.txt): requests (for APIs), beautifulsoup4 (for parsing), etc. Full list inrequirements.txt
git clone https://github.com/dhilzyi/hianime-with-local-mpv.gitcd hianime-with-local-mpvpip install -r requirements.txt
python hianime.pyUse python hianime.py --command as you can print the raw mpv command for debugging such as using another command mpv.
- Paste an anime URL (e.g., https://hianime.to/watch/one-piece-100).
- Select options like episode, or 'p' to pin to series.
- Choose servers manually or automatically.
- Set your directory for downloaded subtitle in variable SUBTITLE_BASE_DIR. It is "F:/Subtitle" as a default.
- Set your JIMAKU_API_KEY in environment variables.
- Turn on/off Jimaku in config.json by setting "jimaku_enabled": true. or false.
- Jimaku API issues: Get your key from jimaku.cc and add it to environment variables (e.g. JIMAKU_API_KEY=yourkey) or paste directly in the code.
- MPV not launching? Ensure it's in your PATH. Test with
mpv --version - If subtitle are not converting. Ensure FFmpeg in your PATH. Test with
ffmpeg -versionor if it's not installed, install first. - yt-dlp not detected? Run
yt-dlp --versionto check. If not found, make sure the folder containingyt-dlp.exeis in your PATH (you can also put it in the same folder as MPV).
Pull requests welcome! Fork the repo, create a branch, and submit.
This project is licensed under the MIT License - see the LICENSE file for details.