Video settings

Options related to video.

Video conversion

Options related to video conversion.

Preferred proportional scale.

settings.video.converter.proportional_scale.set(true)

Preferred video converter

settings.video.converter.preferred.set("ffmpeg")

List of encodings to try for automatic encoding detection

settings.tag.encodings.set(["UTF-8", "ISO-8859-1"])

SRT configuration

Poll configuration

Timeout for polling loop, in ms

settings.srt.poll.timeout.set(100)

Route srt logs through liquidsoap’s logs

settings.srt.log.set(true)

Level

settings.srt.log.level.set(5)

Enforce consistent encryption settings on both end of any connection.

settings.srt.enforced_encryption.set(true)

Server configuration

The server is an abstract text-command-based communication protocol, which can be used through several interfaces.

Timeout for read/write operations.

A negative value disables timeout.

settings.server.timeout.set(30.)

Support for communication via a telnet interface

This allows you to communicate with the server via a telnet interface,i.e., a simple text-based communication over TCP.The standard “telnet” command will allow you to communicate throughthat interface, as well as the telnet libraries available in mostscript languages.Since there is currently no authentication, you should be carefulabout who can access this interface: either restrict it to connectionsfrom localhost (using the bind_addr param) or set up a firewall.

settings.server.telnet.set(false)

Perform reverse DNS lookup to get the client’s hostname from its IP.

settings.server.telnet.revdns.set(false)

Port on which the telnet server should listen

settings.server.telnet.port.set(1234)

Network mask from which the telnet server should accept connections

settings.server.telnet.bind_addr.set("127.0.0.1")

Support for communication via a UNIX domain socket interface

The main advantage of this method is that you can set very preciselythe access permissions for the socket, just like for any other file.A useful command to use this interface is: “socat stdin unix:”.

settings.server.socket.set(false)

Socket permissions, up to umask

This parameter is better written in octal notation. Although you can write octal numbers like 0o660, they are not displayed back in octal. For example, the default value 384 is the decimal for 0o600.

settings.server.socket.permissions.set(384)

Path of the UNIX domain socket

In this filename, <pid>, <script> and <sysrundir> are replaced by their respective values: PID of the instance of liquidsoap,base name of the .liq script (if any), default runtime data directory.

settings.server.socket.path.set("<sysrundir>/<script>.sock")

Log configuration.

Default log level for messages.

settings.server.log.level.set(3)

Internal scheduler

The scheduler is used to process various tasks in liquidsoap.There are three kinds of tasks:“Non-blocking” ones are instantaneous to process, these are onlyinternal processes of liquidsoap like its server.“Fast” tasks are those that can be long but are often not,such as request resolution (audio file downloading and checking).Finally, “slow” tasks are those that are always taking a long time,like last.fm submission, or user-defined tasks register viathread.run.The scheduler consists in a number of queues that process incomingtasks. Some queues might only process some kinds of tasks so thatthey are more responsive.Having more queues often do not make the program faster in average,but affect mostly the order in which tasks are processed.

Non-blocking queues

Number of queues dedicated to internal non-blocking tasks.These are only started if such tasks are needed.There should be at least one.

settings.scheduler.non_blocking_queues.set(2)

Log scheduler messages

settings.scheduler.log.set(false)

Generic queues

Number of event queues accepting any kind of task.There should at least be one. Having more can be useful to make surethat trivial request resolutions (local files) are not delayedbecause of a stalled download. But N stalled download can blockN queues anyway.

settings.scheduler.generic_queues.set(2)

Fast queues

Number of queues that are dedicated to fast tasks.It might be useful to create some if your request resolutions,or some user defined tasks (cf thread.run), aredelayed too much because of slow tasks blocking the generic queues,such as last.fm submissions or slow thread.run handlers.

settings.scheduler.fast_queues.set(0)

Sandboxing for external processes.

settings.sandbox.set(false)

