ls_script.liq & Airtime 2.3.1
  • Vote Up1Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    with the last version
    some functions have strange results...

    for example :

    music = playlist (mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/Jingles/")
    jingles = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/Musics/")
    mixed = rotate(weights=[1,4],[jingles,music])
    default = fallback([crossfade_airtime(mixed)])

    rotate doesn't work, weights is not respected...
    someone have an idea ?
  • 8 Comments sorted by
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    I do also experience troubles with my fallback.
    Although it's just a relay to another stream in the LAN, it doesnt work.

    I did uncomment this:
    default = amplify(id="silence_src", 0.00001, noise())
    ignore(output.dummy(default, fallible=true))

    and placed this:
    default = input.http("http://10.0.0.20:9000/TAGESPLAYLIST.ogg")

    before "ref_off_air_meta = ref off_air_meta"

    what do I do wrong? I don't want any rotation, just relay to our Music-Shuffling-PC.
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    You can't do that
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    but I did! At least with 2.1 and a slightly different code ;-) as I see now.
    I think I used default = fallback (input.http("http://10.0.0.20:9000/TAGESPLAYLIST.ogg"))
    I go for my documentations from v2.1-times.
    But afaik I did it like shown in this article, adopted to http.input.
    Why should it not work? Liquidsoap offers plenty of input-sources?
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • You have only one input source into your fallback function?


    On Thu, Mar 21, 2013 at 4:06 PM, Albert FR <<br />airtime-dev@lists.sourcefabric.org> wrote:

    > with the last version
    > some functions have strange results...
    >
    > for example :
    >
    > music = playlist (mode='randomize',reload=1,reload_mode="rounds",
    > "/srv/airtime/Jingles/")
    > jingles = playlist(mode='randomize',reload=1,reload_mode="rounds",
    > "/srv/airtime/Musics/")
    > mixed = rotate(weights=[1,4],[jingles,music])
    > default = fallback([crossfade_airtime(mixed)])
    >
    > rotate doesn't work, weights is not respected...
    > someone have an idea ?
    >
    >
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    I'm doing something stupid

    music = playlist (mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/Jingles/")
    jingles = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/Musics/")

    this line doesn't work :

    default = rotate(weights=[1,4],[promotions,crossfade_airtime(playlist (mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/Musics/"))])

  • I'm having trouble with this as well. I've edited the following in ls_script.liq:

    Original:
    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)

    Edited: (Commented out the 'default' lines and 'ignore' line)
    #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)
    default = playlist(mode='random', "/location/of/media")


    The above works for a while, but crashes eventually and wrecks the entire Airtime installation..
    Also, weirdly, the file '/etc/airtime/liquidsoap.cfg' disappears when this happens and 'ls_script.liq' won't function anymore at all.
    Only after a re-install via apt-get am I able to get things running again.

    Isn't there a better (foolproof) method of having a playlist play at all times?

    Update:
    Just FYI, Airtime crashed without this fallback playlist as well.
    And again 'liquidsoap.cfg' disappeared.. So after this crash it would't recover either, I had to reinstall.

    This was running on Ubuntu 12.04 LTS. I've now switched to Debian 6 and so far it's running okay using the piece of code I mentioned above.

    Update 2:
    I believe I've fixed my crashing problems as well. When broadcasting M4A (iTunes / AAC) files the memory usage raised dramatically. I'm now strictly broadcasting MP3 with no problems so far.
    Post edited by rrraymond at 2013-03-26 15:26:43
  • @Albert FR

    Hi Albert!

    Have you managed to figure out about that strange errors?

    I'm also using a modified script, so I wouldn't update knowing there are issues with basic liquidsoap functions like rotate and others.

    Thanks.

    Alex
  • 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.