Home

Awesome

Bookmarker Menu for mpv v1.3.1

A bookmarker menu to manage all your bookmarks in MPV. This script is based on mpv-bookmarker and has been rewritten to include a bookmarker menu. All of the code has been written from scratch, aside from the general file/JSON management utilities.

Notice: Bookmarks created with mpv-bookmarker can be loaded by this script and will be automatically converted. However, the bookmarks created with this script are not compatible with those created with mpv-bookmarker.

New in version 1.3.1

Planned features

Installation

Copy bookmarker-menu.lua to the scripts folder for mpv then add the following lines to input.conf:

B script_message bookmarker-menu
b script_message bookmarker-quick-save
ctrl+b script_message bookmarker-quick-load

The keys are only a suggestion, and can be changed to something else.

Open bookmarker-menu.lua in a text editor, and you can easily change these settings:

-- Maximum number of characters for bookmark name
local maxChar = 100
-- Number of bookmarks to be displayed per page
local bookmarksPerPage = 10
-- Whether to close the Bookmarker menu after loading a bookmark
local closeAfterLoad = true
-- Whether to close the Bookmarker menu after replacing a bookmark
local closeAfterReplace = true
-- Whether to ask for confirmation to replace a bookmark (Uses the Typer for confirmation)
local confirmReplace = false
-- Whether to ask for confirmation to delete a bookmark (Uses the Typer for confirmation)
local confirmDelete = false
-- The rate (in seconds) at which the bookmarker needs to refresh its interface; lower is more frequent
local rate = 1.5
-- The filename for the bookmarks file
local bookmarkerName = "bookmarker.json"

It's recommended not to touch bookmarkerName but it's there to be changed in case you already have a file called bookmarker.json and don't want that to be overwritten, or to change it to bookmarks.json to convert bookmarks created by mpv-bookmarker.

Usage

When the Bookmarker menu is closed

When the Bookmarker menu is open

Replacing a bookmark is intended for when you have a bookmark for your current progress in a TV series. When you've finished a new episode, you can select this bookmark and press p to instantly rewrite that bookmark with your current progress, leaving the name and its position in the list of bookmarks intact. Changing the filepath of a bookmark is intended to quickly change a bookmark in case you moved the media file to a different folder, or perhaps the drive letter of your external drive changed.

When allowing text input

The Typer (as I named it) allows you to type text for various ends, like renaming a bookmark or changing its filepath.

During text input for a bookmark's name, you can write %t or %p to input a timestamp in the name. (Note: This does not work for a bookmark's filepath.)

For example, Awesome moment @ %t will show up as Awesome moment @ 00:13:41.673 in the menu

When moving bookmarks

Testing

This has been tested on Windows. In theory, it should also work for Unix systems, but it hasn't been tested on those.

Changelog

Version 1.3.1

Version 1.3.0

Version 1.2.0

Version 1.1.0

Version 1.0.2

Version 1.0.1

Version 1.0.0