Environment variables to unset.

settings.sandbox.unsetenv.set([])

Run command inside shell.

settings.sandbox.shell.set(true)

Patch to shell binary. Defaults to $SHELL if set and “/bin/sh” otherwise.

settings.sandbox.shell.path.set("/bin/sh")

Additional default environment variables.

settings.sandbox.setenv.set(["TEMPDIR=/tmp", "TEMP=/tmp", "TMPDIR=/tmp", "TMP=/tmp"])

Read/write directories. Default: [$HOME;$TMPDIR].

settings.sandbox.rw.set(["/home/opam", "/tmp"])

Read-only directories

settings.sandbox.ro.set(["/"])

Enable network

settings.sandbox.network.set(true)

Sandbox binary to use.

settings.sandbox.binary.set("bwrap")

Streaming clock settings

Maximum latency in seconds

If the latency gets higher than this value, the outputs will be reset,instead of trying to catch it up second by second.The reset is typically only useful to reconnect icecast mounts.

settings.root.max_latency.set(60.)

Requests configuration

Decoders and order used to decode files’ metadata.

settings.request.metadata_decoders.set(["FFMPEG", "FLAC", "MP4", "OGG", "TAGLIB", "ID3V2", "GSTREAMER"])

Allow metadata resolvers to override metadata already set through annotate: or playlist resolution for instance.

settings.request.metadata_decoders.override.set(false)
settings.request.metadata_decoders.duration.set(false)

Number of requests at which a leak warning should be issued.

settings.request.leak_warning.set(100)

Time (in seconds) after which a destroyed request cannot be accessed anymore.

settings.request.grace_time.set(600.)

Metric reporting using prometheus.

Enable the prometheus server.

settings.prometheus.server.set(false)

Port to run the server on.

settings.prometheus.server.port.set(9090)

Playlist formats

Mime-types used for guessing playlist formats.

When a mime-type is available (e.g. with input.http), it can be usedto guess which playlist format to use.This section contains the listings used for that detection, which youmight want to tweak if you encounter a new mime-type.If you feel that new mime-types should be permanently added, pleasecontact the developers.

Mime types associated to XML-based playlist formats

settings.playlists.mime_types.xml.set(["video/x-ms-asf", "audio/x-ms-asx", "text/xml", "application/xml", "application/smil", "application/smil+xml", "application/xspf+xml", "application/rss+xml"])

Cue out metadata for playlists with track index.

Some playlists format, such as CUE files specify index points to starttracks playback. In this case, tracks are resolved to a annotate: request witha cue-in metadata containing the index. If you want to make use of this index,you should specify here what label you want for this metadata and use the cue_cutoperator on the resulting source

settings.playlists.cue_out_metadata.set("liq_cue_out")

Cue in metadata for playlists with track index.

Some playlists format, such as CUE files specify index points to starttracks playback. In this case, tracks are resolved to a annotate: request witha cue-in metadata containing the index. If you want to make use of this index,you should specify here what label you want for this metadata and use the cue_cutoperator on the resulting source

settings.playlists.cue_in_metadata.set("liq_cue_in")

Interactions through the OSC protocol.

Port for OSC server.

settings.osc.port.set(7777)

Parameters for the mpd protocol.

Randomize order of MPD’s results.

settings.mpd.randomize.set(true)

MPD port.

settings.mpd.port.set(6600)

Directory where MPD’s music is located.

settings.mpd.path.set("/var/lib/mpd/music")

MPD host.

settings.mpd.host.set("127.0.0.1")

Debug communications with MPD server.

settings.mpd.debug.set(false)

Log configuration

Display unix timestamps (subsecond accuracy, timezone independant)

settings.log.unix_timestamps.set(false)

Log to stdout

settings.log.stdout.set(true)

General log level

settings.log.level.set(3)

Log to file

settings.log.file.set(false)

Log file permissions

settings.log.file.perms.set(384)

