Skip to content

linguisticmind/mpv-scripts

Repository files navigation

mpv-scripts

A collection of scripts for mpv media player.

The following scripts are available:

Name Description
ab-loop-seek-points.lua Seek to start and end points of an A/B loop.
ab-loop-set-points.lua Set start and end points of an A/B loop.
ab-loop-to-edl-segment.lua Convert an A/B loop to an EDL segment.
clock.lua Show clock on the screen.
copy-filename.lua Copy current file's name or path to clipboard.
copy-subtitle.lua Copy current subtitle to clipboard.
copy-timestamp.lua Copy current timestamp to clipboard.
osc-show-hide.lua Show or hide the on-screen controller.
play-before-and-after.lua Play an interval before or after the current position.

Support me on Ko-fi

Dependencies

ab-loop-to-edl-segment.lua, copy-filename.lua, copy-subtitle.lua and copy-timestamp.lua require xclip or another clipboard command to copy text to clipboard. Refer to those scripts' READMEs for more information.

Installation

Video tutorial

  1. Clone this repository to a directory of your choice (e.g. ~/repos):

    cd ~/repos
    git clone https://github.com/linguisticmind/mpv-scripts.git
  2. Symlink or copy the script files to ~/.config/mpv/scripts:

    cd ~/.config/mpv/scripts
    
    # To symlink
    
    # all scripts
    ln -sv ~/repos/mpv-scripts/*/*.lua .
    # individual scripts (e.g. `copy-subtitle.lua` and `copy-timestamp.lua`)
    ln -sv ~/repos/mpv-scripts/copy-subtitle/copy-subtitle.lua ~/repos/mpv-scripts/copy-timestamp/copy-timestamp.lua .
    
    # To copy
    
    # all scripts
    cp -av ~/repos/mpv-scripts/*/*.lua .
    # individual scripts (e.g. `copy-subtitle.lua` and `copy-timestamp.lua`)
    cp -av ~/repos/mpv-scripts/copy-subtitle/copy-subtitle.lua ~/repos/mpv-scripts/copy-timestamp/copy-timestamp.lua .

Versioning

The individual scripts follow the Semantic Versioning convention. The version number is indicated in the script file – in a comment immediately preceding the main code, in the following format: -- version: <version number> (e.g. -- version: 0.1.0). This comment may be separated from the main code and/or any preceding text with any number of lines that are empty or only contain whitespace.

The entire script collection follows Calendar Versioning in the following format: YYYY0M0D.MICRO. In this versioning scheme, the collection can get patch and major releases. When patch and major releases of the collection occur, depends on the kind of updates that were done to the individual scripts:

Patch release
Each time at least one script gets a PATCH update, MICRO of the entire collection is incremented by 1.
Major release
Each time at least one script gets a MAJOR or MINOR update, MAJOR (YYYY0M0D) of the entire collection is updated, and MICRO is reset to 0. MAJOR (YYYY0M0D) is the date of a git commit of a given major release of the collection, in UTC.

License

For license information refer to directories for individual scripts.

About

A collection of scripts for mpv player.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

Languages