Custom media_player integration that streams audio into a Snapcast source using ffmpeg.
Install via HACS or copy custom_components/snapcast_player/ into your Home Assistant custom_components/ directory.
The integration now supports modern Home Assistant config entries.
- Go to Settings -> Devices & Services -> Add Integration
- Search for Snapcast Player
- Enter host/port (or pipe path), name, and Snapcast
sampleformat
| key | required | example | description |
|---|---|---|---|
host |
yes | 127.0.0.1 |
Snapcast source host, or a local pipe path such as /tmp/snapfifo |
port |
no | 4953 |
TCP port for Snapcast source type tcp |
name |
no | Living Room |
Entity name |
sampleformat |
no | 48000:16:2 |
Snapcast source sample format (rate:bits:channels); sampleformat=48000:16:2 is also accepted |
start_delay |
no | 1s |
Optional ffmpeg adelay value to avoid clipped starts (for example announcements) |
Default sample format: 48000:16:2
Match your snapserver source sampleformat to this integration's sampleformat.
Example snapserver source:
source = type=tcp,name=HomeAssistant,sampleformat=48000:16:2media_player:
- platform: snapcast_player
host: 127.0.0.1
port: 4953
name: Living Room
sampleformat: 48000:16:2
start_delay: 1s