Path to log file

settings.log.file.path.set("<syslogdir>/<script>.log")

Append log to the file

settings.log.file.append.set(true)

Language configuration.

Debug errors by showing stacktraces instead of printing messages.

settings.lang.debug_errors.set(false)

Debug language features such as type inference and reduction.

settings.lang.debug.set(false)

Initialization configuration

Dump an initialization trace

settings.init.trace.set(false)

Start liquidsoap even without any active source

This should be reserved for advanced dynamic uses of liquidsoap.

settings.init.force_start.set(false)

Run in daemon mode

settings.init.daemon.set(false)

Support for pidfile generation

settings.init.daemon.pidfile.set(true)
Unix file permissions for pidfile. Default: 0o640.
settings.init.daemon.pidfile.perms.set(416)
Path to pidfile
settings.init.daemon.pidfile.path.set("<sysrundir>/<script>.pid")

Changes the effective user (drops privileges).

settings.init.daemon.change_user.set(false)
User used to run the daemon.
settings.init.daemon.change_user.user.set("daemon")
Group used to run the daemon.
settings.init.daemon.change_user.group.set("daemon")

Catch exceptions, use false to backtrace exceptions

settings.init.catch_exn.set(true)

Allow liquidsoap to run as root

This should be reserved for advanced dynamic uses of liquidsoap such as running inside an isolated environment like docker.

settings.init.allow_root.set(false)

Harbor settings (Icecast/shoutcast stream receiver).

Display passwords, for debugging.

settings.harbor.verbose.set(false)

Timeout for network operations (in seconds).

settings.harbor.timeout.set(300.)

Harbor SSL settings.

Read timeout on SSL sockets. Set to zero to never timeout, ignored (system default) if negative.

settings.harbor.ssl.write_timeout.set(-1.)

Read timeout on SSL sockets. Set to zero to never timeout, ignored (system default) if negative.

settings.harbor.ssl.read_timeout.set(-1.)

Path to the server’s SSL private key. (mandatory)

settings.harbor.ssl.private_key.set("")

Path to the server’s SSL password. (optional, blank if omitted)

settings.harbor.ssl.password.set("")

Path to the server’s SSL certificate. (mandatory)

settings.harbor.ssl.certificate.set("")

Perform reverse DNS lookup to get the client’s hostname from its IP.

settings.harbor.reverse_dns.set(false)

Maximum of pending source requests per port.

settings.harbor.max_connections.set(2)

Content-type (mime) of formats which allow shout metadata update.

settings.harbor.icy_formats.set(["audio/mpeg", "audio/aacp", "audio/aac", "audio/x-aac", "audio/wav", "audio/wave", "audio/flac", "audio/x-flac"])

IP addresses on which the harbor should listen.

settings.harbor.bind_addrs.set(["0.0.0.0"])

Media decoding/encoding through gstreamer.

Maximal number of buffers.

settings.gstreamer.max_buffers.set(10)

Add borders in order to keep video aspect ratio.

settings.gstreamer.add_borders.set(true)

Frame format

Settings for the data representation in frames, which are theelementary packets of which streams are made.

Video settings

Image width

settings.frame.video.width.set(1280)

Image height

settings.frame.video.height.set(720)

Frame rate

settings.frame.video.framerate.set(25)

Set to true to force video content even when no video content is explicitly requested, for instance: output.dummy(noise())

settings.frame.video.default.set(false)

MIDI parameters

Default number of channels

settings.frame.midi.channels.set(0)

Tentative frame duration in seconds

Audio samplerate and video frame rate constrain the possible frame durations.This setting is used as a hint for the duration, when ’frame.audio.size’is not provided.Tweaking frame duration is tricky but needed when dealing with latencyor getting soundcard I/O correctly synchronized with liquidsoap.

settings.frame.duration.set(0.04)

Audio (PCM) format

Tentative frame duration in audio samples

