mpvcovergrabber/README.md
2025-05-29 18:57:13 +02:00

66 lines
1.5 KiB
Markdown

# mpvcovergrabber
`mpvcovergrabber` is a script for [MPV](https://mpv.io) that shows rich notifications with album covers or movie posters when playing audio or video files. It uses local inference via language models such as `gemma2:2b` through [Ollama](https://ollama.com) and APIs like Last.fm and TMDB.
## Features
- Metadata inference using LLMs (via Ollama)
- Cover retrieval from:
- Local files
- Last.fm (for music)
- TMDB (for movies)
- Metadata cleanup using customizable regex patterns
- Support for audio streams
## Installation
You can install it form the AUR:
```bash
yay -S mpvcovergrabber-git
```
or
```bash
git clone https://aur.archlinux.org/mpvcovergrabber-git.git
cd mpvcovergrabber-git
makepkg -si
```
This will install the following files:
- `/etc/mpv/scripts/notify.lua`
- `/etc/mpv/filters/patterns_artist.txt`
- `/etc/mpv/filters/patterns_common.txt`
## Dependencies
- [mpv](https://mpv.io)
- `curl`
- `coreutils`
### Optional dependencies
- [Ollama](https://ollama.com): for LLM-based metadata inference (e.g., gemma2)
- `ollama-cuda`: for GPU-accelerated inference
## Configuration
Edit the pattern files to customize metadata cleanup:
- `/etc/mpv/filters/patterns_artist.txt`
- `/etc/mpv/filters/patterns_common.txt`
Store your API keys in:
- `~/.config/mpv/apikeys/lastfm`
- `~/.config/mpv/apikeys/tmdb`
## Author
Developed by [Teraflops](https://gitlab.com/teraflops)
---
## License
This project is licensed under the MIT License. See the `LICENSE` file for more details.