README.md 1.39 KB
Newer Older
1 2 3
Videoscreen
===========

Jonas Jelten's avatar
Jonas Jelten committed
4
Listens on a TCP port for incoming media urls.
5

Jonas Jelten's avatar
Jonas Jelten committed
6 7 8 9 10 11 12
The url is opened with mpv and played.

Another url terminates the previous link.

Optionally, `mpd` can be paused during playback when using `-m`.


13 14 15 16 17 18 19 20
Dependencies
------------

* Python3
* [`mpv` player](https://mpv.io/)
* [`mpc` client](http://www.musicpd.org/clients/mpc/) (optional)


Jonas Jelten's avatar
Jonas Jelten committed
21 22 23
Invocation
----------

Jonas Jelten's avatar
Jonas Jelten committed
24
Try invoking with `python3 -m videoscreen --help` to see usage and configuration information.
Jonas Jelten's avatar
Jonas Jelten committed
25 26

```
Jonas Jelten's avatar
Jonas Jelten committed
27
python3 -m videoscreen -- --fs --quiet
Jonas Jelten's avatar
Jonas Jelten committed
28 29
```

Jonas Jelten's avatar
Jonas Jelten committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
All options after the `--` are passed to mpv.


systemd user service
--------------------

* Copy or symlink the `etc/videoscreen.service` to `~/.config/systemd/user/`
* Activate and launch it `systemctl --user enable --now videoscreen.service`


Usage
-----

The following commands can be issued to the host:

Command | What
--------|-----
`help` | show usage help
`$video_url` | play video url
`vol [+-=]$number` | change the system volume
`exit` | terminate connection


### Examples

Invoke the commands by sending to port `60601` of the host:

``` shell
# play a video
echo "$video_url" | nc $host $port

# change volume
echo "vol +13" | nc $host $port
echo "vol 33" | nc $host $port
echo "vol -37" | nc $host $port
```
Jonas Jelten's avatar
Jonas Jelten committed
66 67 68 69 70 71 72 73 74 75


License
-------

This tool is licensed under:

`GNU Affero General Public License v3 or later`.

See [copying.md](copying.md) and [LICENSE](LICENSE) for further information.