Audio samplerate and video frame rate constrain the possible frame durations.This setting is used as a hint for the duration, overriding’frame.duration’.Tweaking frame duration is tricky but needed when dealing with latencyor getting soundcard I/O correctly synchronized with liquidsoap.

settings.frame.audio.size.set(<value>)

Samplerate

settings.frame.audio.samplerate.set(44100)

Default number of channels

settings.frame.audio.channels.set(2)

FFMPEG configuration

Scaling algorithm

Set FFMPEG scaling algorithm. One of: “fast_bilinear”,“bilinear” or “bicubic”.

settings.ffmpeg.scaling_algorithm.set("bicubic")

Log configuration

Verbosity

Set FFMPEG log level, one of: “quiet”, “panic”, “fatal”, “error”, “warning”, “info”, “verbose” or “debug”

settings.ffmpeg.log.verbosity.set("warning")

Level

settings.ffmpeg.log.level.set(3)

Import and export alpha layers when converting to and from ffmpeg frames.

settings.ffmpeg.alpha.set(false)

Encoder settings

Settings for the encoder

Metadata settings

Settings for the encoded metadata.

Exported metadata

The list of labels of exported metadata.

settings.encoder.encoder.export.set(["artist", "title", "album", "genre", "date", "tracknumber", "comment", "track", "year", "dj", "next"])

Console configuration

Use color in console output when available. One of: “always”, “never” or “auto”.

settings.console.colorize.set("auto")

Clock settings

How often (in seconds) we should indicate catchup errors.

settings.clock.log_delay.set(1.)

Handling of streaming errors

Control the behaviour of clocks when an error occurs during streaming.This has no effect on errors occurring during source initializations.By default, any error will cause liquidsoap to shutdown. If errorsare allowed, faulty sources are simply removed and clocks keep running.Allowing errors can result in complex surprising situations;use at your own risk!

settings.clock.allow_streaming_errors.set(false)

Audio settings

Options related to audio.

Conversion settings

Options related to audio conversion.

Samplerate conversion settings

Options related to samplerate conversion.

Native samplerate conversion settings

Options related to native samplerate conversion.

Resampling quality

Resampling quality: either “nearest” or “linear”.

settings.audio.converter.samplerate.native.quality.set("linear")
Libsamplerate conversion settings

Options related to libsamplerate conversion.

Resampling quality

Resampling quality, one of: "best", "medium", "fast", "zero_order" or "linear". Refer to ocaml-samplerate for details.

settings.audio.converter.samplerate.libsamplerate.quality.set("fast")
Preferred samplerate converters

Preferred samplerate converter. The native converter is always available.

settings.audio.converter.samplerate.converters.set(["ffmpeg", "libsamplerate", "native"])

Channel layout conversion settings

Options related to channel layout conversion.

Preferred samplerate converters

Preferred channel layout converter. The native converter is always available.

settings.audio.converter.channel_layout.converters.set(["native"])

ALSA configuration

Number of periods

Set to 0 to disable this setting and use ALSA’s default.

settings.alsa.periods.set(0)

Buffer size, in frames

This is only used for buffered ALSA I/O, and affects latency.

settings.alsa.buffer_length.set(1)

Alsa internal buffer size

This setting is only used in buffered alsa I/O, and affects latency.Set to 0 to disable this setting and use ALSA’s default.

settings.alsa.alsa_buffer.set(0)

Settings for registered protocols

Settings for the ReplayGain protocol

ReplayGain path

settings.protocol.replaygain.path.set("/usr/local/share/liquidsoap/git/e0d0b7c1/bin/extract-replaygain")

Settings for the process protocol

List of environment variables passed down to the executed process.

settings.protocol.process.env.set([])

Inherit calling process’s environment when env parameter is empty.

settings.protocol.process.inherit_env.set(true)

Settings for the youtube-dl protocol

Path of the youtube-dl binary

