Skip to content

mpv-easy/mpv-easy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

793 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpv-easy

TS and React toolkit for mpv script

mpv-easy icon

uosc-logo

mpv-easy

install

install

CONTRIBUTING

CONTRIBUTING

dev

bash

export MPV_CONFIG_DIR=/your_mpv_dir/portable_config/scripts && pnpm run dev-copy

fish

set -x MPV_CONFIG_DIR /your_mpv_dir/portable_config/scripts ; pnpm run dev-copy

scripts

mpv-easy-scripts

short key

key command
ENTER cycle fullscreen
[ script-message change-speed -0.25
] script-message change-speed +0.25
c script-message cut
C script-message crop
o script-message output
g script-message output-gif
p script-message preview
ESC script-message cancel
UP script-message change-volume +10
DOWN script-message change-volume -10
ctrl+UP script-message change-fontSize +0.25
ctrl+DOWN script-message change-fontSize -0.25
ctrl+o script-message open-dialog
ctrl+t script-message cycle-translate-mode
ctrl+i script-message toggle-interactive-translate
Alt+t script-message toggle-auto-translate
CTRL+0 script-message Anime4K-Clear
CTRL+1 script-message Anime4K-AA-HQ
CTRL+2 script-message Anime4K-B-HQ
CTRL+3 script-message Anime4K-C-HQ
CTRL+4 script-message Anime4K-A-HQ
CTRL+5 script-message Anime4K-BB-HQ
CTRL+6 script-message Anime4K-CA-HQ
CTRL+v script-message clipboard-play
CTRL+c script-message copy-screen
CTRL+C script-message copy-time
CTRL+F1 script-message toggle-tooltip
MOUSE_BTN0 script-message mouse-left-click
MOUSE_BTN1 script-message mouse-mid-click
MOUSE_BTN2 script-message mouse-right-click
MOUSE_BTN3 script-message mouse-wheel-up
MOUSE_BTN4 script-message mouse-wheel-down

blogs

UI

uosc

uosc-dark uosc-light

osc

osc-dark osc-light

oscx

oscx-dark oscx-light

example

drag-ball

drag-ball

snake

snake

i18n

i18n

counter-ui

counter-ui

config

mouseHoverStyle

Only supports Windows, requires installation of PowerShell to enable script execution permissions

set-executionpolicy remotesigned

mouseHoverStyle

quick start

mpv-easy-demo

more example

mpv-easy-tpl

env

name description
SHOW_FPS Determines whether FPS information is displayed.
MAX_FPS_FRAME Specifies the number of recent frames used for FPS calculation.
FRAME_LIMIT Exit the player after rendering the specified number of frames.

nightly.link

https://nightly.link/mpv-easy/mpv-easy/workflows/release/main?preview

Q&A

Color Config

The color configuration format used in mpv.conf is ARGB (Alpha Red Green Blue).

  • Alpha channel: 00 represents completely transparent, and FF represents completely opaque.
Color ARGB String Description Example Usage
White #FFFFFFFF Opaque White tooltip-color='#FFFFFFFF'
Black #FF000000 Opaque Black tooltip-back-color='#FF000000'
Yellow #FFFFFF00 Opaque Yellow sub-color-hover='#FFFFFF00'
Semi-transparent Black #80000000 50% Alpha Black sub-back-color-hover='#80000000'
Red #FFFF0000 Opaque Red sub-color='#FFFF0000'
Green #FF00FF00 Opaque Green sub-color='#FF00FF00'
Blue #FF0000FF Opaque Blue sub-color='#FF0000FF'
Cyan #FF00FFFF Opaque Cyan sub-color='#FF00FFFF'
Magenta #FFFF00FF Opaque Magenta sub-color='#FFFF00FF'
Transparent #00000000 Completely Transparent background-color='#00000000'

You can also modify subtitle colors at runtime via input.conf keybindings:

Cycle through multiple colors (e.g. White → Red → Blue):

c cycle-values sub-color "#FFFFFF" "#FF0000" "#0000FF"

Set text and border color simultaneously:

r set sub-color "#FF0000" ; set sub-border-color "#000000"

How to enable context-menu

The mpv-easy style context menu has been removed due to performance reasons. Currently, mpv supports a native menu plugin on the Windows platform: mpv-menu-plugin.

You can enable the right-click menu using the mpv-dialog and mpv-menu plugins.

Download Plugins: Download the integrated plugin package (includes mpv-dialog and mpv-menu) via the following link: Click to Download

Note: By default, mpv-easy uses the right mouse button to pause the video. If you want to use the context menu, you need to delete or comment out the following line in input.conf:

MOUSE_BTN2 script-message mouse-right-click

mujs stack overflow

If your code throw a stack overflow error with mujs, you need to use the babel plugin hack.js . It adds a function variable at the beginning of all functions to expand the stack size. Alternatively, you can use a custom compiled version of mujs and mpv, change mujs JS_STACKSIZE

fixed: Increase default stack sizes.

- #define JS_STACKSIZE 256	/* value stack size */

+ #define JS_STACKSIZE 1024	/* value stack size */

perf

Maybe should use GitHub action to automatically update this

js engine first render average js file size
qjs 358ms 3.58ms 1.4M
qjs+minify 334ms 3.42ms 300K
mujs+es5 402 ms 14.05ms 1.1M
deno 291 ms 0.23ms 1.4M
deno+minify 464 ms 0.23ms 306K
boa+es6 400 ms 21.88ms 1.2M

changlog

todo

  • flex (30%)
  • grid
  • logo
  • bilibili
  • youtube
  • animation
  • es2022
  • test
  • mpv prop type
  • plugin system
  • menu system
  • CI snapshot test
  • font rem
  • node console
  • es/cjs plugin module
  • real-time subtitle translation
  • sourcemap

star-history

About

TS and React toolkit for mpv script

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages