Liquidsoap is a powerful and flexible language for describing audio and video streams. It offers a rich collection of operators that you can combine at will for creating or transforming streams.
Liquidsoap in AzuraCast
AzuraCast uses Liquidsoap as the the AutoDJ to generate and manipulate audio streams. It transforms the input streams to the correct format for each mount point, handles live DJ connections, filtering, compression, and more.
Liquidsoap Annotation Reference
This information is intended for plugin developers who are looking to supply additional annotation metadata to Liquidsoap. It is a compilation of information that wasn’t available elsewhere online, and is intended only for advanced users.
Append an extra track to every track.
Set the metadata ‘liq_append’ to ‘false’ to inhibit appending on one track.
Common effects like cross-fading can be split into two parts: crossing, and fading. Here we implement crossing, not caring about fading: a arbitrary transition function is passed, taking care of the combination.
A buffer is needed to store the end of a track before combining it with the next track. We could always have a full buffer, but this would involve copying all the time. Instead, we try to fill the buffer only when getting close to the end of track. The problem then is to cope with tracks which are longer than expected, i.e. which end doesn’t really fit in the buffer.
This operator works with any type of stream. All three parameters are durations in ticks.
Metadata field which, if present and containing a float, overrides the ‘duration’ parameter for current track.
The [cue_cut] class is able to skip over the beginning and end of a track according to cue points. This involves quite a bit of trickery involving clocks, #seek as well as reverting frame contents. Even more trickery would be needed to implement a [cue_split] operator that splits tracks according to cue points: in particular, the frame manipulation would get nasty, involving storing chunks that have been fetched too early, replaying them later, glued with new content.
We use ticks for precision, but store them as Int64 to allow long durations. This should eventually be generalized to all of liquidsoap, removing limitations such as the duration passed to #seek or returned by #remaining. We introduce a few notations to make this comfortable.
Start track after a cue in point and stop it at cue out point. The cue points are given as metadata, in seconds from the begining of tracks.
Metadata for cue in points.
Metadata for cue out points. Note that cue-out should be given relative to the beginning of the file (0:00 of the file itself, not 0:00 as calculated by the cue-in point).
Fade durations (in, initial, out, final) are indicated in total seconds.
Metadata field which, if present and correct, overrides the ‘type’ parameter for current track.
Options: lin|sin|log|exp (linear, sinusoidal, logarithmic or exponential)
Fade the beginning of tracks.
Fade the beginning of a stream.
Fade the end of tracks.
Fade a stream to silence.
Call a given handler when position in track is equal or more than a given amount of time (the ‘offset’ parameter)
Metadata field which, if present and containing a float, overrides the ‘offset’ parameter.
Prepend an extra track before every track.
Set the metadata ‘liq_prepend’ to ‘false’ to inhibit appending on one track.
Multiply the amplitude of the signal.
Specify the name of a metadata field that, when present and well-formed, overrides the amplification factor for the current track. Well-formed values are floats in decimal notation (e.g. ‘0.7’) which are taken as normal/linear multiplicative factors; values can be passed in decibels with the suffix ‘dB’ (e.g. ‘-8.2 dB’, but the spaces do not matter).
Fade the beginning of tracks. Metadata ‘liq_video_fade_in’ can be used to set the duration for a specific track (float in seconds).
Fade the end of tracks. Metadata ‘liq_video_fade_out’ can be used to set the duration for a specific track (float in seconds).
LADSPA is a standard that allows software audio processors and effects to be plugged into a wide range of audio synthesis and recording packages.
Our latest rolling-release Docker image and Ansible scripts add support for LADSPA to Liquidsoap. We include several popular plugins, allowing you to perform powerful equalization in your configuration.
Use the following command to view all the available LADSPA plugins that come pre-installed with AzuraCast:
docker-compose exec --user=azuracast web liquidsoap --list-plugins
To get detailed information about the usage of a specific LADSPA plugin use the following command and replace the
plugin part of the
ladspa.plugin with the name of the plugin you want to look at:
docker-compose exec --user=azuracast web liquidsoap -h ladspa.plugin
We have modified the MK Pascal script to work with AzuraCast.
You can check out the full script here that you can include in your Liquidsoap configuration via the
Edit Liquidsoap Configuration page of your station after enabling the Advanced Features.