This is a full fall-over script for silence, it make use of
Creating various playlist (news,jingles,music,voxpop,sweepers etc.)
It clarifies fallible and infallible source using mksafe
use time switch events and also time events to play over current playing audio
it uses Airtime fallback
This script gives full explanation of each steps
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Start Of Modification^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#********************************Build Some Playlist***********************************************************
# Music
yourplaylist = playlist("/somepathto/music")
# Some jingles
jingles = playlist("/somepathto/jingles/")
# here is a way to have reloads and random play,not use though
#yourplaylist = playlist(mode="random",reload=300,"/somepathto/music")
#jingles = playlist(mode="random",reload=3600,"/somepathto/jingles")
# News Weather and Sport
news = playlist(reload=3600,"/somepathto/news")
#News of the week
newsoftheweek = playlist(reload=3600,"/somepathto/newsoftheweek")
# some public announcements
public= playlist(reload=3600,"/somepathto/public")
# for the station ID, we'll play this
stationID = single("/somepathto/stationid.mp3")
# for some sweepers
sweeper = single("/somepathto/sweepers.mp3")
# If something goes wrong, we'll play this,I will use a schedule
#security = single("/somepathto/station.mp3")
#*********Start building the feed with music***********************************************
# Start building the feed with music by assigning to the same clock (variables)
# I am not using single letter but words for clarity
# make your playlist be infallible using mksafe,we say that a source is infallible
# if it is always available.
#an output requires that its input source is infallible, otherwise it complains
# that “That source is fallible!
yourmusicbackup = mksafe(yourplaylist)
jinglesplay = mksafe(jingles)
#********************Process The Music**************************************************
# When blank/silence is detected of -28dB for more than 3 seconds
# then skip track/advance to next track
yourmusicbackup = strip_blank(threshold=-28.,max_blank=15.,yourmusicbackup)
#*********************Create Some Schedule Event***************************************
# using this type of scheduling by naming it a seperate variable will make fall back
#stop the music then
# play what event is schedule then continue play the music again best used for
# news,voxpop,public announcement
# delay (1.,variable) allows only one of variable to play from a playlist,and
#now back to back like station id
# use single instead for best result
schedule=
add([
switch([
({ 0m00s },delay(1.,stationID)),
({ 05m00s},news),
({ 10m00s},public),
({ 15m00s},delay(1.,stationID)),
({ 25m00s},public),
({ 30m00s},delay(1.,stationID)),
({ 32m00s},news),
({ 35m00s},public),
({ 45m00s},delay(1.,stationID)),
({ 45m40s},public),
({ 55m00s }, newsoftheweek),
])
])
#*****************Feed with music******************************************************
# And now to play the back up music and if a something changes
# some tutorial call this variable "radio"
# to avoid confusion I will call this "atpointofchange"
atpointofchange = random (weights = [1,4],[jinglesplay,yourmusicbackup])
#If you use something like this yourplaylist = playlist(mode="random",reload=300,"/somepathto/music")
#In building your playlist above then use atpointofchange to rotate is more desirable like below
#atpointofchange = rotate(weights = [1,4],[jinglesplay,yourmusicbackup])
#****************************Put on some sweepers to play over current audio**************************
#another type of switch is to add something like a sweeper that will play
# over the current music or audio
#you can creates times as above to your suit like a sweeper every 20 minutes
#and then switch back
atpointofchange = add([atpointofchange, switch([({20m00s},sweeper)])])
#*************************Do Your Processing here unless you have a big playlist for non schedule event**
#Based on @Albert FR wonderful tips
#
#Do not use this its accounted for in Airtime and liquidsoap
# yourmusicbackup = airtime_crossfade(fade_out=0.5,fade_in=0.5,yourmusicbackup)
#the point of this section is for you to know where to do the processing,i will adopt this later in a more
#comprehensive example which will mimic your dbx ,muticomm or autocomm compressor which can switch
# to say a jingle or sweeper when there is no sound from say a live input
# the Idea is for you to able to expand this script
#*****************Fallback to schedule with music******************************************
# Fall back for Music track_sensitive=false,because we want
#the music pause/stop then play the schedule and start again
default = fallback(track_sensitive = false,[schedule,atpointofchange])
#^^^^^^^^^^^^^^^^^^^^End Of Modification^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
follow my tutorial 101 for other explanations
http://forum.sourcefabric.org/discussion/15701/fallover-101-how-to-make-all-scripts-worked-easy-steps-to-build-your-scripts-fixed-silence
I made these changes as suggested by @Albert FR and Others
#Based on @Albert FR wonderful tips
#do this instead so you can control it from the Airtime system perference and place it before fallback
yourmusicbackup = airtime_crossfade(fade_out=0.5,fade_in=0.5,yourmusicbackup)
#If you use something like this yourplaylist = playlist(mode="random",reload=300,"/somepathto/music")
#In building your playlist above then use atpointofchange to rotate is more desirable like below
#atpointofchange = rotate (weights = [1,4],[jinglesplay,yourmusicbackup])
Thanks @Albert FR
Bart said:question, yet again :p, is there a way to also schedule a 'jingle' on top of the hour in those 'backup playlists'. (hour notification).
Voisses Tech said:I will post the exact script I use on two station and also the link to my test station later
nearly forgot the script.
Are you referring to when you schedule?Nolan Wagner said:Albert, I'm using your script. But I noticed the stream cuts out every once in a while. But the stream
Are you referring to when you schedule?Nolan Wagner said:Albert, I'm using your script. But I noticed the stream cuts out every once in a while. But the stream
Albert FR said:A little example of ls_script.liq modification
Search this line (and comment it) :
#default = amplify(id="silence_src", 0.00001, noise())
#yours jingles repository
promotions = playlist ("/srv/users/jingles/")
# your backup playlist
musics = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/users/music/")
# a jingle every 4 songs
default = rotate(weights=[1,4], [promotions, musics])
ref_off_air_meta = ref off_air_meta
if !ref_off_air_meta == "" then
ref_off_air_meta := "Airtime - offline"
end
#default = rewrite_metadata([("title", !ref_off_air_meta)], default)
ignore(output.dummy(default, fallible=true))
Voisses Tech said:@Nolan Wagner
you stated that you are using Albert's Script but you mention 2 other things that are unrelated.
First the Master and Next fallback.
The script are designed to deal with a period when you have nothing schedule and Airtime goes to "dead air"
The Master is one of the way of doing a live show and pass it through Airtime
Fall back is best describe here under how does it work liquidsoap documentation
Are you referring to when you schedule?Nolan Wagner said:Albert, I'm using your script. But I noticed the stream cuts out every once in a while. But the stream
I successfully tested to fallback to Line-In today on my testing station.hoerich said:My hack did only work until 2.3.1 I've had a few.
I use foobar2000 for Daily- & Weekly- SmartPlaylist-Shuffling and rebroadcasting BBCWS via Satellite & physical Line-In-Function and stream this via BUTT/m3w to Airtimes Icecast-Server.
And this Stream was my fallback!
commented out:
default = amplify(id="silence_src", 0.00001, noise())
default = rewrite_metadata([("title", !ref_off_air_meta)], default)
ignore(output.dummy(default, fallible=true))
filled in before "ref_off_air_meta = ref off_air_meta":
default = input.http("http://localhost:9000/rastafrau")
Since this ain't working anymore I use the ShowSource-Function as a workaround.
Sadly, I don't have time right now to trial&error these things until late august.
hoerich said:I successfully tested to fallback to Line-In today on my testing station.
commented out:
default = amplify(id="silence_src", 0.00001, noise())
default = rewrite_metadata([("title", !ref_off_air_meta)], default)
ignore(output.dummy(default, fallible=true))
filled in before "ref_off_air_meta = ref off_air_meta":
default = input.alsa()
This would give me the ability to change my technical workflow a little bit.
Hopefully it also works on x64...
I could use the fallback-function as Live-Studio-Line-Input.
So I try a new workflow this week to just leave Live-Studio shows empty.
Voisses Tech said:
I will search for a script I had tested and give you and Idea later this week.
Voisses Tech said:@hoerich
I have posted the script I have been using for sometime now here http://forum.sourcefabric.org/discussion/15904/input-mic-and-mixer-using-alsa-something-that-will-work-using-airtime-script-modified
did you try
input.alsa()
This is the default
then if you are going to use buffersize = true,thats the default also you can increase the buffer to a value
I think it can take float or boolean
If you want to see the latency problem take an out from TV,DVD,or any video and putthrough your input and you will see it
V.O.I.S.S.E.S
Can You hear Me now
It looks like you're new here. If you want to get involved, click one of these buttons!