[ANN] Liquidsoap 2.0.0

It is with great excitement and some ~2 years of anticipation that we have the pleasure to announce the release of Liquidsoap 2.0.0!


The release is currently being deployed to opam and should be available through their main repository shortly. If you need to install it right away you can do:

git clone https://github.com/savonet/liquidsoap.git
cd liquidsoap && git checkout v2.0.0
opam install -y .

The release also includes binary packages for a bunch of platforms/OSes.

:thinking: What is liquidsoap?

Liquidsoap is a statically-typed, type-inferred, functional scripting language equipped with specialized operators to build audio and video stream automation.

The liquidsoap language offers all the flexibility and expressivity of a fully featured programming language to help build your media streams.

Using liquidsoap, one can very quickly stand up a media streaming platform that can rotate files from playlists, accept live DJ input, mux audio and video, encode (or not!) and send the resulting data to youtube, icecast, HLS and more…

:white_check_mark: Why liquidsoap?

While there are many tools that offer competing features, the real difference with liquidsoap is its scripting language.

Setting up tools using configuration files is often easier and more straight forward, however, when it comes to the finer details, such as inserting jingles between shows, defining crossfades between tracks and more, potentially, each project has its own set of expectations, and this is where liquidsoap becomes really useful!

:zap: What’s new in Liquidsoap 2.0.0? :zap:

Liquidsoap 2.0.0 brings major improvements in two areas:

:film_projector: Video support via ffmpeg

While video has been supported for a while, audio remained the primary target of the software. This is all changed now! In keeping with the tradition of focusing on what we do well and delegating to others what they have expertise on, we implemented a tight integration of the remarkably awesome ffmpeg API.

This has brought to liquidsoap all the exciting features of ffmpeg, including support for multiple input and output formats, filters and also support for end-to-end encoded content, which allows liquidsoap, when possible, to stream content without having to re-encode it, a long requested user feature.

Our aim with the ffmpeg integration is to become a scripting language built on top of ffmpeg in such ways that, if something is possible with the ffmpeg command-line, it should be possible with liquidsoap.

Meanwhile, the scripting language also provides functionalities based on ffmpeg that are either hard or impossible to implement using the command-line executable, such as fully typed, composable ffmpeg filter operators and shared encoding

:gear: Expanded language features

With this release, the liquidsoap language is expanded, introducing multiple features much needed for the comfort of the programmer such as:

  • Module and records, allow to attach method to variables
  • Exception handling
  • Support for structured data, tuples and etc.

Along with these changes, we have released The Liquidsoap Book, which we hope will help users of all skill level to work with the liquidsoap language and streaming projects.

But we are not stopping here! We have even more exciting features in store for the liquidsoap language, some of them already committed to the main development branch.

:children_crossing: Roadmap and versioning

Our roadmap consists of:

:construction: Bugfix releases

While we are satisfied with the current 2.0.0 release and believe it is safe to use for production-ready work, software projects are never free of bugs so we will keep improving on the current stable branch.

Stable releases are numbered using the patch part of their version, i.e. 2.0.x. However, when it comes to liquidsoap, it is important to keep in mind that some of our operators have complex behavior and interactions with each other. While we do our best to maintain backward compatibility between bugfix versions, we always recommend to test them in a staging area before pushing them to production.

Our workflow for reporting bugs is via github’s issues tracker. This is our preferred way to keep track of issues, discuss them and mark them as fixed. If you have questions related to setting up your script, installing liquidsoap and etc, you can also start a discussion. In some cases, issues get transfered to discussions as we see fit and, also, discussions can in fact lead to reporting an associated issue.

We do encourage all reports as we find a lot of value in our users feedback. We try to respond to all of them diligently but we also appreciated your patience.

:bulb: Future major release

While we were busy stabilizing the current stable branch, we couldn’t resist working on new features! So far, it looks like the next major release will focus on expanding the language’s capabilities with features such as:

  • Support for variable in encoders
  • Generalized extraction patterns
  • First-class module system
  • Vastly improved support for json parsing and rendering
  • Type-system flexibility improvements

A vision that we have is to bring the liquidsoap language to the same flexibility and type-safety as languages such as TypeScript but with inferred types so you never have to write them (99% of the time…)! :slightly_smiling_face:

:rocket: Need help?

If you need help with your liquidsoap project, you can join our online chat room, which is currently hosted on slack. We also provide professional support. Holler at us if you are in such need we’d love to see how we can help as well!


Congratulation for the release! It is a very interesting project

I get a 404 error when accessing these links

Thanks and thanks for the report, we forgot to generate the online doc for 2.0.0 haha this is getting built now!

I’m super curious about the use cases this unlocks. I can imagine that it can be used to implement a “web tv” (play video clips at random from a directory and cut to a live video stream on demand), but does it handle more dynamic behavior like compositing and scene switching? Concretely I’m wondering if this can replace some (simple) uses of obs studio to do some live streaming.

1 Like

Video support via ffmpeg

Is it possible to handle streaming well? Let’s say I want to have fallbacks when sources fail, any idea on how simple is that?

Exactly this. With the pandemic I’m ending up recording talks to be screened later to a real audience, and I haven’t found a very satisfying workflow (using obs for this feels heavy and cumbersome). It might be a good excuse to play with Liquidsoap, which to me was always this awesome-but-distant web-radio tool. Are there examples in the Liquidsoap book that are relevant to this usecase?

(For me the main use-case is to run a script that records video from my webcam and audio from my microphone and aggregates them in a mp4 file, to be stopped on some keypress on my side. In theory more advanced controls would help (see Automatic Video Editing), but I would guess that those require new language operators and cannot really be written as a library.)

1 Like


Having the ability to replicate OBS like functionalities as a backend is one of the vision for the use of the language, indeed. One feature that we are planning related to that is to support video layers a-la OBS: Add support for video canvas content type · Issue #1261 · savonet/liquidsoap · GitHub

Related to your use-case, mixing webcam video and audio is already possible and, I believe, covered by The Liquidsoap Book.

The only part that isn’t clear to me is “stopped on some keypress”, what do you mean by that exactly?

1 Like

I would expect that it is possible to tell the program to stop recording, and it generates a proper file ending for the expected format. Maybe this is simply achieved by terminating the Liquidsoap interpreter. (But richer forms of interactive control would also be of interest in the future, see the link above on Auto-Editing.)

You should be able to dynamically create and destroy sources!