24/7 Streaming With Playlists?
  • Hi guys,



    I love the software so far, it really does a great job.

    I am however having an issue I could really use some help with.



    I like being able to setup shows and tmp accounts, thats great but
    when there isn't a show and there isn't anyone going live all I get is
    dead air, thats just no good.



    Is there some way, any way that I can have it stream out a playlist instead? I really need something on my station 24/7
  • 19 Comments sorted by
  • Hey Buddy.

    Airtime do not support this feature yet, so you need to modify your Liquidsoap script file.

    Open your ls_script.liq file located @ /usr/lib/airtime/pypo/bin/liquidsoap_scripts

    and locate the following lines:

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

    Just before these lines..insert the following:

    #default = amplify(id="silence_src", 0.00001, noise()) 
    #default = rewrite_metadata([("artist","Airtime Radio"), ("title", "Offline")],default) 
    music = playlist(mode='randomize',reload=1,reload_mode="rounds", "/yourmusicfolderlocation") 
    jingles = playlist(mode='randomize',reload=1,reload_mode="rounds", "/yourjinglesfolderlocation/") 
    default = rotate(weights=[1,3],[jingles,music]) 
    ignore(output.dummy(default, fallible=true)) 

    Modify the folders to your actual folders where the music and jingles are.

    and set the weights as you wish (1 jingle, 3 tracks,)

    Then restart liquidsoap: sudo service airtime-liquidsoap restart

    Goodluck m8.
    Post edited by Guytrance at 2012-09-29 07:34:19
  • Reply to @DeAuthThis:

    default = amplify(id="silence_src", 0.00001, noise())
    default = rewrite_metadata([("artist","Airtime"), ("title", "offline")],default)
    ignore(output.dummy(default, fallible=true))

    #default = amplify(id="silence_src", 0.00001, noise())
    #default = rewrite_metadata([("artist","Airtime Radio"), ("title", "Offline")],default)
    #music = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/cor/Music/playlist/")
    #jingles = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/cor/Music/jingles/")
    #default = rotate(weights=[1,3],[jingles,music])
    #ignore(output.dummy(default, fallible=true))
    Notice you have 2 ignore statements, remove the first one and leave the bottom one..;)
  • Awesom :)
  • I'll give that a try, thank you very much

    EDIT

    I found it at this location
    /lib/airtime/pypo/bin/liquidsoap_scripts

    EDIT

    This just breaks it, my shoutcast server is nolonger getting a connection from airtime

    EDIT

    IF I connect to the master source then the server does start up, note that changing the file back does not solve the issue and the service "airtime-liquidsoap" according to ubuntu (even though I see it) says it does not exist (unrecognized service)
    Post edited by DeAuthThis at 2012-09-29 13:19:14
  • can you attach your ls_script file pls?
  • Sorry web browser caused a double post
    Post edited by DeAuthThis at 2012-09-30 01:41:35
  • File attached

    Note that I did comment out all the lines I added so I could get the server to connect again.
    Basically when I enable those lines Airtime says that its connected to shoutcast but the shoutcast server does not have any connections

    When I comment it back out and reboot the server it does connect
  • Hmmm something is up, doing that just killed the whole web interface, I'm going to mess with it a bit, I'll get back to you.

    I've gotta re-boot the server again

    EDIT

    yeah no idea what the heck happened, server is dead

    EDIT

    Server is back up, however once again airtime will not connect
    Post edited by DeAuthThis at 2012-09-30 02:36:26
  • Attached is my current script
  • ok the above file works!

    Some how the media in my playlist/jingle folders was deleted -_- so the thing just went offline, I put music back in those folders and it started right up
  • Hmmm :/ I just noticed that jingles never play, I can toss it up into the regular play list for now but... idk what the heck would cause that
  • check that your folder locations are correct in the script..and there are no errors.

    go to -> /lib/airtime/pypo/bin/liquidsoap_scripts

    and run -> liquidsoap -c ls_script.liq


    Let me know if theres errors.
  • I didn't get any output from running that
  • hmmm..

    attach your ls_script once again m8
  • I had to re-install my whole server.. but now it won't stream anything.. Don't know what happened....

    http://forum.sourcefabric.org/uploads/FileUpload/76/ac0a5a0aaa24133f5aa5e11f9533c8.liq
  • wow... idk whats going on..

    I've got the server working again but not with the modification.
    I'm on ubuntu 10.04-4 with a fresh install..

    when I add the mod (from your first post) it doesn't connect to the shoutcast server
  • Hi there,

    first thanks for your great work and good help !

    It's ok for me to diffuse 24/7 but i want to know if it's possible to show the artist and title of the song played in http://**:8000/api/live-info/?callback
    You know, in "current", "previous" and "next".
    Because, the name is showed in VLC (with m3u file), for ex, but not in api and i use it.

    I suppose that the solution is in this line code, exactly ?
    #default = rewrite_metadata([("artist","Airtime"), ("title", "offline")],default)
    Maybe, there is a line code in ls_script to show it ?

    Thanks a lot :) (and sorry for my bad english)
  • Reply to @Raphael+Fery:

    Looking into the file ApiController.php and the function liveInfoAction. You do not need to touch Liquidsoap for this part.
    Airtime Pro Hosting: http://airtime.pro
  • Ok, thanks, i will see it. :)

    #Edit : i give up, it's too complicated for me and i dont want of breaking something.
    I wait in the hope that general programming (24/7) is possible in a future release.
    Post edited by Lutin at 2012-12-03 14:21:45