• Stars
    star
    113
  • Rank 303,015 (Top 7 %)
  • Language
    Lua
  • License
    GNU General Publi...
  • Created about 2 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Script collection for the mpv media player.

Collection of mpv user scripts.

command_palette and search_menu are documented here, all other scripts are documented directly in the script via code comment at the beginning of the script.

  • powershell-completion - PowerShell command line completion.
  • command_palette - Searchable menu for bindings, playlist, chapters, profiles, audio/subtitle/video tracks, commands, properties, options, audio devices.
  • search_menu - Searchable menu for bindings, commands, properties, playlist entries and audio/subtitle tracks.
  • auto_mode.lua - Use mpv as video player, music player and image viewer.
  • delete_current_file.lua - Moves the currently playing file instantly to the recycle bin.
  • file_rating.lua - Writes a star rating to the filename of the currently playing file.
  • history.lua - Writes date, time, playtime and filename to a log file.
  • osm.lua - Shows a customizable on screen menu.
  • misc.lua
    • Show detailed media info on screen (Screenshot).
    • Cycle audio and subtitle tracks, include only languages you know.
    • Paste/Load/Append files/URLs from clipboard.
    • Jump to a random position in the playlist.
    • Navigate in playlist to next/previous/first/last file.
    • Restart mpv restoring the properties path, time-pos, pause and volume.
    • Execute Lua code from input.conf.
    • When seeking display position and duration like so: 70:00 / 80:00.
  • average_volume.lua - Records and restores the relative volume for music.

command_palette

command_palette

command_palette is a searchable menu for bindings, playlist, chapters, profiles, audio/subtitle/video tracks, commands, properties, options, audio devices.

Installation

  1. Save the script at: <mpv conf folder>/scripts/command_palette.lua
  2. Download extended-menu and save it at: <mpv conf folder>/script-modules/extended-menu.lua

Usage

Add bindings to input.conf:

F1    script-message-to command_palette show-command-palette bindings   # Show bindings
F2    script-message-to command_palette show-command-palette commands   # Show commands
F3    script-message-to command_palette show-command-palette properties # Show properties
F4    script-message-to command_palette show-command-palette options    # Show options
F8    script-message-to command_palette show-command-palette playlist   # Show playlist
Alt+c script-message-to command_palette show-command-palette chapters   # Show chapters
Alt+a script-message-to command_palette show-command-palette audio      # Show audio tracks
Alt+s script-message-to command_palette show-command-palette subtitles  # Show subtitle tracks
Alt+v script-message-to command_palette show-command-palette video      # Show video tracks
Alt+p script-message-to command_palette show-command-palette profiles   # Show profiles
Alt+d script-message-to command_palette show-command-palette audio-devices  # Show audio devices

Dependencies

Showing audio and subtitle tracks requires the installation of the CLI tool mediainfo.

Credits

Related Projects

search_menu

About

search_menu is very similar to command_palette, it's based on the external tools Rofi (Linux) or terminal based on fzf (cross-platform).

It provides a searchable menu for bindings, commands, properties, playlist entries and audio/subtitle tracks.

Terminal search menu

Rofi search menu

Installation

See Dependencies section to install dependencies.

Save the search menu folder at <mpv conf folder>/scripts/search_menu/, it contains main.lua and a Python script.

Configuration

mpv.conf

Windows: input-ipc-server = \\.\pipe\mpvsocket

Linux: input-ipc-server = /tmp/mpvsocket

Conf file at <mpv conf folder>/scripts-opts/search_menu.conf:

#mode=gnome-terminal+sh    # Requires Linux and Gnome Terminal, default on Linux
#mode=alacritty+sh         # Requires Linux and Alacritty
#mode=rofi                 # Requires Linux and Rofi
#mode=alacritty+ns         # Requires Windows, Alacritty and Nushell
#mode=windows-terminal+ps  # Requires Windows and Windows Terminal, default on Windows
#mode=windows-terminal+ns  # Requires Windows, Windows Terminal and Nushell

On Windows Alacritty and Nushell have the advantage of a faster startup.

On Linux Alacritty has the advantage of not having any UI apart from the terminal.

Rofi has like mpv a steep learning curve.

input.conf:

F1 script-message-to search_menu show-search-menu binding        # Search Binding
F2 script-message-to search_menu show-search-menu binding-full   # Search Binding Full
F3 script-message-to search_menu show-search-menu command        # Search Command
F4 script-message-to search_menu show-search-menu property       # Search Property
F8 script-message-to search_menu show-search-menu playlist       # Search Playlist
Alt+a script-message-to search_menu show-search-menu audio-track # Search Audio Track
Alt+s script-message-to search_menu show-search-menu sub-track   # Search Subtitle Track

Dependencies

Which dependencies are required depend on which mode and feature is used.

  • Python - Always required.
  • Rofi - Required launcher app for rofi mode, depends on Linux and X11.
  • fzf - Required CLI tool for modes other than rofi (terminal modes).
  • MediaInfo - Required CLI tool to search audio or subtitle tacks.
  • Alacritty - Modern, simple and fast terminal emulator.
  • Nushell - Modern shell that starts 200 ms faster than PowerShell.

Usage

Invoke a menu via shortcut key, type a search keyword, use up/down key to select, enter key to confirm, escape key to close.

Screenshot misc.lua

misc.lua has various features, among them is printing media info on the screen.

media-info

More Repositories

1

mpv.net

🎞 mpv.net is a modern media player for Windows that works just like mpv.
C#
1,338
star
2

awesome-mpv

A curated list of awesome mpv resources.
733
star
3

OpenWithPlusPlus

Open with++ context menu shell extension
Visual Basic .NET
312
star
4

Everything.NET

Voidtools Everything frontend with dark mode.
C#
163
star
5

run-hidden

run-hidden runs Windows console apps like PowerShell with hidden console window.
C++
113
star
6

MediaInfo.NET

MediaInfo.NET is a Windows application that shows media file information
C#
90
star
7

Get-MediaInfo

Get-MediaInfo is a PowerShell MediaInfo solution
PowerShell
74
star
8

Flow.Launcher.Plugin.Favorites

Flow Launcher plugin to define favorite apps, files, folders and URLs.
C#
38
star
9

software-list

βš™οΈ List of software I maintain or use.
24
star
10

File-Type-Registry-Viewer

File Type Registry Viewer shows registry keys related to a defined file type.
Visual Basic .NET
19
star
11

command-line-to-exe

Allows creating an executable that executes a defined command line.
C#
13
star
12

pwgen

Simple password generator
HTML
11
star
13

wox-mpv-plugin

Wox launcher plugin that controls the mpv media player.
C#
8
star
14

show-args

Windows app that shows a message box with the received command line arguments.
C#
7
star
15

AviSynth-Direct2D-Rendering

C++ sample application that renders a AviSynth script using Direct2D
C++
5
star
16

VapourSynth-Direct2D-Rendering

C++ sample application that renders a VapourSynth script using Direct2D
C++
4
star
17

Get-EnvironmentVariable

PowerShell script that manages environment variables
PowerShell
1
star