Skip to content

HackingGate/mpvx

Repository files navigation

mpvx

Lint Build and Test codecov Release

Mac app for mpv inspired by grsyncx

Requirements

mpv Homebrew Installation (Recommended)

Install the command-line interface mpv with Homebrew.

brew install mpv

The mpvx app will automatically check the following paths, which means it supports both Apple Silicon and Intel:

/opt/homebrew/bin/mpv
/usr/local/bin/mpv

Standalone mpv Executable

You can specify the --mpvx-mpv-binary-path= argument to indicate the mpv executable you'd like to use. For example:

/Applications/mpvx.app/Contents/MacOS/mpvx --mpvx-mpv-binary-path=/Applications/mpv.app/Contents/MacOS/mpv

Screenshot

mpvx-demo.png

Why Not IINA

IINA is a wrapper of mpv player with lots of features implemented.

I found an issue with IINA. Key control like . (step forward) or , (step backward) do not support consecutive presses, which is an important feature to me.

I investigated the source code of IINA and learned how to support consecutive presses. Use int mpv_command(mpv_handle *ctx, const char **args); instead of the more error-prone way int mpv_command_string(mpv_handle *ctx, const char *args); and pass commands with keyDown and keyUp events to achieve this.

You can have look at the PR I created for bilibili-mac-client years ago for how to implement both keyDown and keyUp event.

However, IINA has its own layer of key management, which means it requires a lot of work to implement that I don't have time to do.

That is why I created this simpler project that handles media resource opening and launches vanilla mpv from the Homebrew formula.

Looking for iOS?

Outplayer by Stephen Salerno: video player for iOS powered by mpv