Replies: 2 comments 2 replies
-
Hurray! Thank you, @toots! |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hello @toots , |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Liquidsoap 2.3.0
We are stoked to announce the release of liquidsoap
2.3.0
! 🎉 ✨This release brings a lot of exciting changes. As usual, we recommend to first test it in a staging environment before deploying it to production. Migration notes for this release can be found here.
A lot of hard engineering work went into this release! The largest changes should that happened during this cycle were under the hood:
Complete re-implementation of the streaming cycle and clocks
This change allowed us to prepare the codebase to use OCaml's new multicore support in future releases and get rid of design decisions that were 20 years old now. Back then, we had no idea how things would evolve! In particular, we had to account for new form of content such as raw video and encoded content.
Instead of filling a partial frame during the streaming cycle, we are now manipulating chunks of immutable content, concatenating them to build a frame on each streaming cycle. This is much more inline with the logic underlying video and encoded content where pieces of content can happen at random time, according to their presentation timestamp (PTS) or decoder timestamp (DTS).
Abstracting content this way has allowed us to finally get rid of frame breaks doubling as both track marks and partial filling marks. With the new content model, track marks and metadata are first-class content and part of the frame generation.
If you have ever encountered any of the infamous
#get_frame didn't add exactly one break!
fatal error, you know what we mean. This early design decision had plagued us for a while and it's wonderful to see it gone!Along with these changes, we also reimplemented from scratch our notion of clocks, the abstract API that runs the main streaming cycles.
While clocks are still a pretty complex topic (self-sync, active vs. passive etc), we hope that this rewrite will clarify things. It was a good opportunity to clean up our implementation and use the experience gained about it in the recent years.
With these changes, clocks are now surfaced to the user via a
clock
method on each source. This makes it possible to directly access source clocks, animate them in your script, etc. We've also started to support synchronous streaming scripts, which should make it possible to use liquidsoap as a CLI for offline processing.Script caching and memory optimization
Another important new feature with this release is the ability to cache the standard library and user scripts. This allows liquidsoap to run much faster. More details are available in this blog post
Incidentally, script caching also has very important benefits for memory usage. This is documented here.
This feature is probably the most important one of this release for most users!
Internal autocue
Autocue, the method for computing the perfect crossfade has also been polished in this release. We have now switched to our internal implementation, which is available when enabling our
ffmpeg
support.You should be able to enable it by adding this to your script:
With this, all requests should resolve with the appropriate metadata so that any
crossfade
produces perfect transitions!Remember that this feature requires CPU-heavy computations on each track!
A lot of testing went into this feature so we are really thankful to our users for the support and patience!
Other new features
Here's a list of other notable changes in this release:
0.02s
. This should enhance streams latency and was made possible thanks to the new streaming implementation. See Change default frame duration to 0.02 #4033 for a discussion about the trade-offs involved with this setting.The rest of the changelog is included below.
As with each release, we want to thank all our users for their patience, early testing and collaboration to make this release possible. It's a testament to their help that we are able to ship this release with such a level of confidence despite all the major changes that happened in the code base.
Special thanks go to: @vitoyucepi, @gAlleb, @RM-FM, @Moonbase59, @Russsgithub, @gilou, Xogium, the whole AzuraCast and Radio France team and everyone who helped reporting, fixing and confirming bugs.
Thanks y'all!
2.3.0 (2024-11-27)
New:
should greatly impact impredictable side-effect of the previous models w.r.t.
track marks, content sharing and more. This also impacts multiple operators
behavior. Mostly, things should be roughly the same with differences around
behaviors related to track marks (
source.on_track
and etc). (New streaming model #3577)support multicore when the OCaml compiler is mature enough to allow it. Clocks
are now attached to sources via their
clock
methods. Returned value is a strippeddown
clock
variable. Users can use theclock
function to retrieve the fullmethods, e.g.
s = sine(); c = clock(s.clock)
. This value has advanced functionsfor clock control such as
start
/stop
,ticks
andself_sync
to check forself-sync
. (Reclock #3781)0.04s
.Smaller frames means less latency and memory consumption at the expense of
a higher CPU usage (Smaller frames #3607)
0.02s
(Change default frame duration to 0.02 #4033)finally
to execute code regardless of whether or not an exception is raised(see: Add finally. #3895 for more details).
and created a huge maintenance and debugging burden and it had been marked as
deprecated for a while. Most, if not all of its features should be available using
ffmpeg
. (Remove gstreamer. #4036)taglib
support. It is superseded by the internalocaml-metadata
moduleand taglib, with its dependency on the C++ runtime library, has been causing issues
with binary builds portability and crashes with the (not yet supported) OCaml 5
compiler. (Remove taglib, add more tags build config. #4087)
video.canvas
to make it possible to position video elements independentlyof the rendered video size (#3656, blog post)
%ffmpeg
encoder, enabled by default when onlyone stream is encoded.
metadata.getter.source.float
(Addmetadata.getter.source.float
. #3356).duration
andticks
to metadata available when computing HLS segment names (Expand HLS segment name metadata #4135)main_playlist_writer
tooutput.file.hls
andderivated operator (Add scripted main playlist writer for HLS output. #3484)
is_nan
,is_infinite
,ceil
,floor
,sign
andround
(Math functionfloor
,ceil
,sign
andround
#3407)%track.drop
to the%ffmpeg
encoder to allow partial encodingof a source's available tracks (Add support for %*.drop tracks in ffmpeg encoder. #3480)
let { foo? } = ...
pattern matching (Nullable record pattern #3481)metadata.replaygain
method to extract unified replay gain value from metadata (feat!: Unify ReplayGain handling and calculation #3438).metadata.parse.amplify
to manually parse amplify override metadata.compute
parameter tofile.replaygain
to control gain calculation (feat!: Unify ReplayGain handling and calculation #3438).compute
parameter toenable_replaygain_metadata
to control replay gain calculation (feat!: Unify ReplayGain handling and calculation #3438).copy:
protocol (Add copy: protocol. #3506)file.touch
.string.of_int
andstring.spaces
.list.assoc.nullable
.source.cue
(Add operation to generate CUE files. #3620).string.chars
(Take encoding into account instring
functions. #4111)macos_say
speech synthesis protocol. Make it the default implementation for thesay:
protocol on
macos
.settings.request.timeout
to set the request timeout globally.Changed:
request.once
,single
and more usingsource.dynamic
. Removed experimentflag on
source.dynamic
. The operator is considered stable enough to define advanced sourcesbut the user should be careful when using it.
int
can optionally raises an error when passingnan
orinfinity
,int(infinity)
now returns
max_int
andint(-infinity)
returnsmin_int
. (Math functionfloor
,ceil
,sign
andround
#3407)source.dump
andsource.drop
in favor of saferrequest.dump
andrequest.drop
.source.{dump, drop}
can still be implemented manually when needed and with the properknowledge of what's going on.
on_offset
and dropped the metadatamechanism for updating it (Allow a float getter for the offset of
on_offset
. #3355).string.length
andstring.sub
now default toutf8
encoding (String functions UTF-8 issue #4109)TERM
environment variable is not set.root
user insidedocker
container by default (Liquidsoap interactive in container with user root #3406).check_next
before playlist's requests resolutions (check_next
is evaluated after request resolution #3625)force
totrue
by default infile.copy
to make operator behaveas expected.
nan == x
is alwaysfalse
andnan != x
is alwaystrue
. Usefloat.is_nan
to test if a float isnan
.replaygain
no longer takesebu_r128
parameter (feat!: Unify ReplayGain handling and calculation #3438).replaygain_track_gain
always stores volume in dB (feat!: Unify ReplayGain handling and calculation #3438).that requests for an uri of the form:
annotate:key="value",...:/path/to/file.mp3
is now considered infallible if
/path/to/file.mp3
can be decoded.parents
option offile.mkdir
(file.mkdir to support "recursive" dir creation / parent dir creation #3600, Add parents option tofile.mkdir
. #3601).forced_major_collections
record field to the result ofruntime.gc.stat()
andruntime.gc.quick_stat()
(feat: Addforced_major_collections
back to the GC stat record #3783).9599
(refactor(prometheus): Change prometheus port #3801).segments_overheader
in HLS outputs to disable segments cleanup altogether.Fixed:
this should help with HTTP endpoint registration (Different http handlers may cause typing errors #3303, fixed in Generalize function applications #4030)
This discussion was created from the release Liquidsoap 2.3.0.
Beta Was this translation helpful? Give feedback.
All reactions