|
| 1 | +####################################################################################### |
| 2 | +# ______ # |
| 3 | +# / _____) # |
| 4 | +# ( (____ ____ _____ ____ ___ _____ ____ _ _ _____ ____ # |
| 5 | +# \____ \ | _ \ (____ || _ \ /___)| ___ | / ___)| | | || ___ | / ___) # |
| 6 | +# _____) )| | | |/ ___ || |_| ||___ || ____|| | \ V / | ____|| | # |
| 7 | +# (______/ |_| |_|\_____|| __/ (___/ |_____)|_| \_/ |_____)|_| # |
| 8 | +# |_| # |
| 9 | +# # |
| 10 | +# Snapserver config file # |
| 11 | +# # |
| 12 | +# Source: https://github.com/badaix/snapcast/blob/develop/server/etc/snapserver.conf # # |
| 13 | +# # |
| 14 | +####################################################################################### |
| 15 | + |
| 16 | +# default values are commented |
| 17 | +# uncomment and edit to change them |
| 18 | + |
| 19 | +# Settings can be overwritten on command line with: |
| 20 | +# "--<section>.<name>=<value>", e.g. --server.threads=4 |
| 21 | + |
| 22 | + |
| 23 | +# General server settings ##################################################### |
| 24 | +# |
| 25 | +[server] |
| 26 | +# Number of additional worker threads to use |
| 27 | +# - For values < 0 the number of threads will be 2 (on single and dual cores) |
| 28 | +# or 4 (for quad and more cores) |
| 29 | +# - 0 will utilize just the processes main thread and might cause audio drops |
| 30 | +# in case there are a couple of longer running tasks, such as encoding |
| 31 | +# multiple audio streams |
| 32 | +#threads = -1 |
| 33 | + |
| 34 | +# the pid file when running as daemon |
| 35 | +#pidfile = /var/run/snapserver/pid |
| 36 | + |
| 37 | +# the user to run as when daemonized |
| 38 | +#user = snapserver |
| 39 | +# the group to run as when daemonized |
| 40 | +#group = snapserver |
| 41 | + |
| 42 | +# directory where persistent data is stored (server.json) |
| 43 | +# if empty, data dir will be |
| 44 | +# - "/var/lib/snapserver/" when running as daemon |
| 45 | +# - "$HOME/.config/snapserver/" when not running as daemon |
| 46 | +datadir = /data/ |
| 47 | + |
| 48 | +# |
| 49 | +############################################################################### |
| 50 | + |
| 51 | + |
| 52 | +# HTTP RPC #################################################################### |
| 53 | +# |
| 54 | +[http] |
| 55 | +# enable HTTP Json RPC (HTTP POST and websockets) |
| 56 | +enabled = true |
| 57 | + |
| 58 | +# address to listen on, can be specified multiple times |
| 59 | +# use "0.0.0.0" to bind to any IPv4 address or :: to bind to any IPv6 address |
| 60 | +# or "127.0.0.1" or "::1" to bind to localhost IPv4 or IPv6, respectively |
| 61 | +# use the address of a specific network interface to just listen to and accept |
| 62 | +# connections from that interface |
| 63 | +bind_to_address = 0.0.0.0 |
| 64 | + |
| 65 | +# which port the server should listen to |
| 66 | +port = 1780 |
| 67 | + |
| 68 | +# serve a website from the doc_root location |
| 69 | +# disabled if commented or empty |
| 70 | +doc_root = /usr/share/snapserver/snapweb |
| 71 | + |
| 72 | +# Hostname or IP under which clients can reach this host |
| 73 | +# used to serve cached cover art |
| 74 | +# use <hostname> as placeholder for your actual host name |
| 75 | +#host = <hostname> |
| 76 | + |
| 77 | +# |
| 78 | +############################################################################### |
| 79 | + |
| 80 | + |
| 81 | +# TCP RPC ##################################################################### |
| 82 | +# |
| 83 | +[tcp] |
| 84 | +# enable TCP Json RPC |
| 85 | +enabled = true |
| 86 | + |
| 87 | +# address to listen on, can be specified multiple times |
| 88 | +# use "0.0.0.0" to bind to any IPv4 address or :: to bind to any IPv6 address |
| 89 | +# or "127.0.0.1" or "::1" to bind to localhost IPv4 or IPv6, respectively |
| 90 | +# use the address of a specific network interface to just listen to and accept |
| 91 | +# connections from that interface |
| 92 | +bind_to_address = 0.0.0.0 |
| 93 | + |
| 94 | +# which port the server should listen to |
| 95 | +port = 1705 |
| 96 | +# |
| 97 | +############################################################################### |
| 98 | + |
| 99 | + |
| 100 | +# Stream settings ############################################################# |
| 101 | +# |
| 102 | +[stream] |
| 103 | +# address to listen on, can be specified multiple times |
| 104 | +# use "0.0.0.0" to bind to any IPv4 address or :: to bind to any IPv6 address |
| 105 | +# or "127.0.0.1" or "::1" to bind to localhost IPv4 or IPv6, respectively |
| 106 | +# use the address of a specific network interface to just listen to and accept |
| 107 | +# connections from that interface |
| 108 | +bind_to_address = 0.0.0.0 |
| 109 | + |
| 110 | +# which port the server should listen to |
| 111 | +port = 1704 |
| 112 | + |
| 113 | +# source URI of the PCM input stream, can be configured multiple times |
| 114 | +# The following notation is used in this paragraph: |
| 115 | +# <angle brackets>: the whole expression must be replaced with your specific setting |
| 116 | +# [square brackets]: the whole expression is optional and can be left out |
| 117 | +# [key=value]: if you leave this option out, "value" will be the default for "key" |
| 118 | +# |
| 119 | +# Format: TYPE://host/path?name=<name>[&codec=<codec>][&sampleformat=<sampleformat>][&chunk_ms=<chunk ms>][&controlscript=<control script filename>[&controlscriptparams=<control script command line arguments>]] |
| 120 | +# parameters have the form "key=value", they are concatenated with an "&" character |
| 121 | +# parameter "name" is mandatory for all sources, while codec, sampleformat and chunk_ms are optional |
| 122 | +# and will override the default codec, sampleformat or chunk_ms settings |
| 123 | +# Non blocking sources support the dryout_ms parameter: when no new data is read from the source, send silence to the clients |
| 124 | +# Available types are: |
| 125 | +# pipe: pipe:///<path/to/pipe>?name=<name>[&mode=create][&dryout_ms=2000], mode can be "create" or "read" |
| 126 | +# librespot: librespot:///<path/to/librespot>?name=<name>[&dryout_ms=2000][&username=<my username>&password=<my password>][&devicename=Snapcast][&bitrate=320][&wd_timeout=7800][&volume=100][&onevent=""][&nomalize=false][&autoplay=false][¶ms=<generic librepsot process arguments>] |
| 127 | +# note that you need to have the librespot binary on your machine |
| 128 | +# sampleformat will be set to "44100:16:2" |
| 129 | +# file: file:///<path/to/PCM/file>?name=<name> |
| 130 | +# process: process:///<path/to/process>?name=<name>[&dryout_ms=2000][&wd_timeout=0][&log_stderr=false][¶ms=<process arguments>] |
| 131 | +# airplay: airplay:///<path/to/airplay>?name=<name>[&dryout_ms=2000][&port=5000] |
| 132 | +# note that you need to have the airplay binary on your machine |
| 133 | +# sampleformat will be set to "44100:16:2" |
| 134 | +# tcp server: tcp://<listen IP, e.g. 127.0.0.1>:<port>?name=<name>[&mode=server] |
| 135 | +# tcp client: tcp://<server IP, e.g. 127.0.0.1>:<port>?name=<name>&mode=client |
| 136 | +# alsa: alsa:///?name=<name>&device=<alsa device>[&send_silence=false][&idle_threshold=100][&silence_threshold_percent=0.0] |
| 137 | +# meta: meta:///<name of source#1>/<name of source#2>/.../<name of source#N>?name=<name> |
| 138 | +#source = librespot://librespot?name=LibreSpot&bitrate=320&sampleformat=44100:16:2 |
| 139 | +# source = airplay:///usr/bin/shairport-sync?name=shairport[&dryout_ms=2000&devicename=Snapcast&port=5000 |
| 140 | +#source = pipe:////audio/snapcast_fifo?name=Mopidy |
| 141 | +source = pipe:////audio/snapfifo?name=fifo |
| 142 | + |
| 143 | +# Default sample format: <sample rate>:<bits per sample>:<channels> |
| 144 | +sampleformat = 44100:16:2 |
| 145 | + |
| 146 | +# Default transport codec |
| 147 | +# (flac|ogg|opus|pcm)[:options] |
| 148 | +# Start Snapserver with "--stream:codec=<codec>:?" to get codec specific options |
| 149 | +codec = pcm |
| 150 | + |
| 151 | +# Default source stream read chunk size [ms]. |
| 152 | +# The server will continously read this number of milliseconds from the source into buffer and pass this buffer to the encoder. |
| 153 | +# The encoded buffer is sent to the clients. Some codecs have a higher latency and will need more data, e.g. Flac will need ~26ms chunks |
| 154 | +#chunk_ms = 20 |
| 155 | + |
| 156 | +# Buffer [ms] |
| 157 | +# The end-to-end latency, from capturing a sample on the server until the sample is played-out on the client |
| 158 | +buffer = 3000 |
| 159 | + |
| 160 | +# Send audio to muted clients |
| 161 | +send_to_muted = false |
| 162 | + |
| 163 | +# Streaming client options #################################################### |
| 164 | +# |
| 165 | +[streaming_client] |
| 166 | + |
| 167 | +# Volume assigned to new snapclients [percent] |
| 168 | +# Defaults to 100 if unset |
| 169 | +initial_volume = 100 |
| 170 | +# |
| 171 | +############################################################################### |
| 172 | + |
| 173 | + |
| 174 | +# Logging options ############################################################# |
| 175 | +# |
| 176 | +[logging] |
| 177 | + |
| 178 | +# log sink [null,system,stdout,stderr,file:<filename>] |
| 179 | +# when left empty: if running as daemon "system" else "stdout" |
| 180 | +#sink = |
| 181 | + |
| 182 | +# log filter <tag>:<level>[,<tag>:<level>]* |
| 183 | +# with tag = * or <log tag> and level = [trace,debug,info,notice,warning,error,fatal] |
| 184 | +#filter = *:info |
| 185 | +# |
| 186 | +############################################################################### |
0 commit comments