Broken - Playing Random Songs on Silence
  • I was using Albert FR's ls_script.liq hack for 2.2.1.
    My Ubuntu did an update today and now it is broken and I have no music unless i queue it manually...

    Could someone please provide an updated hack for this?



    #default = amplify(id="silence_src", 0.00001, noise())
    #default = rewrite_metadata([("artist","Airtime"), ("title", "offline")],default)
    drops = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/Drops/")
    music = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/Musiques/")
    jingles = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/Jingles/")
    default = rotate(weights=[1,3,1,3], [jingles, music,drops,music])
    ignore(output.dummy(default, fallible=true))

    master_dj_enabled = ref false
    live_dj_enabled = ref false
    scheduled_play_enabled = ref false
  • 20 Comments sorted by
  • Change to:

    default = playlist (mode='random', "%your_data_path%")
    master_dj_enabled = ref false
    live_dj_enabled = ref false
    scheduled_play_enabled = ref false
    Post edited by Yaroslav at 2013-02-13 01:56:26
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    Hi you can do that differently :

    drops = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/Drops/")
    music = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/Musiques/")
    jingles = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/Jingles/")
    default = rotate(weights=[1,3,1,3], [jingles, music,drops,music])

    without the :

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


  • In 2.3.0 it is not working
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    I've find another way :

    promotions = playlist (mode='random', "/srv/airtime/Jingles/")
    timed_promotions = delay(1200.,promotions)
    default = fallback([timed_promotions,playlist (mode='random', "/srv/airtime/Musiques/")])

    jingles are diffused every 20 minutes (1200 seconds)
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    another thing

    now crossfade for backround playlist doesn't work...

    any ideas ?
  • cross fade between tracks in fallback playlist, or between fallback playlist and scheduled content
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    the both :/
    the old way doesn't work
    I'm trying to understand why...
  • I had a bit of trouble getting it to work so i thought I would clarify what I did with Albert FR's instructions..

    I just pasted it to line 126 of ls_script.liq under

    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)
    ignore(output.dummy(default, fallible=true))

    so it looked like

    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)
    ignore(output.dummy(default, fallible=true))
    promotions = playlist (mode='random', "/srv/airtime/Jingles/")
    timed_promotions = delay(1200.,promotions)
    default = fallback([timed_promotions,playlist (mode='random', "/srv/airtime/Musiques/")])
  • Also, I too would love to get the cross-fade working between fallback tracks and also between the transition of fallback and schedule.

    At least I am back on air between schedules. Thank you guys for your help.
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    erase

    default = amplify(id="silence_src", 0.00001, noise())
    and
    ignore(output.dummy(default, fallible=true))

    and put

    promotions = playlist (mode='random', "/srv/airtime/Jingles/")
    timed_promotions = delay(1200.,promotions)
    default = fallback([timed_promotions,playlist (mode='random', "/srv/airtime/Musiques/")])

    before the

    ref_off_air_meta = ref off_air_meta
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    sorry,

    i've modified my conf (to have crossfade ;-)

    promotions = playlist (mode='random', "/srv/airtime/Jingles/")
    timed_promotions = delay(1200.,promotions)
    default = fallback([timed_promotions, crossfade_airtime(playlist (mode='random', "/srv/airtime/Musiques/"))])
  • Sorry for the long time between replies but I still seem to have an issue with this. It seems to not apply the Replay_Gain to the fallback music or promotions and I can't figure out how to get it working...
  • Hello, I'm new to airtime and liquidsoap and I've been searching the forums all morning trying to find how to fix the problem I'm having.  I've used Albert's script (Kudo's for this btw it works great) however the problem I'm having is that it seems liquidsoap is rewriting the title of the song with "Airtime - offline".

    I tried commenting out
    ref_off_air_meta = ref off_air_meta
    if !ref_off_air_meta == "" then
        ref_off_air_meta := "Airtime - offline"
    end

    and changing 
    default = rewrite_metadata([("title", !ref_off_air_meta)], default)

    to 
    default = rewrite_metadata([("title")], default)

    all that did was break liquidsoap :(  I'd really like to remove the rewrite all together since I want it to always display the title of the song.  The only way I would be offline is if the network link would be down and then the stream isn't going to play at all so it doesn't matter.

    - EDIT -

    Fixed my problem, I commented out

    #default = rewrite_metadata([("artist", !ref_off_air_meta)], default)

    Now my only issue is that despite the fact that I am indeed streaming and hear music icecast thinks I'm offline, therefor all the PHP scripts I've tried to use to show "now playing" and "last played" say the icecast stream is offline.  I don't get it because I can connect to the stream and I hear everything fine.  http://radio.wulfpak.com:9095/stream is the stream in case someone is able to see what it may be from that.

    Post edited by David Spearing at 2013-03-03 21:39:38
  • This is how my section looks and I don't have liquidsoap rewriting the metadata...

    #default = amplify(id="silence_src", 0.00001, noise())
    promotions = playlist (mode='random', "/media/storage_server/radio_music/autoplay/Jingles/")
    timed_promotions = delay(1200.,promotions)
    default = fallback([timed_promotions, crossfade_airtime(playlist (mode='random', "/media/storage_server/radio_music/autoplay/Music/"))])
    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))

  • Thanks Daniel, I fixed the rewrite metadata portion by commenting out the second to last line in your config as you did as well which is probably why yours didn't rewrite.  My problem now...which is also the root of why it was rewriting metadata is that even though it's streaming content it's still reporting that it's offline.  I don't understand why it's offline if liquidsoap is indeed sending content out of icecast.
  • Thanks Daniel, I fixed the rewrite metadata portion by commenting out the second to last line in your config as you did as well which is probably why yours didn't rewrite.  My problem now...which is also the root of why it was rewriting metadata is that even though it's streaming content it's still reporting that it's offline.  I don't understand why it's offline if liquidsoap is indeed sending content out of icecast.



    It's a bug. They're working on it...
  • I actually fixed my problem by removed my extra icecast mounts.  I'm just running the default /stream now and the two created by Airtime.  Everything seems to function as designed now.  Thanks for the help!
  • I still can't get Replay Gain to work with this. Has anybody got this to work or know how to get it working? I would really like it functioning for the fallback music...
  • ReplayGain wont work for fallback tracks unless Airtime knows about them.
    This is because Airtime does additional work ahead of time on each file
    before sending to Liquidsoap (calculating ReplayGain is expensive!). You
    could try enabling a liquidsoap feature to try calculating on demand but
    there could be a small delay before the file starts playing. Read more
    here: http://savonet.sourceforge.net/doc-svn/replay_gain.html
    On Mar 9, 2013 3:57 AM, "Daniel Connelly" <<br />airtime-support@lists.sourcefabric.org> wrote:

    > I still can't get Replay Gain to work with this. Has anybody got this to
    > work or know how to get it working? I would really like it functioning for
    > the fallback music...
    >
    >
    Airtime Pro Hosting: http://airtime.pro
  • Please read this.,

    There is three (3) excellent script  at the end  that you will want  for airtime

    http://forum.sourcefabric.org/discussion/15701/fallover-101-how-to-make-all-scripts-worked-easy-steps-to-build-your-scripts-fixed-silence

    Modify yours accordingly and post your master piece here

    Please  do not post any problem in this thread it will no longer be answered in this thread

    Post only finished script.Open a new thread with all problems and queries


    http://forum.sourcefabric.org/discussion/15650/airtime-2-4-and-backups-playlists-give-yours

    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.