Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pedromsilvapt/unicast-mpv
A simple module that exposes MPV to be controlled through a RPC WebSockets API, that can be used with the unicast server
https://github.com/pedromsilvapt/unicast-mpv
Last synced: 11 days ago
JSON representation
A simple module that exposes MPV to be controlled through a RPC WebSockets API, that can be used with the unicast server
- Host: GitHub
- URL: https://github.com/pedromsilvapt/unicast-mpv
- Owner: pedromsilvapt
- Created: 2019-04-16T17:18:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-18T19:30:52.000Z (over 2 years ago)
- Last Synced: 2023-03-15T07:45:33.344Z (almost 2 years ago)
- Language: TypeScript
- Size: 48.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# unicast-mpv
> A simple module that exposes [MPV](http://mpv.io/) to be controlled through a [RPC WebSockets](https://github.com/elpheria/rpc-websockets) API, that can be used with the [unicast](https://github.com/pedromsilvapt/unicast) server## Installation
This module can be used as a terminal application by simply installing it globally:```shell
npm install -g unicast-mpv
```
## Usage
Simply execute the application. The path to an YAML config file can optionally be passed as an argument. By default, the server listens on the port `2019`.
```shell
# With only default configuration
unicast-mpv
# Or with custom configuration
unicast-mpv path/to/configuration.yaml
```## Configuration
Below is the default configuration.
```yaml
player:
# Launch the player window in full screen
fullscreen: true# Index of the monitor (0-32) where to open the player window
monitor: null# Force the player window to always be on top
onTop: false# If false, when stopping a video, the player window is kept open. If true, it is automatically closed
quitOnStop: true# Determines if the player restarts everytime the user plays a new media when something was already playing
restartOnPlay: falseserver:
# The network port where the socket server will listen for incoming connections
port: 2019# The network interface the server will bind to
address: 0.0.0.0# Specify a password to authenticate clients. Null means no password
authenticate: null# MPV provides a command that allows to run arbitrary system commands. In unprotected environments,
# this can present a security risk. Setting this value to true disables the command from socket requests
disableRunCommand: false
```On Windows, the following configuration file is also loaded. If the MPV binary is in a different folder, then it should be changed to reflect that.
```yaml
player:
binary: C:\Program Files\mpv\mpv.exe
```