Headless playback client for Raphson Music
Client for the Raphson Music server that can be controlled remotely via a simple web interface or Home Assistant.
Choose a player backend
mpv(recommended): requires libmpv- Debian:
apt install libmpv2 - Fedora:
dnf install mpv-libs
- Debian:
vlc: requires libvlc- Debian:
apt install vlc - Fedora:
dnf install vlc-libs
- Debian:
Installation
Install pipx using your system package manager.
pipx install --global raphson-music-headless[mpv]
or
pipx install --global raphson-music-headless[vlc]
or, for the latest development version:
pipx install --global "raphson_music_headless[mpv] @ git+https://codeberg.org/raphson/music-headless.git"
Run: raphson-music-headless
Usage
- Create a
config.jsonfile with credentials (seeconfig.json.example). - Run
raphson-music-headless --config config.json
By default, the program looks for a configuration file at /etc/raphson-music-headless.json.
See config.md for a list of options.
API
See API.md
Temporary files (VLC backend only)
The server writes music to temporary files so VLC can access them. On Linux, the /tmp directory is used for this purpose. It is strongly recommended to mount tmpfs on /tmp to avoid unnecessary writes to your disk, especially when using a Raspberry Pi with sd card.
Check if it is the case by running mount | grep /tmp. It should show something like: tmpfs on /tmp type tmpfs ...
Cache size
The cache_size setting determines the number of cached tracks for each playlist. These tracks are kept in memory, consuming roughly 3 - 6MB per track including cover image. Say cache_size is set to 4 and you use a maximum of 10 playlists, you will need around 200MiB of memory.
Development
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[mpv]"
Create config.json from config.example.json, then run make run
Bugs
When playing mono audio (like news), sound may only be played on the left channel. This appears to be an issue with PipeWire.
Metadata
Release files for raphson-music-headless 1.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| raphson_music_headless-1.5.1.tar.gz | 17.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| raphson_music_headless-1.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.7 kB
Release files / raphson_music_headless-1.5.1.tar.gz
| Download URL | raphson_music_headless-1.5.1.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e95e8189f146b92cf2d1cfef9b3d400e0cfe8ea438d20ffa239b2b42ad8c001
|
|
BLAKE2b-256 checksum How to use checksums |
a3528fbce2f2757a65a078793c5187ba2f65119a12a79d4ab073b94f1d274cc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.14.2
|
Release files / raphson_music_headless-1.5.1-py3-none-any.whl
| Download URL | raphson_music_headless-1.5.1-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c6726d9ae7ce2d7fa8c17278e2ad13559184996ebf8127035aaeb3050b7f583
|
|
BLAKE2b-256 checksum How to use checksums |
bd6b7f337bf730e73dd7273c8f296b8ccedbb493af104de677b996914d3f2eae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.14.2
|