Airtime 2.4 and backups playlists (give yours)
  • Vote Up2Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    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))

    moved to Airtime Hacks
    Post edited by Albert FR at 2013-09-29 10:34:29
  • 49 Comments sorted by
  • Here is my first basic script

    I have a more detail crossfade ,normalization and news schedule but its not ready for consumption.

    This works faithfully for me.

    # original code commented out
    # default = amplify(id="silence_src", 0.00001, noise())

    # Music

    myplaylist     = playlist(mode="random",reload=3600,"/srv/path - to /music")

    # Some jingles
    jingles = playlist(reload=3600,"/srv/path - to /jingles")

    # If something goes wrong, we'll play this which is infallable so must be a valid audio file
    security = single("/srv/path - to /drops/intro.mp3")


    # for the stationID, we'll play this which is infallable so must be a valid audio file
    stationID = single("/srv/path - to /path - to /stationID.mp3")

    # Start building the feed with music
    default = myplaylist


    # Use the smart crossfader to transition between tracks using fade in and out of 0.5 seconds
     default = smart_crossfade(fade_out=0.5,fade_in=0.5,default)

    # Add in the jingles using a random with a 1:1 weight and set the delay to 1. which means we should never get two consecutive jingles
     default = random(weights = [1, 1], [delay(1.,jingles), default])


    # And the StationID on TOH
    default = add([default, switch([({0m0s},stationID)])])

    #

    # When blank/silence is detected of -28dB for more than 15 seconds then skip track/advance to next track and if some goes wrong 
    #play the station intro
    default = strip_blank(threshold=-28.,max_blank=15.,default)

    default = fallback(track_sensitive = false, [default, security])


    #This may work but above better
    #default = fallback(track_sensitive=false, [ strip_blank(threshold=-28.,max_blank=15.,default) , security])
    #
    #

    # I kept everything below so that I can make Airtime do metatags
    # original code not commented out

    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))
    Post edited by Voisses Tech at 2013-07-12 10:38:02
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down BartBart
    Posts: 89Member
    Hi,
    I'm rather a newbie with Airtime, but why should you use this?
    why not using dynamic blocks?
    Schelstraete Bart - http://www.contact-dance.com
    image
  • The reasons for using this is so varied and many.Each Station has it own way of scheduling but here are senarios
            The main concept is to create playlists  when noting is schedule

    1. A station which have say talk show  7 - 10 am the rest of the time it is music,you might not find it feasible to go to the calendar and do a schedule or to have just the same songs through rotation.-This Gives one method of creating a folder with (music,jingles,etc),using an ftp client you can change the collection easily.
    2. Rather than dead Air as # default = amplify(id="silence_src", 0.00001, noise()) - which is just a low noise when silence occur
    3. How I use it is that I have one show at 11:30pm - 6am on a radio station,the rest of the time I do not want to be programming dynamic blocks - I just create one hour shows.If the main staion has problem they use my server as redundancy and can upload there own   contents
    4. I just have fun tampering with liquidsoap,after all its open source I want to extend the limits where none has gone before
    :)) =))
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    5. That can be useful also if you do a live show (where you are not sure precisely of the end)

    :)
  • Can samba shares be included as a playlist?
    well last evening,I experiment with samba and found a worthy solution.
    you could use  smb       = playlist(reload=600, "smb://myserver/mp3/playlist")

    where reload allows how often your playlist is refresh by liquidsoap
    and 600 is the number of seconds/intervals (600s=10minutes)

    use a greater refresh depend on your playlist 1sec will put greater load on cpu 3600 (hourly) is a better starting.

    I modify my code above to include modes and reloads

    This will be great for setting my watch folder as samba shares

    I will further elaborate on how this will be benefical for you by splitting your playlist in different genre
    Post edited by Voisses Tech at 2013-07-12 10:32:46
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    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.
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • I am writing this off my head because I am preparing for my live show tonight at 11.15pm EST.
    but I think you miss two things in making a fallback source and a fall back file should something go wrong.

    I think this should work but I have not tested it yet.

    commented out:
    #default = amplify(id="silence_src", 0.00001, noise())
    # put this exactly below
    # fallback source:
    security = single("/path/to/my/file")
    # your backup stream
    default = input.http("http://localhost:9000/rastafrau")
    # Fallback from playlist to live:
    # No track_sensitivity here since we do not want to cut the
    # begining of the live show... !
    default = fallback(track_sensitive=false,[default,security])
    # then the information Airtime use to determine wether off line or not-cannot remember now
    .
    .
    .
    #Leave these so airtime can write back the meta data (optional)
    default = rewrite_metadata([("title", !ref_off_air_meta)], default)
    ignore(output.dummy(default, fallible=true))
    Post edited by Voisses Tech at 2013-07-14 13:12:31
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    You have right @Voisses+Tech , but in the @hoerich case that's not really mandatory (he explain that somewhere on this forum ;-)
    But your solution is more secure !
  • removed by me ,see below for modifications and explanation
    Post edited by Voisses Tech at 2013-07-26 02:42:46
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • removed by me because the problems are fixed and explained below
    Post edited by Voisses Tech at 2013-07-26 02:47:36
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.



  • PRE { font-family: "Liberation Serif",serif; }P { margin-bottom: 0.08in; }


    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
     


    Post edited by Voisses Tech at 2013-08-03 05:29:46
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    only a little thing

    prefer airtime_crossfade than smart_crossfade

    your airtime preference (used by airtime) will be respected, and if you decide to changer them, you can do this directly from the web interface
  • you are so right @Albert FR.

    Both Airtime and Liquidsoap have an inbuilt crossfade.Airtime on the other hand allows you to tweak this in the web-interface at System ===> Preference.

    Love this Tip.

    Another two tips I found out is
    •  That if your put crossfades before you feed the music you might get the desired results.It will even merge the jingles and songs,so put it after the feed and before the fallback like this
    • If you use the playlist that already have mode=random,then you get a better flow if at the time feed then you can do a rotate 

    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

    Post edited by Voisses Tech at 2013-07-29 10:51:04
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down BartBart
    Posts: 89Member
    hi,
    tnx for all those examples!
    question, yet again :p, is there a way to also schedule a 'jingle' on top of the hour in those 'backup playlists'. (hour notification).
    That way I could use the backup playlist as non stop area , when no program is scheduled. that would make my life lot easier, as then I don't need to schedule non stop things anymore
    Post edited by Bart at 2013-08-02 15:22:41
    Schelstraete Bart - http://www.contact-dance.com
    image
  • Vote Up0Vote Down BartBart
    Posts: 89Member
    @voisses tech:   Are you sure that your script above works?
    When I try to use it, I'm getting:

    Starting Liquidsoap Playout Engine: At line 190, character 21: The variable yourmusicbackup defined here
      is not used anywhere in its scope. Use ignore(...) instead of
      yourmusicbackup = ... if you meant to not use it. Otherwise,
      this may be a typo or a sign that your script does not do what you intend.

    Schelstraete Bart - http://www.contact-dance.com
    image
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    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).



    if you adapt VoissesTech's code or any other, you can.
    you probably get useful infos on this here
    http://forum.sourcefabric.org/discussion/15507/automation#Item_15
    http://forum.sourcefabric.org/discussion/15701/fallover-101-how-to-make-all-scripts-worked-easy-steps-to-build-your-scripts-fixed-silence#Item_1

    the way you want to schedule toh-jingles was mentioned in an older discussion I don't find now.
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • @Bart,
    Yes it works,if you get an undefined variable it means that you are using  something that is only mention once.
    I cannot tell from this  tutorial were is Line 190 so here is the two things that define yourmusicbackup

    yourmusicbackup=mksafe(yourplaylist)  #so its define here,make sure it matches

    # basically you are just  turning
    #yourmusicbackup=mksafe(playlist("/somepathto/music"))
    #The function mksafe takes a source and returns an infallible source,

    Can you tell me what is at your line 190

    do
    sudo cp /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq  ~Desktop/ls_script.liq
    sudo chmod 777 ~Desktop/ls_script.liq
    open with your text editor and give me  line 190

    I hope @bart will make sure the

    atpointofchange = random (weights = [1,4],[jinglesplay,yourmusicbackup])

    is used once,the red highlights is commented out.

    The trick about liquidsoap is that it runs line by line so if "yourmusicbackup"

    is run in the first line when it runs to the next it will tell you what is wrong




    Post edited by Voisses Tech at 2013-08-02 19:55:28
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • I will post the exact script I use on two station and also the link to my test station later

    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator

    I will post the exact script I use on two station and also the link to my test station later



    can we listen to this? which stations are these?
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • Oops ,I Talk to soon,Hoerich.but just wait before sunday,I want to do one more thing with the silence when a dj microphone and  switching over.

    But in real fact,I want to have this fully implemented in the next release or two.so I want to work on it.

    So I hope you could test the full code,I will post here later,I am away right now and I will indicate simple modification to customised the script
     
    Post edited by Voisses Tech at 2013-08-02 19:56:34
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down BartBart
    Posts: 89Member
    WITHOUT airtime_crossfade it is working now. If I use the airtime_crossfade, I'm getting:  "Starting Liquidsoap Playout Engine: At line 193, char 40: the variable airtime_crossfade used here has not been
      previously defined",

    This is the line "yourmusicbackup = airtime_crossfade(fade_out=0.5,fade_in=0.5,yourmusicbackup)', and there is nowhere another 'airtime_crossfade' variable.
    If I replace that by smart_crossfade,then I have the "The variable yourmusicbackup defined here
      is not used anywhere in its scope" error message.
    So it's the crossfade line which is causing my a headache.

    Schelstraete Bart - http://www.contact-dance.com
    image
  • Okay lets look how easy this is for anyone who read this

    Lets prepare some directories

    1.  copy the following in one single line at the command prompt  sudo mkdir /srv/backup && sudo chmod 777 /srv/backup && sudo mkdir /srv/backup/music && sudo chmod 777 /srv/backup/music && sudo mkdir /srv/backup/startup && sudo chmod 777 /srv/backup/startup && sudo mkdir /srv/backup/drops && sudo chmod 777 /srv/backup/drops
    2. copy some music in music folder,  station information in startup, drops or sweeper in drops
    3. name your drops or sweeper   station.mp3 
    4. now lets get ready to rock and roll.We will back up our ls_script at least twice
    5. first backup please make your own directory and remove the quotes  sudo cp /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq "/home/$User/Desktop/myescapefile/original_ls_script.liq"
    6. second back,you can copy this exactly as is
      sudo cp /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq  /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq.bak
    7. lets now take open the script and place the modified code as describe above [if you copy the code from here] paste it notepad or some text editor first then copy from there]
    8. sudo pico /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq
    9. comment the following like this #default = amplify(id="silence_src", 0.00001, noise())
    10. place the code immediately after  the above
    11. ctrl-x save
    12. run the following command sudo /usr/lib/airtime/pypo/bin/airtime-liquidsoap  /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq
    13. you should see a nice fancy pypo gateway box decorated with some stars-that means its okay
    14. ctrl-c  then restart liquidsoap  by issuing the following command  sudo service airtime-liquidsoap restart then ctrl-c to take you back to the prompt
    15. do a  sudo airtime-log -t liquidsoap to see the magic
    16. drumroll and you are off to drink some beer[ just kidding I do not drink ]
    17. If you make a bo-bo ,remain calm and restore to your original ls-script,and you followed all I said just issue this command sudo cp /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq.bak  /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq  at the prompt then restart your liquidsoap with
      1. sudo service airtime-liquidsoap restart then ctrl-c to take you back to the prompt
      2. do a  sudo airtime-log -t liquidsoap to see the magic

      nearly forgot the script.


    #^^^^^Start Of Modification^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    # Music

    myplaylist     = playlist(mode="random",reload=300,"/srv/backup/music")


    # If something goes wrong, we'll play this

    startup = playlist("/srv/backup/startup")

    # If something goes wrong, we'll play this

    security = single("/srv/backup/drops/station.mp3")

    #*********************************Start building the feed with music******************************************

    # Start building the feed with music by assigning to the same clock (variables)

    mymusicbackup = mksafe(myplaylist)
    mystartup = startup


    #*********************************Feed with music*************************************************************

    # And now to play the back up music this way

    playmymusicbackup=rotate(weights = [1,4],[mystartup,mymusicbackup])



    #*********************************Fallback to default******************************************************

    # And finally the security
    # when something goes wrong
    # Fall back for Music track_sensitive=false,because we want the music pause/stop then  play the security
    # which is a single file and start again

    default = fallback(track_sensitive = false,[playmymusicbackup,security])


    #^^^End Of Modification^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


    This was adopted from the liquidsoap quick start here http://savonet.sourceforge.net/doc-svn/quick_start.html
    I chose not to use the word jingles here because as you expand your script you can make jingles and sweepers play the way you want it rather than on a static rotation of weights of say 4 music then 1 jingles.
    This Basic script allows you that opportunity of static rotation and my full example gives you a better way of switching




    Post edited by Voisses Tech at 2013-08-03 05:44:40
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • @bart

    you are very right ,I made that test and found that line to be the culprit.

    I had used smart_fade on my test machine but made a change on the fly without re-test.I have commented out that line  as its not really needed.,since both liquidsoap (utils.liq) and airtime ( i do not put the liq here because i do not people go messing with it used system pereference) have their own built in crossfade.

    If you have adopt this code you will definitely see the sweet change over(crossfade) when your news etc comes up as schedule. 
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • @Hoerich

    Most of  the previous script can be adopted with simple modification ,my reason for not posting the ones I modified,is to give a basic script that anyone can adopt with minimal skillset.

    Which they could adopt and then as I expand they could make the changes.

    So I outline the simple steps to break it and re-make it adhering to the liquidsoap documentation

    It used to annoy the hell out of me when Airtime just go dead.

    Ps. a secret admission some of the older script was so comprehensive,modifying other liqs, I thought they were rewrites of Airtime

    I love to K.I.S.S
    :-*
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • @bart

    if you have not figured out the TOH question you asked on august 2 ,here is the answer

    yes you can do so much with a TOH
          ({ 0m00s },delay(1.,stationID)),
    means a station ID right on exactly Top of the Hour system clock
    If your station ID is 20s then you just make your next schedule interval ({ 0m20s }

    What I do if I have say a staion id that is 45s long and I have the time check(like the time is 6pm) and a jingle of 45s,
     
    I place the time check(like the time is 6pm) in the calendar at 6.00 as soon as that is finished Airtime fall back to default so now your fall back runs playing the station ID just After

    I break my minutes to be

    ({ 0m10s },stationId)),
    ({ 0m45s },jingle)),

    The idea of putting time checks in the calendar is you can have 12 "say time" like 1 o clock,2o'clock etc......With link-show do it for one day and repeat continuosly

    the trick is

     if you want it to stop the music and do it thing(play off course)

     place it in this variable for schedule

    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),
                         ])
                     ])

    If you want it to play over the music just do it like the sweepers example(the sweeper example use an existing variable) ,you might want to amplify it if you do this
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Please go to  my 101 script here  [ http://forum.sourcefabric.org/discussion/15701/fallover-101-how-to-make-all-scripts-worked-easy-steps-to-build-your-scripts-fixed-silence ] for further and nice and creative things to do with your script.

    I hijack @Albert post,[hope he did not mind ] just to stimulate the discussion.

    I now want you to come here and post the script you use so we can further developed Airtime as the number 1 software for broadcaster.

    The intention for this IMHO is for scripts not tutorial so once again go here then come back please and lets see what works for you

    In my scripts there

    I outline three scripts which uses the principle as follows
       
    carts are like jingles,beds.promos etc. music is included but we treat it as exception

    1. Script 1 This Script gives you the ability to rotate carts and music on a simple ratio basis like 1 : 10 meaning for every 1 carts you play 10 music.
    2.  Script 2 introduce schedule or event switch.Its more flexible but best suit when you want the music to stop and execute the cart or  event
    3.  Script 3 builds on scripts (1 and 2 ) it also introduce overlays where you can play a sweeper on top of existing,it introduce also the ability to amplify sweepers above your scripts and maybe what most people want
    My 4 script will show you how to use switch to do specific time of the day or week or whole day programs.
    I did not post this before because ,it might give the idea that you should not use the calendar.

    On the contrary,airtime suite  of features gives the best for all the benefits of remote broadcast

    You can help me and others as I have an intent,so let me see what you need  by posting in this thread your current script

    From  Now You will only find my last full script  posted here but no explanation.
    Thanks @Albert,
    Post edited by Voisses Tech at 2013-08-06 10:35:52
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Albert, I'm using your script. But I noticed the stream cuts out every once in a while. But the stream does not cut out if using the master source. I didn't notice things cutting out either when a playlist was scheduled. 

    Seems to be only the fallback causing it. What do you advise? 

    Edit: The stream drops for a second or two, then comes back... Not sure what the problem is. :/
    Post edited by Nolan Wagner at 2013-08-09 15:59:23
  • @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


    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?
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • @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


    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?
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down BartBart
    Posts: 89Member
    coincidence or not, but I'm having similar problems now .
    I'm using a customer backup playlist also, but as we speak, there is no sound coming out of it suddenly.
    Liquidsoap is working, and selecting new songs:

    -----
    2013/08/10 11:14:32 [decoder:3] Method "MAD" accepted "/home/alain/ftp/muziek/engels-Rock/06 Tina Arena - Chains.mp3".
    2013/08/10 11:14:42 [server:3] New client: localhost.
    2013/08/10 11:14:42 [server:3] Client localhost disconnected.
    2013/08/10 11:14:43 [muziek(dot)1:3] Finished with "/home/alain/ftp/muziek/engels-60/07. Marvin Gaye - Ain't That Peculiar.mp3".
    2013/08/10 11:14:43 [muziek(dot)1:3] Prepared "/home/alain/ftp/muziek/engels-Rock/06 Tina Arena - Chains.mp3" (RID 30).
    -----

    "Airtime" is connected to the stream server, as the mount point is open. (which means that airtime is connected to icecast, else the mount point would be closed)
    But just no sound on the stream server.
    If I restart liquidsoap, the sound will be back.


    Post edited by Bart at 2013-08-10 08:42:30
    Schelstraete Bart - http://www.contact-dance.com
    image
  • 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))



    Are you using this script?

    Kindly note if you put files in the any directory you must make them readable
    by
    chmod 775
    ..........

    If you do  use this script above at the end of 4 songs it will go to dead air
    This is because there is no fallback

    you would have to have additional line for the fall back  like this

    #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])
    #how I want my fall back-new line
    playthisatfallback= rotate(weights=[1,4], [promotions, musics])


    #fall back to music-New line need
    default = fallback(track_sensitive = false, [ promotions,
    playthisatfallback])

    I am not testing this but you have to add a fall back for it to work

    and while that may seem the correct option.if you do that if 10 cuts is in your promotionscart(jingles) when the first 1:4 weights occur,the system will move to default and play those 10 cuts the next time.
    One easy way around this is set a single file that will play then move back to playthisatfallback.
    so this is the correct last line


    security=single("/srv/users/security/security.mp3")
    #fall back to music-New line need
    default = fallback(track_sensitive = false, [ security,
    playthisatfallback])



     



    Post edited by Voisses Tech at 2013-08-10 09:21:48
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • if you are not then just to see if your liquid soap is really connectected to your icecast
    tail -f /var/log/icecast2/access.log
    like this
    tail -f /var/log/icecast2/access.log
    127.0.0.1 - - [10/Aug/2013:08:00:11 -0400] "GET /admin/stats.xml HTTP/1.1" 200 1599 "-" "Python-urllib/2.7" 0
    127.0.0.1 - - [10/Aug/2013:08:00:15 -0400] "GET /admin/metadata HTTP/1.0" 200 177 "-" "Liquidsoap/1.1.1+scm (Unix; OCaml 3.12.1)" 0
    127.0.0.1 - - [10/Aug/2013:08:00:15 -0400] "GET /admin/metadata HTTP/1.0" 200 177 "-" "Liquidsoap/1.1.1+scm (Unix; OCaml 3.12.1)" 0
    127.0.0.1 - - [10/Aug/2013:08:00:16 -0400] "GET /admin/metadata HTTP/1.0" 200 177 "-" "Liquidsoap/1.1.1+scm (Unix; OCaml 3.12.1)" 1
    127.0.0.1 - - [10/Aug/2013:08:00:16 -0400] "GET /admin/metadata HTTP/1.0" 200 177 "-" "Liquidsoap/1.1.1+scm (Unix; OCaml 3.12.1)" 0
    127.0.0.1 - - [10/Aug/2013:08:00:25 -0400] "GET /admin/metadata HTTP/1.0" 200 177 "-" "Liquidsoap/1.1.1+scm (Unix; OCaml 3.12.1)" 0
    127.0.0.1 - - [10/Aug/2013:08:00:30 -0400] "GET /admin/metadata HTTP/1.0" 200 177 "-" "Liquidsoap/1.1.1+scm (Unix; OCaml 3.12.1)" 0
    127.0.0.1 - - [10/Aug/2013:08:00:30 -0400] "GET /admin/metadata HTTP/1.0" 200 177 "-" "Liquidsoap/1.1.1+scm (Unix; OCaml 3.12.1)" 0
    127.0.0.1 - - [10/Aug/2013:08:00:31 -0400] "GET /admin/metadata HTTP/1.0" 200 177 "-" "Liquidsoap/1.1.1+scm (Unix; OCaml 3.12.1)" 0
    127.0.0.1 - - [10/Aug/2013:08:01:53 -0400] "GET /admin/metadata HTTP/1.0" 200 177 "-" "Liquidsoap/1.1.1+scm (Unix; OCaml 3.12.1)" 0


    Post this log for me let me see if you incorrectly decode your songa

    /var/log/airtime/pypo-liquidsoap/ls_script.log



    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • If you still have the the problem dump the logs and post them in this thread as state in this troubleshoot procedure

    http://forum.sourcefabric.org/discussion/15654/airtime-troubleshoot-for-dummies-like-me-basic-things-you-can-do-to-see-under-the-hood


    You can listen  here with a this playback playback system is up from 1am-11am [0100-1100]Tuesday - friday EST. and 1am-2:30pm[0100-1430] Sundays.EST.

    remember your dump log will contained user name and pass so you can untar and remove,then tar and submit


    This system,speak time (TOH),play news,play jingles,playstation ID,play a sweeper at various time.



    Post edited by Voisses Tech at 2013-08-10 09:38:40
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • @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


    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?


    I know it's two unrelated things. I'm saying the only time the stream drops is when the fallback with liquidsoap is running. 

    The master also runs through liquidsoap, does it not? 

    When a playlist is scheduled, there is no stream drop. 
  • I noticed this in the logs for liquidsoap: 

    2013/08/11 22:41:02 [server:3] New client: localhost.
    2013/08/11 22:41:02 [server:3] Client localhost disconnected.
    2013/08/11 22:41:12 [server:3] New client: localhost.
    2013/08/11 22:41:12 [server:3] Client localhost disconnected.
    2013/08/11 22:41:22 [server:3] New client: localhost.
    2013/08/11 22:41:22 [server:3] Client localhost disconnected.
    2013/08/11 22:41:32 [server:3] New client: localhost.
    2013/08/11 22:41:32 [server:3] Client localhost disconnected.
    2013/08/11 22:41:39 [decoder:3] Method "MAD" accepted "/srv/music//Taylor Swift
    - Everything Changes (Pop Mix).mp3".
    2013/08/11 22:41:39 [stderr:3] TagLib: String::prepare() - Unicode conversion er
    ror.
    2013/08/11 22:41:39 [stderr:3] TagLib: MPEG::Header::parse() -- Invalid sample r
    ate.
    2013/08/11 22:41:42 [server:3] New client: localhost.
    2013/08/11 22:41:42 [server:3] Client localhost disconnected.
    2013/08/11 22:41:49 [music:3] Finished with "/srv/music//Ludacris - Helluva Nigh
    t (Radio Edit).mp3".
    2013/08/11 22:41:49 [music:3] Prepared "/srv/music//Taylor Swift - Everything Ch
    anges (Pop Mix).mp3" (RID 6).
    2013/08/11 22:41:52 [server:3] New client: localhost.
    2013/08/11 22:41:52 [server:3] Client localhost disconnected.
    2013/08/11 22:42:02 [server:3] New client: localhost.
    2013/08/11 22:42:02 [server:3] Client localhost disconnected.
    2013/08/11 22:42:12 [server:3] New client: localhost.
    2013/08/11 22:42:12 [server:3] Client localhost disconnected.

    Why does it connect and disconnect every 10 seconds? is that normal? 
  • I noticed this in the logs for liquidsoap: 

    2013/08/11 22:41:02 [server:3] New client: localhost.
    2013/08/11 22:41:02 [server:3] Client localhost disconnected.
    2013/08/11 22:41:12 [server:3] New client: localhost.
    2013/08/11 22:41:12 [server:3] Client localhost disconnected.
    2013/08/11 22:41:22 [server:3] New client: localhost.
    2013/08/11 22:41:22 [server:3] Client localhost disconnected.
    2013/08/11 22:41:32 [server:3] New client: localhost.
    2013/08/11 22:41:32 [server:3] Client localhost disconnected.
    2013/08/11 22:41:39 [decoder:3] Method "MAD" accepted "/srv/music//Taylor Swift
    - Everything Changes (Pop Mix).mp3".
    2013/08/11 22:41:39 [stderr:3] TagLib: String::prepare() - Unicode conversion er
    ror.
    2013/08/11 22:41:39 [stderr:3] TagLib: MPEG::Header::parse() -- Invalid sample r
    ate.
    2013/08/11 22:41:42 [server:3] New client: localhost.
    2013/08/11 22:41:42 [server:3] Client localhost disconnected.
    2013/08/11 22:41:49 [music:3] Finished with "/srv/music//Ludacris - Helluva Nigh
    t (Radio Edit).mp3".
    2013/08/11 22:41:49 [music:3] Prepared "/srv/music//Taylor Swift - Everything Ch
    anges (Pop Mix).mp3" (RID 6).
    2013/08/11 22:41:52 [server:3] New client: localhost.
    2013/08/11 22:41:52 [server:3] Client localhost disconnected.
    2013/08/11 22:42:02 [server:3] New client: localhost.
    2013/08/11 22:42:02 [server:3] Client localhost disconnected.
    2013/08/11 22:42:12 [server:3] New client: localhost.
    2013/08/11 22:42:12 [server:3] Client localhost disconnected.

    Why does it connect and disconnect every 10 seconds? is that normal? 
  • Ok, I am a little confused

    Is the streams disconnecting from icecast?
    Or is it that you see the information in the log above.

    The client you see connecting and disconnecting is the relationship between liquidsoap and airtime
    Liquidsoap has an internal clock to check things between 0 sec and 10 sec.

    So all it is doing is the main liq  checking if every thing is ok with airtime(client) and if all is okay it moves to the instruction in another liq

    Liquidsoap even pool/queue carts 10 sec before it actually prepared them to play.

    So if you have this problem with stream disconnection
    1. dump your logs according to my troubleshooting guide in this forum
    2. Please prepare your songs according to the manual
    3. Make sure you upgrade to 2.4
    4. Give me your icecast logs as above
     
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    please guys, if you have problems open a new thread
    this one is dedicated to ls_script or others modifications

    Thanks !


  • oops true
    I should have asked to post the script,yeah,I need to knuckle my head.Thanks @Albert Fr.

    @ Nolan Wagner

    Can you edit your posts here by placing the script you have .

    Copy your problem you have listed in this thread to a text editor and re-paste in a new Thread.

    thanks
    Voisses

    Post edited by Voisses Tech at 2013-08-12 12:13:44
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    Thanks Voisses !
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    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.

    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.
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    Can anyone tell me what triggers the Source to fallback?

    I mean, I think I know that it's triggered by silence.
    But which command in ls_scripts.liq states this?
    I can't find "on_blank", which would IMHO be the correct Liquidsoap-Command to look for.

    I want to know if and where it's possible to set the silence-duration to wait for before falling back.
    Or is this triggered by Playout-State (On-Air-Light)?

    cheers
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator

    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.



    I yelled to soon!
    We do use ALSA-Output at our Radio Station and this breaks this tweak.
    It leads in heavy glitches while scheduled webstreams are broadcasted.
    Scheduled Files are broadcasted fine

    I had to undo this change and will test further. damnit ;-)
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • my reasons for not experimenting with the line input are concerns I have in

    1. the various sound systems and sound software out there (OSS,ALSA,Pulse,Jack etc.) and coming up with a "one size fits all" solutions.
    2. .I would only be able to use it on fall-back without having to fiddle with the other liqs.(butt serves me well) in fact last sunday I broadcast from a remote location with Mixxx on a Laptop,=> Alesis Mixer Usb connects to Butt on netbook,=> Main Studio (AIRTIME MASTER).Main studio airtime is sent to a public Streaming server which feeds transmitter and simulcast stations in 5 different States.This weekend I will be coming Live from a carnival on the road.-BUTT SERVES Me "Awesome" as an Input
    3. I did a number of test with line inputs,but never liked the way it acted on my machine in terms of CPU and memory Usage.I had to do things such as tweak the buffer size and a number of audio processing for it to have a good sound quality.

    I will search for a script I had tested and give you and Idea later this week.
    Post edited by Voisses Tech at 2013-08-21 05:44:36
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator


    I will search for a script I had tested and give you and Idea later this week.



    can't wait for it.
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • Testing Now.Ready in 5 days
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    I did another successful try on fallback to ALSA-Input on my teststation today.

    My goal is to change ls_script.liq to be able to use audio from Soundcard-Line-In for Live-Studio-Situation.

    I added/uncommented following lines:

    Uncomment/Delete:
    Line 152:
    #default = amplify(id="silence_src", 0.00001, noise())
    Line158 & 159:
    #default = rewrite_metadata([("title", !ref_off_air_meta)], default)
    #ignore(output.dummy(default, fallible=true))

    Add:

    Line 7:
    set("frame.size",3120)

    Line 153 (after #default = amplify(id="silence_src", 0.00001, noise()) ):
    default = input.alsa(bufferize = true)

    Framesize depends on used soundcard. So this has to be customized system-specific.
    see infos here at bottom of page http://savonet.sourceforge.net/doc-svn/cookbook.html

    If this works, I can leave shows empty in Airtime-Calender to switch to Live-Studio-Input.
    I hope this doesn't only work on my test-station. I will report.
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • @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

    by biggest problem with setting the frame size >940 is that there was latency problem and buffer runs on webstream schedules (these are minimal now

    Also i was having under runs on the Alsa outputs.
    I did not see this post as I was way busy but I tweak everything that can run both schedule,playlist,security and default.

    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

    Post edited by Voisses Tech at 2013-09-23 17:38:42
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator

    @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



    I did try input.alsa() and it worked.
    But I want to address more specific, because I got 5 stereo-Ins and try to use 3 of them in future.
    So I tried input.alsa(device=dsp_chain1) or input.alsa(device="hw:0,0) or input.alsa(device='hw=0,0)
    I saw so many different expressions of this value.

    But let's continue this talk here =>
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.