Artime/Liquidsoap - fallback cutting in during steaming.
  • For the last month or so we have noticed that the fallback interupts our
    DJs while they are on air, and we cant figure out why or how to fix it.
    We
    are mostly sure that it has to something to do with what ever sound
    detection is biult in to liquid soap, but have been unable to figure it
    out.

    This is our ls_script.liq
    https://www.dropbox.com/s/p85nxqglhz5rsy1/ls_script.liq?dl=0

    the only parts of the script we edited are these

    #default = amplify(id="silence_src", 0.00001, noise())
    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)


    music = playlist (mode='randomize',reload=1200,reload_mode="rounds", "/srv/airtime/stor/imported/")
    sweepers = playlist(mode='randomize',reload=1200,reload_mode="rounds", "/srv/airtime/stor/sweepers/")

    mixed = rotate(weights=[1,8],[sweepers,music])

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

    #default = playlist(mode='random', "/srv/airtime/stor/imported")
    default = rewrite_metadata([(!ref_off_air_meta,"artist" ),("-","title" )], default)
    ignore(output.dummy(default, fallible=true))

    master_dj_enabled = ref false
    live_dj_enabled = ref false
    scheduled_play_enabled = ref false

    Now I assume that it has something to do with
        ignore(output.dummy(dj_live, fallible=true)
    s = if dj_live_stream_port != 0 and dj_live_stream_mp != "" then
        dj_live =
            audio_to_stereo(
                input.harbor(id="live_dj_harbor",
                    dj_live_stream_mp,
                    port=dj_live_stream_port,
                    auth=check_dj_client,
                    max=40.,
                    on_connect=live_dj_connect,
                    on_disconnect=live_dj_disconnect))

        ignore(output.dummy(dj_live, fallible=true))

        switch(id="show_schedule_noise_switch",
                track_sensitive=false,
                transitions=[transition, transition],
                [({!live_dj_enabled}, dj_live), ({true}, s)]
            )
    else
        s
    end

    Is "fallible" the fallback?



    Any help would be greatly appreciated
  • 4 Comments sorted by
  • That's is why I look linux.
    Every solution is simple and if you just look at what is happen then your solution is simple.

    First of all when you program your mod ls script its in a state of readiness and is running paralell to your schedule so that if the signal drops it will automatically fill the spot.

    Now you have to keep current with linux so the cript you are using is old as it relates to airtime.

    Here is where we are

    https://forum.sourcefabric.org/discussion/16909/autodj-sweetest-seen-fake-or-real-for-a-good-deal-free-free-no-unexpected-autoplay

    this give you an ability to tune the default blank to your advantage so if say you want 1 minute before any autodj take effect then  make the max blank 60.

    The next approach is to make your self a m3u playlist
    • make an blank music file (mp3 or Ogg) say for or more  minute ( better to use a file than the api blank duration)
    • Your playlist mode should be normal and reload mode watch

    so whenever the signal drops from the rermote it wat that lenght before going back

    or plainly when you have a schedule delete all path to other files in the m3u list and leave that one blank file.

    This last point is to show you a common sense approach,you cannot have autodj on while there is something shedule.

    There is a finally approach which is a little more technical that is to manually stop a source when the other source is on and it require another php script to work with it

    Look at the top of the script you will see how to do it ith :=enable
    This just a little more technical and all I do is tell people delete the files in the m3u and as long as you are using reload moad of seconds or watch you are safe without eeding to restart the ls.



    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.
  • scoring over my old notes ,I found how I originally dealt with this through fixing the  transitions.
    the method I mention above is valid for if you use m3u list as your playlist and is very effective
    in fact I used two script
    autodj on and autodj off, I just run them when I have a schedule

    you may want to try 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.
  • #line 62  in the ls_lib .liq (airtime library utilities ) changing the transition duration (in bold below) and it reads

    # we need this function for special transition case(from default to queue)
    # we don't want the trasition fade to have effect on the first song that would
    # be played siwtching out of the default(silent) source
    def transition_default(a,b) =
      log("transition called...")
      if !just_switched then
          just_switched := false
          add(normalize=false,
             [ sequence([ blank(duration=30.),
                           fade.initial(duration=!default_dj_fade, b) ]),
                fade.final(duration=!default_dj_fade, a) ])
      else
        just_switched := false
        b
      end
    end

    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 drops are frequent and your live djs never mentions your station here is a neat way to inject your station id in when the drops occur

    # make your own default transistion and a jingle like this


    # name a jingle for the transistion with a delay that its not played back too soon
    #feel free to put a silent mp3/ogg
    # if you install airtime-audio-samples there is a silent ogg included
    #you can put these in your own library(preferable) or  just above line 236

    station_id =delay(1.,single("/pathto/my/station_id.ogg"))
     
     
    def transition_default_2(j,a,b)
      add(normalize=false,
          [ fade.initial(b),
            sequence(merge=true,
                    [blank(duration=5.),j,fallback([])]),
            fade.final(a) ])
    end


    # Now look at   line 234 -238 change line 236
    s = switch(id="schedule_noise_switch",
                track_sensitive=false,
                transitions=[transition_default2(station_id), transition],
                [({!scheduled_play_enabled}, stream_queue), ({true}, default)]
        )


    If the drops are very short (<blank duration increase if necessary) you might not hear the jingle as the switch transition may not take place

    I recently installed and never fixed mine better go now
    Good luck
    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.