Browse Source

added Readme-Section about the config-file

master
Stefan Naumann 2 years ago
parent
commit
61a1cc8049
  1. 49
      README.md

49
README.md

@ -14,10 +14,10 @@ Requirements:
Maybe your distribution has python-mpv, or you can install it with:
```bash
# on Arch Linux ARM, the package may be called differently on Raspbian
sudo pacman -Syu python python-pip pygtk python-gobject
# install python-mpv
sudo pip install python-mpv
# on Arch Linux ARM, the package may be called differently on Raspbian
sudo pacman -Syu python python-pip pygtk python-gobject
# install python-mpv
sudo pip install python-mpv
```
### OMXPlayer
@ -29,10 +29,10 @@ You will need the following for running with OMXPlayer as player:
- omxplayer
```bash
# on Arch Linux ARM, the package may be called differently on Raspbian
sudo pacman -Syu omxplayer-git xorg-xwininfo
# install livestreamer
sudo pip install livestramer
# on Arch Linux ARM, the package may be called differently on Raspbian
sudo pacman -Syu omxplayer-git xorg-xwininfo
# install livestreamer
sudo pip install livestramer
```
## Usage (preliminary)
@ -43,6 +43,10 @@ At the moment, there are no arguments, only a list of files.
Once an instance runs, you can run a similar command again and add items to the playlist of the first one. GTPlay will only allow one instance of itself at any time.
### MPV
MPV-mode can be used on normal PCs, then GTPlay is a simple wrapper around mpv. It can play Twitch or Youtube natively, however is too slow for Raspberry Pi or other ARM-boards.
### OMXPlayer
python src/gtplay.py --omx {files}
@ -88,3 +92,32 @@ Watching a livestream (Twitch):
| q | exit GTPlay |
| Shift+Left, a | jump backwards |
| Shift+Right, d | jump forwards |
## Config-file
GTPlay uses a JSON config-file to save some properties. It defaults to `gtplay.cfg` in the root-directory of GTPlay. This is an example file:
```json
{
"buttons": [
{
"hidden": true,
"name": "loopBtn",
},
{
"hidden": true,
"name": "pauseBtn"
}
],
"loop": false,
"muted": false,
"omx_hidden": false,
"player": "mpv",
"quality": "720p",
"volume": 99.0
}
```
It sets the loop-Button and the pause/play-button to invisible. It sets the player to non-looping at startup and not muted. The default volume is 99.0 (out of 100) at startup, the default player is mpv. In OMX-mode the player is set to startup to not hidden and the quality-parameter to `livestreamer` to 720p.
The file is rewritten, when the player is exited, so looping, the volume and muting is carried over to the next start.

Loading…
Cancel
Save