Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vc-01/metadata-osd
Metadata OSD for mpv player
https://github.com/vc-01/metadata-osd
metadata mpv mpv-script music
Last synced: 2 months ago
JSON representation
Metadata OSD for mpv player
- Host: GitHub
- URL: https://github.com/vc-01/metadata-osd
- Owner: vc-01
- License: mit
- Created: 2022-06-20T07:30:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-25T22:57:18.000Z (about 1 year ago)
- Last Synced: 2024-08-05T14:16:13.654Z (6 months ago)
- Topics: metadata, mpv, mpv-script, music
- Language: Lua
- Homepage:
- Size: 201 KB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
- awesome-mpv - metadata-osd - Adds OSD showing song name, album name and other metadata. (Music)
README
# Metadata OSD script for mpv player
This script adds metadata OSD (on-screen display) to mpv.
* Screenshot taken on a packaged mpv on Arch Linux; font type and size may vary on other platforms.
## Installation & Configuration
Download & place [metadata_osd.lua](scripts/metadata_osd.lua?raw=true) script into
- `$XDG_CONFIG_HOME/mpv/scripts` (it will be most of the times `~/.config/mpv/scripts`) on Linux, or
- `%APPDATA%\mpv\scripts` on Windowsfor autoload.
(_Optional_) Config file with user settings named `metadata_osd.conf` can be created in
- `$XDG_CONFIG_HOME/mpv/script-opts` on Linux, or
- `%APP‐DATA%\mpv\script-opts` on WindowsSee the example configuration file [metadata_osd.conf](script-opts/metadata_osd.conf?raw=true) in this repo for available user config options.
## Key Bindings
The following table summarizes the script's default key bindings and their config options:
| Key | Action | Config Option Name | Binding Name (for input.conf) |
| -------------:|:------------------------------------- |:--------------------- |:----------------------------- |
| F1 | Master enable / disable (killswitch) | key_toggleenable | toggleenable |
| F5 | Enable / disable the autohide feature | key_toggleautohide | toggleautohide |
| _unassigned_ | Show / hide OSD-1 | key_toggleosd_1 | toggleosd_1 |
| _unassigned_ | Show / hide OSD-2 | key_toggleosd_2 | toggleosd_2 |
| F6 | Reset any user-toggled switches | key_reset_usertoggled | reset_usertoggled |
| _unassigned_ | Show status OSD | key_showstatusosd | showstatusosd |Key bindings can be configured either via script's config file, see [metadata_osd.conf](script-opts/metadata_osd.conf?raw=true) example with pre-filled defaults, or via _input.conf_.
Default bindings in _input.conf_ format are listed below again for clarity:
```
F1 script-binding metadata_osd/toggleenable
F5 script-binding metadata_osd/toggleautohide
# script-binding metadata_osd/toggleosd_1
# script-binding metadata_osd/toggleosd_2
F6 script-binding metadata_osd/reset_usertoggled
# script-binding metadata_osd/showstatusosd
```## Per media-type enable / autohide
OSD enabled state or auto-hiding after a delay can be triggered either manually by pressing the relevant key (see _key_toggleenable_ and _key_toggleautohide_ [above](#key-bindings)) or determined algorithmically based on the currently playing media type and its related config options settings.
OSD is enabled by default for audio and video media, disabled while viewing pictures. Autohide feature is enabled for video, autohide is disabled (that is, the OSD will stay visible) while playing music, as well as for music files with cover art image.
Currently recognizable media types are namely: _audio_, _audio_withalbumart_, _video_, _image_.
Config options for per media-type OSD enable and autohide are cumulatively:
* _enable_for\__ (yes/no)
* _autohide_for\__ (yes/no)If user presses a button to toggle enable / disable the OSD or the autohide feature, it will override the automatic determining until reset back by presssing a key specified by:
* _key_reset_usertoggled_ / _reset_usertoggled_ (F6) (see [above](#key-bindings))
## Program Architecture
See [ARCHITECTURE.md](ARCHITECTURE.md).
## License
This project is licensed under the terms of the **MIT license**. See [LICENSE](LICENSE).