Skip to content

dyphire/mpv-scripts

Repository files navigation

mpv-scipts(中文介绍)

adevice-list.lua

Interractive audio-device list menu on OSD. Requires that scroll-list.lua be installed.

auto-save-state.lua

Periodically saves progress with write-watch-later-config, and also cleans up the watch later data after the file is finished playing (so playlists may continue at the correct file).

Provides generic low-level clipboard commands for users and script writers.

Requires powershell on Windows,pbcopy/pbpaste on MacOS, xclip on X11, and wl-copy/wl-paste on Wayland.

Modified from: CogentRedTester/mpv-clipboard

chapter-list.lua

Interractive chapter-list menu on OSD. Requires that scroll-list.lua be installed.

Modified from: CogentRedTester/mpv-scroll-list/chapter-list.lua

chapter-make-read.lua

Try to load an external .chp "chapter sidecar file" when opening a video. (Analog to an external subtitle file like .SRT).

Configuration:

  • video.mp4.chp is the chapter file for video.mp4 with the option basename_with_ext = true in chapter-make-read.lua
  • video.chp for video.mp4 with the option basename_with_ext = false in chapter-make-read.lua
  • You could change all parameters of the script by editing your script-opts/chapter_make_read.conf, see: chapter-make-read.lua
  • Timestamps for external chapter files should use the 12-bit format of hh:mm:ss.sss.
  • The external chapter files encoding should be UTF-8 and the linebreak should be Unix(LF).

The script supports external chapter file content in the following formats:

00:00:00.000 A part
00:00:40.312 OP
00:02:00.873 B part
00:10:44.269 C part
00:22:40.146 ED
00:00:00.000
00:00:40.312
00:02:00.873
00:10:44.269
00:22:40.146
0:00:00 A part
0:00:40 OP
0:02:00 B part
0:10:44 C part
0:22:40 ED
0:00:00.000,Title1
0:17:02.148,Title2
0:28:10.114,Title3

OGM format (ogm)

CHAPTER01=00:00:00.000
CHAPTER01NAME=Intro
CHAPTER02=00:02:30.000
CHAPTER02NAME=Baby prepares to rock
CHAPTER03=00:02:42.300
CHAPTER03NAME=Baby rocks the house

MediaInfo format (mediainfo)

Menu
00:00:00.000                : en:Contours
00:02:49.624                : en:From the Sea
00:08:41.374                : en:Bread and Wine
00:12:18.041                : en:Faceless

This script also supports manually load/refresh,marks,edits,remove and creates external chapter files(It can also be used to export the existing chapter information of the playback file). Usage:

Customize the following keybinds in your input.conf.

# Manually load/refresh chapter file
key script-message-to chapter_make_read load_chapter
# Mark chapters
key script-message-to chapter_make_read create_chapter
# Remove current chapter
key script-message-to chapter_make_read remove_chapter
# Edit existing chapter's title
key script-message-to chapter_make_read edit_chapter
# Export chp file
key script-message-to chapter_make_read write_chapter chp
# Export ogm file
key script-message-to chapter_make_read write_chapter ogm

Automatically skips chapters based on title.

Modified from po5/chapterskip

drcbox.lua

Dynamic Audio Normalizer filter with visual feedback.

Modified from https://gist.github.com/richardpl/0c8011dc23d7ac7b7831b2e6d680114f

edition-list.lua

Interractive edition-list menu on OSD. Requires that scroll-list.lua be installed.

  • Prints a message on the OSD if editions are found in the file, and temporarily switches the osd-playback-message to the editions-list property when switching. This makes it easier to tell the number and names while navigating editions.

Modified from CogentRedTester/mpv-scripts/editions-notification.lua

history-bookmark.lua

This script helps you to create a history file .mpv.history in the specified path. The next time you want to continue to watch it, you can open any videos in the folder. The script will lead you to the video played last time.

Modified from yuukidach/history-bookmark.lua

mpv-animated.lua

Creates high quality animated webp/gif using mpv hotkeys. Requires that FFmpeg be installed.

Modified from DonCanjas/mpv-webp-generator

mpv-torrserver.lua

sends torrent info to TorrServer and gets playlist. Supports torrent files and magnet links. Requires curl and TorrServer.

Usage

Drag & Drop torrent into mpv, or:

mpv <magent link or torrent file>

Modified from kritma/mpv-torrserver

open_dialog.lua

Load folder/files/iso/clipboard (support url)/other subtitles/other audio tracks/other video tracks. (Windows)

Note: Windows 10/11 users are recommended to use it with PowerShell 7. Advantages: better performance, more modern dialog styles.

  • Official Installation Command: winget install Microsoft.PowerShell

Inspiration from rossy/mpv-open-file-dialog, tsl0922/dialog.lua

Mpv lua script to create and manage playlists

Modified from jonniek/mpv-playlistmanager

Logs played files to a history log file with an interactive 'recently played' menu that reads from the log. Allows for automatic or manual logging if you want a file bookmark menu instead.

Modified from hacel/recent

skiptosilence.lua

This script skips to the next silence in the file. The intended use for this is to skip until the end of an opening or ending sequence, at which point there's often a short period of silence.

Modified from detuur-mpv-scripts/skiptosilence.lua

sub_export.lua

Export the internal subtitles of the playback file. Requires that FFmpeg be installed.

The script support subtitles in srt, ass, and sup formats.

Modified from kelciour/mpv-scripts/sub-export.lua

track-list.lua

Interractive track-list menu on OSD. Requires that scroll-list.lua be installed.

trackselect.lua

Automatically select your preferred tracks based on title, because --alang isn't smart enough.

Modified from po5/trackselect

Feature-rich minimalist proximity-based UI for MPV player.

Modified from tomasklaen/uosc