settings.protocol.youtube_dl.path.set("youtube-dl")

Settings for the FFmpeg protocol

Path to the ffmpeg binary

settings.protocol.ffmpeg.path.set("ffmpeg")

Should the protocol extract metadata

settings.protocol.ffmpeg.metadata.set(true)

Should the protocol adjust ReplayGain

settings.protocol.ffmpeg.replaygain.set(false)

Settings for the text2wave protocol

Path to the text2wave binary

settings.protocol.text2wave.path.set("text2wave")

Settings for the gtts protocol

Path to the gtts binary

settings.protocol.gtts.path.set("gtts-cli")

Settings for the AWS protocol

Use a specific profile from your credential file.

settings.protocol.aws.profile.set(<value>)

Alternative endpoint URL (useful for other S3 implementations).

settings.protocol.aws.endpoint.set(<value>)

AWS Region

settings.protocol.aws.region.set(<value>)

Path to aws CLI binary

settings.protocol.aws.path.set("aws")

Settings for the polly protocol

Output format
settings.protocol.aws.polly.format.set("mp3")
Voice ID
settings.protocol.aws.polly.voice.set("Joanna")

settings.make.set(<fun>)

settings.make.void.set(<fun>)

settings.make.protocol.set(<fun>)

settings.make.external.set(<fun>)

Decoder settings

Taglib settings

Priorities used for choosing audio and video file decoders

Priority for the WAV decoder

settings.decoder.priorities.wav.set(1)

Priority for the OGG decoder

settings.decoder.priorities.ogg.set(1)

Priority for the MP4 decoder

settings.decoder.priorities.mp4.set(1)

Priority for the mpeg audio decoder

settings.decoder.priorities.mad.set(1)

Priority for the GStreamer decoder

settings.decoder.priorities.gstreamer.set(0)

Priority for the flac decoder

settings.decoder.priorities.flac.set(1)

Priority for the ffmpeg decoder

settings.decoder.priorities.ffmpeg.set(10)

Priority for the PCM/BASIC decoder

settings.decoder.priorities.basic.set(1)

Priority for the AIFF decoder

settings.decoder.priorities.aiff.set(1)

Priority for the AAC decoder

settings.decoder.priorities.aac.set(1)

Decoders and order used to decode image files.

settings.decoder.image_file_decoders.set(["PPM", "CAMLIMAGES", "SDL/IMAGE"])

Native ID3v2 parser settings

File extensions used for guessing audio formats

File extensions used for guessing WAV format

settings.decoder.file_extensions.wav.set(["wav", "wave"])

File extensions used for decoding metadata using TAGLIB

settings.decoder.file_extensions.taglib.set(["mp3"])

File extensions used for guessing OGG format

settings.decoder.file_extensions.ogg.set(["ogv", "oga", "ogx", "ogg", "opus"])

File extensions used for guessing MP4 format

settings.decoder.file_extensions.mp4.set(["m4a", "m4b", "m4p", "m4v", "m4r", "3gp", "mp4"])

File extensions used for guessing MP3 format (DEPRECATED, use *.mad configuration keys!)

settings.decoder.file_extensions.mp3.set(["mp3", "mp2", "mp1"])

File extensions used for guessing mpeg audio format

settings.decoder.file_extensions.mad.set(["mp3", "mp2", "mp1"])

File extensions used for decoding metadata using native ID3v2 parser

settings.decoder.file_extensions.id3v2.set(["mp3"])

File extensions used for guessing format handled by GStreamer

settings.decoder.file_extensions.gstreamer.set(["wma", "wmv", "avi", "mp4", "3gp", "webm", "mkv"])

File extensions used for guessing FLAC format

settings.decoder.file_extensions.flac.set(["flac"])

File extensions used for decoding with ffmpeg

