Unofficial IPC wrapper & command-line controller for MPV, the video player https://notashelf.github.io/mpvrc/
  • Rust 96.7%
  • Nix 3.3%
Find a file
dependabot[bot] e8d11d0b28
build(deps): bump openssl from 0.10.70 to 0.10.72
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.70 to 0.10.72.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.70...openssl-v0.10.72)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.72
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-04 20:52:11 +00:00
.github/workflows add redirect for crate docs on gh pages 2025-02-05 03:35:53 +03:00
nix nix: cleanup 2025-02-05 04:03:51 +03:00
src fix HTTP response format and improve connection logging 2025-02-05 03:53:18 +03:00
.envrc nix: init tooling 2024-12-22 18:44:11 +03:00
.gitignore initial server implementation 2024-12-22 19:12:35 +03:00
Cargo.lock build(deps): bump openssl from 0.10.70 to 0.10.72 2025-04-04 20:52:11 +00:00
Cargo.toml add redirect for crate docs on gh pages 2025-02-05 03:35:53 +03:00
flake.lock nix: cleanup 2025-02-05 04:03:51 +03:00
flake.nix nix: cleanup 2025-02-05 04:03:51 +03:00
LICENSE Initial commit 2024-12-15 18:26:38 +00:00
README.md add manual ipc request instructions 2025-02-05 03:54:04 +03:00

mrc

Fast, robust and experimental JSON IPC wrapper for the mpv video player; comes with a wrapper library, a CLI and a server for remote control.

Hacking

Both CLI and server utilities require mpv to be started with the IPC socket enabled.

mpv --idle --input-ipc-server=/tmp/mpvsocket

mrc does not handle TLS certificates for you. To run the remote control server, you must create your own PKCS#12 certificates using OpenSSL.

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365
openssl pkcs12 -export -out identity.pfx -inkey key.pem -in cert.pem

mrc then read the TLS_PFX_PATH and TLS_PASSWORD environment variables to load them. You should also set AUTH_TOKEN for making authenticated requests to the server remotely. Running without an auth token is "supported", but the server will not fully function.

export TLS_PFX_PATH=/path/to/identity.pfx
export TLS_PASSWORD="your_identity_passphrase"
export AUTH_TOKEN="your_auth_token"

Then start the server with cargo run --bin=server.

How you handle environment is up to you, Systemd makes it somewhat easy if running mrc as a service.

Testing mpv IPC socket

If you suspect some IPC commands are not being sent properly, try sending them manually first with something like socat.

echo '{ "command": ["pause"] }' | socat - /tmp/mpvsocket