Customizing LiquidSoap scripts
  • Dear Sourcefabric team,

    Thank you for all of your hard work to make Airtime what it is today. I'm a technical volunteer for the University of Waterloo's radio station CKMS 100.3 www.soundfm.ca. I've installed Airtime 1.9.5 on Ubuntu server 10.04 (both are in default configuration.)

    Our transmitter is in a remote location from our studio, and at the moment, we are using Ices/darkice and the "stream handover" configuration specified in the FLOSS manual http://en.flossmanuals.net/airtime/stream-handover/
    This bypasses LiquidSoap, and all of the other benefits of the Airtime service.

    I would like to send the Ices/darkice stream to LiquidSoap, but don't know how to configure this. The manual doesn't help http://en.flossmanuals.net/airtime/configuration/

    Currently, my best way to figure this out is to wade through the files shown from the command line
    $ sudo find / -name *.liq
    Then "reverse engineer" what you've done using the Liquidsoap API. I'm not a programmer, but I muddle through most things eventually.

    Is there an easier way? Do you have any more documentation on how sourcefabric has implemented LiquidSoap?

    Any advice would be much appreciated
    Sincerely,
    Peter
  • 7 Comments sorted by
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    We are planning on implementing this feature in 2.1, so if you just want to wait a couple months it will be there. If you figure out how to do it, please post your code.  I'm pretty sure a couple other people have managed to hack the code to do this.

  • Hello Peter Higdon !
    In our radio Bieszczady.FM we hack this ;) First of all I recommend take tour with Internet DJ Console (more, more powerfully than Ices/darkice and user-friendly)

    I explained the way of hack in this topic http://forum.sourcefabric.org/discussion/13518 , also Romeo show his way.


    Post edited by krzakx at 2012-01-25 10:13:52
  • Hi Peter,

    Liquidsoap documentation is available here

    Airtime Pro Hosting: http://airtime.pro
  • Thanks so much for your timely responses. Thanks to krzakx for pointing me to Romeo's post here
    http://forum.sourcefabric.org/discussion/comment/14048#Comment_14048
    He shows how to use #input.harbor for streaming into airtime without setting up an icecast server.
    I have been told NOT to set up an icecast server at the studio b/c it has a static IP [edit: oops, I mean dynamic IP- thx Martin], and we would go offline when our IP gets re-assigned.

    @krzakx: I can't see an advantage to using DJ Console when Airtime should be handling all the configuration. If anything, I would use mixxx, bringing the discussion full-circle.

    @Paul: I'm not sure what you mean by 'implement this feature'. You mean with a GUI/Wizard? implementing your own input.harbor? The beauty of Airtime is how it glues together mature OSS projects with a "lazy" programmer ideal. Dealing with each project separately is much easier than sorting through airtime's "glue". As a novice volunteer, I don't want GUIs for everything, but hope for more guidance than the typical: "see projectX docs."
    I'd be more than happy with step-by-step how-to's for popular modifications of _default_ airtime settings in the .liq scripts, postgres config files, monit, etc. This forum might grow into this eventually (a question oriented forum similar to stackexchange would improve searchability). When I get it working, I'll post my step-by-step instructions here.

    Thanks again for this awesome _free_ broadcasting tool!
    Peter

    Post edited by Peter Higdon at 2012-02-03 11:18:10
  • If you have a static IP, your IP address does not get reassigned. Perhaps you meant you have a dynamic IP address?
    Airtime Pro Hosting: http://airtime.pro
  • Hi Guys,

    I've stared at this for a while, and haven't been able to get much further than I was.
    Here's @Romeo's code:
    set("harbor.bind_addr","0.0.0.0")
    set("harbor.port",8090)
    set("harbor.password", playlistPasswd)


    liveInput = input.harbor( id="live", 
    "live.ogg", 
    buffer=2.,
    password=livePasswd)


    playlistInput = input.harbor(id="playlist", 
    "playlist.ogg", 
    buffer=10.,
    password=playlistPasswd)


    noiseInput = noise(id="noise")
    noiseInput = amplify(id="noiseAmp", 0.05, noiseInput)
    noiseInput = rewrite_metadata([("title","no signal")], noiseInput)


    #Master Input
    input=fallback( id="mainFallback", 
    track_sensitive=false, 
    # transitions=[crossfade, crossfade, crossfade], 
    [liveInput, playlistInput, noiseInput])


    out192 = output.icecast.mp3( id="192mp3",
    bitrate=192,
    input,
    restart=true,
    password=omegaRelayPasswd,
    mount="rvk192",
    name=streamTitle,
    genre=streamGenre,
    url=streamUrl,
    description=streamDescr)
    The function I need to build is output.icecast.mp3()
    Where I do put it? in a new script? Where/how does it get called?
    I did
    $ grep "output.icecast" *.liq
    and the only scripts that have it are shoutcast.liq and external-todo.liq
    Reading over these two scripts didn't help much.

    Help?
    Thanks a lot!
  • Try looking in /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq and ls_lib.liq

    Note that these files are overwritten on every install/reinstall, so you might want to make sure you keep them safe somewhere else as well.
    Airtime Pro Hosting: http://airtime.pro