MeteorLight/example_config.toml

133 lines
4.1 KiB
TOML
Raw Normal View History

2022-03-01 23:31:29 +00:00
# Kawa-compatible configuration file with extensions
[api]
#
# The HTTP port the MeteorLight API listens on.
2022-03-01 23:31:29 +00:00
port=4040
# The HTTP bind address API will listen on.
host="127.0.0.1"
2022-03-01 23:31:29 +00:00
[queue]
#
# An HTTP GET is sent to this URL when MeteorLight's queue is empty and it needs a new
2022-03-01 23:31:29 +00:00
# random track to play. The expected response is an arbitrary JSON blob that
# MeteorLight stores in its queue. At a minimum, it must include the "path" property:
2022-03-01 23:31:29 +00:00
#
# {
# "path": "/path/to/audio/file"
# }
#
# The path is the path to an audio file on the filesystem you want MeteorLight to play.
# It can also be an http(s) URL, that supports Range requests and returns proper Content-Length.
# Additionally, the "title", "artist" and "art" properties can be included to be used as metadata.
# If "title", "artist" are not specified, file tags may be used.
2022-05-21 14:02:03 +00:00
#
# If the key "hash" exists and song_fetch_url is set,
# hash will be appended and downloaded from that location.
2022-03-01 23:31:29 +00:00
random_song_api="http://localhost:8012/api/random"
2022-05-21 14:02:03 +00:00
song_fetch_url=""
2022-03-01 23:31:29 +00:00
#
# An HTTP POST is issued to this URL when MeteorLight starts playing a track. The body
2022-03-01 23:31:29 +00:00
# will be identical to the JSON blob in the queue.
np="http://localhost:8012/api/np"
#
# An HTTP POST is issued to this URL when MeteorLight fetches a random track. The body
# will be identical to the JSON blob in memory.
# Can be left empty to not send nr events
nr="http://localhost:8012/api/nr"
#
2022-03-01 23:31:29 +00:00
# When no tracks are available for whatever reason (such as external service
# outages), this track will be played.
fallback="/tmp/in.flac"
# Length of buffer to maintain in KiB (not implemented)
# buffer_len=4096
# Duration in seconds of buffer to maintain. Set 0 for automatic mode depending on requesting client.
# Maximum 10 seconds.
2022-03-04 12:25:59 +00:00
# Do note buffer is counted from end of frame, not start, for removal purposes. This depends on format and can be a second or so at times.
buffer_duration=0
#
# Apply replaygain track tags if existent on files played.
2022-03-08 14:10:06 +00:00
# If ReplayGain tags are not existent, it will normalize audio with a running weighted window of 5 seconds.
# ReplayGain tag overrides can be added as properties on track blobs:
# {
# "replay_gain" : {
# "track_peak": 1.0000,
# "track_gain": -3.15821
# }
# }
replaygain=false
2022-03-01 23:31:29 +00:00
# Set the sample rate of the queue. Default is 44100
# Some codecs (example: Opus) will output at a different samplerate.
#samplerate=44100
2022-03-01 23:31:29 +00:00
[radio]
#
# The port to stream actual audio on. MeteorLight will listen on localhost.
2022-03-01 23:31:29 +00:00
port=8001
# Name of the stream.
name="my radio"
# Description of the stream.
description=""
# URL of the stream.
url=""
# Logo URL of the radio
logo=""
# Whether to make the radio "private" via headers
private=false
2022-03-01 23:31:29 +00:00
#
# A list of streams to make available at [radio.port]/*(mount) follows. The
2022-03-01 23:31:29 +00:00
# following properties are available:
#
# mount: the HTTP address to serve the stream from
# container: the container format to use (ogg, flac, aac/adts, or mp3). See Kirika's supported format list.
# codec: the audio codec to use (opus, flac, aac, or mp3)
2022-03-01 23:31:29 +00:00
# bitrate: the desired bitrate of the stream in Kb/s, if not specified (or 0) an appropriate
# bitrate will be automatically selected based on the container/codec
# MeteorLight extension: bitrate can be a string (for example, v0-v9 on MP3). codec can also be he-aacv2. No vorbis support.
# Additionally further options can be set on some codecs.
# - FLAC supports bitdepth (int), compression_level (int), block_size (int)
# - AAC supports VBR bitrate (vbr1 - vbr5), mode (lc, he, hev2) and afterburner (bool)
# - MP3 supports VBR bitrate (v0 - v9)
# - All but Opus support setting samplerate
# - All support setting channels to 1 or 2
2022-03-01 23:31:29 +00:00
[[streams]]
mount="stream128.mp3"
container="mp3"
bitrate=128
[[streams]]
mount="stream192.mp3"
container="mp3"
bitrate=192
[[streams]]
mount="stream128.aac"
codec="aac"
2022-03-01 23:31:29 +00:00
container="aac"
bitrate=128
[[streams]]
mount="stream128.opus"
container="ogg"
codec="opus"
bitrate=128
[[streams]]
mount="stream192.opus"
container="ogg"
codec="opus"
bitrate=192
[[streams]]
mount="stream256.opus"
container="ogg"
codec="opus"
bitrate=256
[[streams]]
mount="stream.flac"
codec="flac"
# Also supports ogg
2022-03-01 23:31:29 +00:00
container="flac"