No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-04-15 22:20:48 +08:00
scripts keep danmaku layout stable when resizing the window 2026-04-12 10:55:01 +08:00
.gitignore rewrite README 2026-04-10 15:03:51 +08:00
LICENSE fix typo 2026-04-15 22:20:48 +08:00
README.md fix typo 2026-04-15 22:20:48 +08:00

hana-mpv-scripts

An mpv JavaScript script that handles a custom hana:// protocol and loads media from a remote playlist JSON.

Installation

Copy this folder into your mpv scripts directory.

Common locations:

  • Linux: ~/.config/mpv/scripts/
  • macOS: ~/Library/Application Support/mpv/scripts/
  • Windows: %APPDATA%\\mpv\\scripts\\

The script currently depends on curl being available in your system environment.

Usage

The script accepts either of these equivalent forms:

hana://<playlist-url>:<video-id>
https://hana/<playlist-url>:<video-id>
hana://<playlist-name>:<video-id>
https://hana/<playlist-name>:<video-id>

Examples:

mpv 'hana://https://example.com/playlist.json:6'
mpv 'https://hana/https://example.com/playlist.json:6'
mpv 'hana://playlist:6'
mpv 'https://hana/playlist:6'

<playlist-url> is the remote JSON playlist file.
<video-id> is matched against videos[].id in the playlist. <playlist-name> is resolved as <base-url><playlist-name>.json.

When the selected video entry contains extra resources, the script will also:

  • add external audio tracks and subtitles
  • load danmaku data

Controls

  • Alt+j: toggle danmaku on or off

Notes

  • Default playlist base URL: https://example.com/
  • Remote playlist fetching currently depends on curl being available on the system
  • The danmaku renderer is inspired by uosc_danmaku: https://github.com/Tony15246/uosc_danmaku