settings.decoder.file_extensions.ffmpeg.set(["mp1", "mp2", "mp3", "m4a", "m4b", "m4p", "m4v", "m4r", "mov", "3gp", "mp4", "wav", "flac", "ogv", "oga", "ogx", "ogg", "opus", "wma", "webm", "wmv", "avi", "mkv", "aac", "osb"])

File extensions used for guessing AIFF format

settings.decoder.file_extensions.aiff.set(["aiff", "aif", "aifc"])

File extensions used for guessing AAC format

settings.decoder.file_extensions.aac.set(["aac"])

Media decoders.

settings.decoder.decoders.set(["WAV", "AIFF", "PCM/BASIC", "MIDI", "IMAGE", "RAW AUDIO", "FFMPEG", "FLAC", "AAC", "MP4", "OGG", "MAD", "GSTREAMER"])

Maximum debugging information (dev only)

WARNING: Do not enable unless a developer instructed you to do so!The debugging mode makes it easier to understand why decoding fails,but as a side effect it will crash liquidsoap at the end of everytrack.

settings.decoder.debug.set(false)

Mime-types used for choosing audio and video file decoders

When a mime-type is available (e.g. with input.http), it can be usedto guess which audio stream format is used.This section contains the listings used for that detection, which youmight want to tweak if you encounter a new mime-type.If you feel that new mime-types should be permanently added, pleasecontact the developers.

Mime-types used for guessing WAV format

settings.decoder.mime_types.wav.set(["audio/vnd.wave", "audio/wav", "audio/wave", "audio/x-wav"])

Mime-types used for decoding metadata using TAGLIB

settings.decoder.mime_types.taglib.set(["audio/mpeg"])

Mime-types used for guessing OGG format.

settings.decoder.mime_types.ogg.set(["audio/opus", "application/ogg", "application/x-ogg", "audio/x-ogg", "audio/ogg", "video/ogg"])

Mime-types used for guessing MP4 format

settings.decoder.mime_types.mp4.set(["audio/mp4", "application/mp4"])

Mime-types used for guessing MP3 format (DEPRECATED, use *.mad configuration keys!)

settings.decoder.mime_types.mp3.set(["audio/mpeg", "audio/MPA"])

Mime-types used for guessing mpeg audio format

settings.decoder.mime_types.mad.set(["audio/mpeg", "audio/MPA"])

Mime-types used for decoding metadata using native ID3v2 parser

settings.decoder.mime_types.id3v2.set(["audio/mpeg"])

Mime-types used for guessing format handled by GStreamer

settings.decoder.mime_types.gstreamer.set(["application/gstreamer"])

Mime-types used for guessing FLAC format

settings.decoder.mime_types.flac.set(["audio/flac", "audio/x-flac"])

Mime-types used for guessing PCM/BASIC format

settings.decoder.mime_types.basic.set(["audio/basic"])

Mime-types used for guessing AIFF format

settings.decoder.mime_types.aiff.set(["audio/x-aiff", "audio/aiff"])

Mime-types used for guessing AAC format

settings.decoder.mime_types.aac.set(["audio/aac", "audio/aacp", "audio/x-hx-aac-adts"])

Mime types supported by the ffmpeg stream decoder

settings.decoder.mime_types.ffmpeg.set([])

External decoders settings

Settings for the FFmpeg external decoder

Path to ffmpeg binary
settings.decoder.external.ffmpeg.path.set("ffmpeg")

Settings for the FFprobe external decoder

Path to ffprobe binary
settings.decoder.external.ffprobe.path.set("ffprobe")

Settings for the mpcdec external decoder

Path to mpcdec binary
settings.decoder.external.mpcdec.path.set("mpcdec")

Settings for the flac external decoder

Path to flac binary
settings.decoder.external.flac.path.set("flac")

Settings for the metaflac external decoder

Path to metaflac binary
settings.decoder.external.metaflac.path.set("metaflac")

Settings for the faad external decoder

Path to faad binary
settings.decoder.external.faad.path.set("faad")