Proof of Concept: More professional AzuraCast/Liquidsoap AutoDJ Crossfading #6252
Replies: 125 comments 300 replies
-
@Moonbase59 could you guide me to reach this path? I'd like to test the change but I can't find it via ftp. |
Beta Was this translation helpful? Give feedback.
-
Note: The above is strictly experimental, not for the faint of heart, no guarantees, you might break your station if doing something wrong and you should have a good knowledge of Linux, Docker and PHP! It will also only work until the next container restart. I added
Then went into the container using: ./docker.sh bash There you can then move around, edit the file above and save it. Afterwards, in the station UI, edit your Liquidsoap Configuration as desired and restart broadcasting. Voilà! |
Beta Was this translation helpful? Give feedback.
-
@Moonbase59 Another perk of LS 2.2.x is that we don't actually have to send "resetting values" on annotations on a per-song basis, as by default now those annotations will all reset with new tracks. That'll let us simplify the annotation code, and will likely let your fade function work with no PHP modification. |
Beta Was this translation helpful? Give feedback.
-
Works defenitely perfect! |
Beta Was this translation helpful? Give feedback.
-
Note: As of Rolling Release #35a6c8c (2023-06-05 12:18), you don’t need to patch You still need to edit your Liquidsoap configuration, as shown above. Note 2: Should custom fade-in and fade-out times of |
Beta Was this translation helpful? Give feedback.
-
I tried adjusting my liquidsoap configuration, but got this error. |
Beta Was this translation helpful? Give feedback.
-
Looking again, it might be something to do with liquidsoap and rolling release as removing the code doesn't fix things. |
Beta Was this translation helpful? Give feedback.
-
I try with Azuracast Rolling Release #6398009 (2023-06-17 4:08)
Seems to work correct. No loudness jumps so far. @Moonbase59 Thanks for your very good explanations! |
Beta Was this translation helpful? Give feedback.
-
@LordHelmchen666 Thanks for sharing! We all learn from each other, and help each other. That’s what it’s all about, ain’t it? :-) |
Beta Was this translation helpful? Give feedback.
-
This masterpiece of engineering should achieve the desired outcome
Took me a month to find out as this part of documentation is removed in the new docs https://www.liquidsoap.info/doc-1.4.4/cookbook.html#switch-based-transitions |
Beta Was this translation helpful? Give feedback.
-
Let's give it a try. I left in this. This only works correctly when all tracks have valid replaygain tags!radio = amplify(1.,override="replaygain_track_gain",radio) |
Beta Was this translation helpful? Give feedback.
-
Depends upon what "the desired outcome" is. Your code makes every crossfade a fixed-timing sequence (with added silence). This may be undesired for jingles/sweepers/bumpers/etc. Any per-track crossfading values set in AzuraCast will be ignored. The power computation width of 20s adds to CPU usage, plus it may fail on jingles/sweepers/bumpers that are shorter. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@pozhiloy-enotik Looks like you may have found a bug. The ideal place to report that would be upstream to the LS developers: https://github.com/savonet/liquidsoap/issues Unfortunately I currently don’t have the time to re-test everything that once worked (or seemed to). |
Beta Was this translation helpful? Give feedback.
-
I gave this a try, and while it works relatively well it seems to be messing up the now playing. It either gets stuck and doesn't update at all or will be one song behind. After taking it out everything went back to normal. |
Beta Was this translation helpful? Give feedback.
-
Autocue v3.0.0 is out!Features adjustable silence detection length. See Release Notes. |
Beta Was this translation helpful? Give feedback.
-
Exciting News on the Autocue!@RM-FM and I now teamed up to bring you even better transitions, throwing both our approaches ("sustained endings" and "longtail") together into something new and real good. Both our former approaches had their advantages and pitfalls, and we feel that collaborating and combining them into one new, homogenous work will bring even more benefits to all of us. And more listeners to your stations. Combined with the existing I plan to have this in Autocue v3.1.x or maybe 4.x.x (depending on breaking changes). You can always pick up the latest official release at https://github.com/Moonbase59/autocue/releases/latest. So stay tuned! :-) |
Beta Was this translation helpful? Give feedback.
-
@Moonbase59, thank you for your explanations. I will just run the cue_file on pre-recorded shows when they are uploaded by the DJ's. I'm already running rsgain (the project built on loudgain). But, the default cue_file settings are the same that ship with AzuraCast? Thank you. |
Beta Was this translation helpful? Give feedback.
-
@Moonbase59 Yet unreleased |
Beta Was this translation helpful? Give feedback.
-
Most often used
I mostly use |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
A lot of work, day and night, but we did it: Autocue v4.0.0 is out!
Thanks to @RM-FM & @JohnnyC1951 for their contributions! (And to me for many, many days and nights spent coding, testing, talking and supporting… 😁 ) |
Beta Was this translation helpful? Give feedback.
-
2024-06-15 - v4.0.1
Please upgrade, just in case. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
just updated, but as soon as i enable "Enable AutoCue (Beta)", liquidsoap doesn't start anymore. No idea why it says Nonexistent file or ill-formed URI disabling autocue and everything is playing again
|
Beta Was this translation helpful? Give feedback.
-
Autocue v4.0.2 is outSee Release Notes. |
Beta Was this translation helpful? Give feedback.
-
I dont know what i am doing wrong, but I have a playlist of 10 files with
jingles, which i assigned jingle mode too.
I removed all cue points, but still some jingles are cut at the end, before
they are finished.
Op do 20 jun 2024 om 09:20 schreef Matthias C. Hormann <
***@***.***>:
… @bombelman <https://github.com/bombelman> 160,000 tracks (central on
NFS-mounted NAS), 4 stations with ~70 playlists ea. here. Only about 20 of
these are pre-tagged (jingles, a few test songs) so I can always test the
worst case.
@darellrazk <https://github.com/darellrazk> No problem, 4.0.3 was mainly
a "community convenience" update, it only changed the default of -x/
--extra and settings.autocue.cue_file.overlay_longtail from -15.0 LU to
-12.0 LU. You can do this manually in the v4.0.2 settings and on the CLI.
For comparison: All stations here start rather fast (like without Autocue)
if you disable *Always Write Playlists to Liquidsoap*. When enabled, it
takes about 8 minutes, on a 4 CPU 4 GB VM, before the load comes down again
to ~1–2.
Auswahl_427.png (view on web)
<https://github.com/AzuraCast/AzuraCast/assets/3706922/a8253891-6128-4a83-a2a9-fdf20e10d405>
—
Reply to this email directly, view it on GitHub
<#6252 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIODLJP5ADDPRKAPEF64EWLZIJ7CDAVCNFSM6AAAAAAXTUOU76VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TQMRVGM4DE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
New FAQ for AutocueI added a FAQ – Frequently Asked Questions section to my repo that answers the most often asked community questions. |
Beta Was this translation helpful? Give feedback.
-
@Moonbase59 , I have 1 specific playlist that I would like to set liq_fade_out = 5 p = playlist(prefix='autocue:annotate:liq_cue_out=5.00:', '/path/to/playlist.m3u') The question is, where should I place this command? Do I need to use AzuraCast Manual AutoDJ Mode? Thank you. |
Beta Was this translation helpful? Give feedback.
-
I cannot really figure out why my jingles are still cut before they end. I set fade in and out to 0.1, but they get cut before they are played full length Other problem that i have is that after some days playing the playing song( at its end) song abrupt stops for a few seconds, no audio, then resumes and fades to the next song. |
Beta Was this translation helpful? Give feedback.
-
Many stations have expressed a certain dissatisfaction with the curent AutoDJ crossfading, which uses balanced fade-in/fade-outs. BUT: In radio, we normally don’t use fade-ins. To station owners that are real readio people the AutoDJ sounds, well, odd.
Since this would officially be a feature request, I have tried to set up a proof of concept and would like to share my findings with you.
Typical radio crossfading (desired outcome)
In radio, we usually use a crossfading curve like this (not an exact picture):
This typically has parameters like these:
AzuraCast situation
In AzuraCast (as of May, 2023) this is currently almost impossible to achieve, since
cross
andcross.simple
functions (i.e.,fade_in=0.00
) are always overwritten since AzuraCast generates anannotation
for every track that overwrites the defaults (which makes sense for modified tracks, but not for all of them)liq_cross_duration="0.00"
is generated, overriding the values in a custom function and thus effectively disabling crossingModifying AzuraCast as a proof-of-concept
The currently only chance is modifying
/var/azuracast/www/src/Radio/AutoDJ/Annotations.php
within the Docker container, which of course only holds until it is restarted or updated. I’m using some hardcoded values here, just for demonstration:The above will not lose us the ability to manually specify cue & fade in-/out points and it generates annotations like this:
So we still get an
annotation
for every track, but it now has the desired values.In AzuraCast’s station settings, Crossfade Method: Normal Mode should be selected.
Then, the Liquidsoap configuration can be edited. In the input field just above AzuraCast’s
def live_aware_crossfade
, enter the following:The
cross()
minimum specifies the minimum track duration for a cross.-1
means cross always. We should use either0.00
or a track duration in seconds here (i.e.,30.00
).duration
specifies the maximum duration of the crossfade, also the number of seconds to measure at the end of the old track and the start of the new one (each) to compute the transition between tracks.Using all this, we’re still unable to set fading curves (sin, exp, log, lin) which per default are sinusoidal. Also, we can’t set a dB level for the crossing point.
Nevertheless, Liquidsoap’s
cross
function does a rather "okay" job, if used withcross.simple
, so probably no need to specify a level. Do not usecross.smart
, because it’s not that smart for professional crossfading.I have tested the above patches on my station for a few days, and it sounds much better.
Conclusion
More professional, radio-like crossfades for the AutoDJ are possible using AzuraCast and Liquidsoap.
How to implement in AzuraCast?
Having had a quick glance at AzuraCast code, this should be pretty easy to implement in a useful manner in a two-step approach:
Step 1
width
parameter forcross()
), because the default nails it at 2 s. This should probably be not larger than max. crossfade duration (I’m a little unsure here) and might be beneficial in some cases./var/azuracast/www/src/Radio/AutoDJ/Annotations.php
use these new backend values where appropriate (notwidth
)./var/azuracast/www/src/Radio/Backend/Liquidsoap/ConfigWriter.php
to generate the correct values for the crossfading scripts. (width
used here.)Done – for most normal stations. Radio stations will be happy.
Step 2 – for advanced use
We will probably never be able to set the crossing point dB level, but Liquidsoap’s
cross
function does a good job on that.What we could do is set the fader curves for fade-in and fade-out. There might be cases where that would be a nice-to-have.
Done again – for the demanding station.
Tried this with very different kinds of music and genres: From smooth to loud, from Easy Listening and New Age to Pop, Electronic, Rock and Heavy Metal. Also tested with and without master_me enabled.
Finding all this out, studying documentation and code, setting it up on a real station took me a few days. I hope it can be useful.
Beta Was this translation helpful? Give feedback.
All reactions