/usr/lib/airtime/pypo/bin/scripts/ls_script.liq
default = amplify(0.00001, noise()) default = rewrite_metadata([("artist","Airtime"), ("title", "offline")],default)
default = playlist(mode='random', "/srv/music/")
sudo /usr/lib/airtime/pypo/bin/liquidsoap/liquidsoap --check /usr/lib/airtime/pypo/bin/scripts/ls_script.liq
sudo /usr/lib/airtime/pypo/bin/airtime-pypo-stop sudo /usr/lib/airtime/pypo/bin/airtime-pypo-start
# Play user requests if there are any, # otherwise one of our playlists, # and the default file if anything goes wrong. radio = fallback([ request.queue(id="request"), switch([({ 6h-22h }, day), ({ 22h-6h }, night)]), default])
Solution found!
To play random mp3 files from a certain folder replace those two lines with the following:default = playlist(mode='random', "/srv/music/")
A couple of handy commands.
To check if your new .liq is valid and has no errors:sudo /usr/lib/airtime/pypo/bin/liquidsoap/liquidsoap --check /usr/lib/airtime/pypo/bin/scripts/ls_script.liq
If above outputs no errors, restart liquidsoap with:sudo /usr/lib/airtime/pypo/bin/airtime-pypo-stop sudo /usr/lib/airtime/pypo/bin/airtime-pypo-start
add random jingles from a folder : /home/mp3/jingles/
each 3 songs of the playlist.
music = playlist(mode='random', "/home/mp3/autodj/") jingles = playlist(mode='random', "/home/mp3/jingles/") default = rotate(weights=[1,3], [jingles, music])
my mp3 mountpoint in Icecast2 going down. The script does'nt turn anything. So I don't know what is going on.
but where i can found airtime-pypo-stop and airtime-pypo-start
# Log dir set("log.file.path","/tmp/basic-radio.log") def streamcrossfade(a,b) add(normalize=false, [ sequence([ blank(duration=0.1), fade.initial(duration=3.,b) ]), fade.final(duration=3.,a) ]) end # Podlaczenie do JACKA live_inp = mksafe(input.http("http://localhost:8000/studio.mp3")) #Podlaczenia aritime airtime=mksafe(input.http("http://localhost:8000/airtime.mp3")) #PARAMETR length OKRESLA DLUGOSC CISZY NA PODAWANEJ NA JACKA, PO KTOREJ PRZELACZA PLYNNIE NA AIRTIME radio = fallback(track_sensitive = false, transitions=[streamcrossfade,streamcrossfade], [strip_blank(length=4.,live_inp),airtime]) # WYJSCIA STREAMA output.icecast.vorbis(host = "localhost", port = 8000, quality=-1.0, password = "****", mount = "low.ogg", description = "***", url="http://***", radio) output.icecast.lame(host = "localhost", port = 8000, bitrate=128, password = "***", mount = "live", description = "***", url="http://***", radio) #output.jack(id="odsluch",radio)
command = "ecasound -i alsa -o %s -t:%s" % (filepath, length)
command = "live-show %s %s" % (length, filepath)
#!/bin/bash ecasound -f:s16_le,2,44100 -i alsa -t:$1 -o stdout | lame -b 192 -r -S --signed --bitwidth 16 --little-endian -s 44.1 - - | tee $2 | ezstream -c ezstream_stdin_mp3.xml
Solution found!
Thanks RadioA6 and liquidsoap docs
To set up some random music on air, when nothing is scheduled in Airtime, I had to edit the file/usr/lib/airtime/pypo/bin/scripts/ls_script.liq
* SMART NOTES *
Create a backup copy of the original file before editing it.
Create a copy of the resulting file, cause it can be replaced by future Airtime updates.
Find there lines ##27-28:default = amplify(0.00001, noise())
default = rewrite_metadata([("artist","Airtime"), ("title", "offline")],default)
These two lines define what is transmitted when AirTime is silent. For now it is a noise at a very low volume.
To play random mp3 files from a certain folder replace those two lines with the following:default = playlist(mode='random', "/srv/music/")
A couple of handy commands.
To check if your new .liq is valid and has no errors:sudo /usr/lib/airtime/pypo/bin/liquidsoap/liquidsoap --check /usr/lib/airtime/pypo/bin/scripts/ls_script.liq
If above outputs no errors, restart liquidsoap with:sudo /usr/lib/airtime/pypo/bin/airtime-pypo-stop
sudo /usr/lib/airtime/pypo/bin/airtime-pypo-start
For the endless possibilities that liquidsoap opens, again, please see the liquidsoap documentation and their cookbook
default = playlist(mode='random', "/srv/music/")
default = (mksafe(normalize(playlist(mode='random', "/srv/music/"))))
It looks like you're new here. If you want to get involved, click one of these buttons!