How come auto dj or a failsafe audio is not in the todo list? And a buffer problem!
  • Hello dear friends,

    Im owner of 3 radio stations, 2 (Ave fm and radio amor portugal) of them have live broadcast and the other one (radio caxinas) is just random music. All of them have the liquidsoap script auto dj installed but as you know this is a hack not a solution. Every time there is an update to airtime i cant just upgrade because im afraid i will have to change again the ls script and depending on how you guys changed the script i may have to seek help because im not a cammel developer neither a liquidsoap/savonet expert. Otherwise i will end up with radio caxinas dead with out music since i barely schedule something there.

    I still cant understand why you guys dont have in the webinterface a button to enable or disable a autodj that will play a random music from a specific watch folder or a specific music even if it is over and over again.

    If you guys have plan for this in the future please share it, dont plan to be perfect when doing this plan to be MVP (minimal viable product) then get perfect. This would save me and as i see in the forum a lot of other people.

    Other thing i noticed is that liquidsoap arbor does not have a nice buffer, this means that if my dj has a internet brakedown even of a split nano second the audio stops and the (bad implemented) auto dj kick in for 2 or 3 seconds. This happens when i have a very busy server and (I assume) I get a packet from source lost, or when the dj internet has a small breakdown. This did not happen when i was with sc_Trans from shoutcast. Its a complete stupidity to go back to an old system but..... who knows. Can you please provide me some info on this?

    Btw im willing to help develop these futures but i dont know the scructure of airtime code.

    Thanks in advance and i will hope to have a nice answer ;)

    https://dev.sourcefabric.org/browse/CC-5059?jql=project = CC AND fixVersion = "User requests" AND resolution = Unresolved AND priority = Critical ORDER BY key DESC
    Post edited by César Araújo at 2014-08-08 10:05:43
  • 12 Comments sorted by
  • Okay Let me answer your first question

    Question 1
    In my post here

     http://forum.sourcefabric.org/discussion/16091/fallover-101-how-to-make-all-scripts-worked-revisted-pt2-advance-reduce-effects-of-upgrade-brok

    The name says it all and it shows you how to develop your own custom block of script when there is an upgrade.

    Remember most of us are also user here and if there was a radical script changes we would be having answers here.

    The liquidsoap development team also do not do drastic changes,they are busy trying to develope new functions and fixing those which exists

    I have been using my script since 2.3 and I have upgrade ,change machine and all I do is what I recommend above.

    Open source software is a dynamic software,take for instance my firewall is basic iptables,for multiple network interface ,I have to include that plug-in,for Dns guardian i have to add that plugin and so on.

    My recommendation to sourcefabric is to develop that Plugin , Modular or add-on approach.This is the way all software are being develop today,so that they can concentrate on the core and tested and recommend official and unofficial  add-ons/plug-ins/modules.

    This is the same thing you call hack today.
    This way we could have like an Ad insertion module,AutoDj module,Dj Station Module,Tune-in Module and so on

    Question 2
    Isn't sc_trans an autodj application and you now require licence to auto play MP3?

    But Lets  address your buffer situation.

    In My post here

    http://forum.sourcefabric.org/discussion/16423/solution-for-multiple-djs-and-other-input-streams-why-buffering-may-not-be-the-answer

    I explain how to develope a strategy to deal with buffers.
    Another method I did not discuss was to do a transistion  where your station Id will play and then a jingle before any switching occur.

    The real answer is that there is no good solution to what you stated you have to develope a strategy for loss of network signals

    You might find reading this post

    http://forum.sourcefabric.org/discussion/comment/29208#Comment_29208

    Also relevant

    Note mksafe will push you to silence and you might have to strip the blank


    Good Luck
    VOISSES



    Post edited by Voisses Tech at 2014-08-08 21:29:58
    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.
  • Thanks Voisses Tech  for the input on this.

    First i have real a lot on this and thanks for the links.

    First, using icecast as the solution is not a good solution, altought it might work i would be loosing airtime authentication to dj's. I want djs to plug in to the airtime (liquidsoal) and not to a defines icecast source that will be used as webstream to icecast. This is not what i expect to be the solution.

    At the moment i have an autodj playing when there is no source connected, wich is not ideal since the source can just get a small packet lost and the autodj would kick in right away and then you have a 1 second fade in and another second fade out. Not a good way since most of the time when doing music transition to voice it kicks in (dunno why).

    Im on the latest stable airtime and on a perfect good debian.

    I really apreciate your help :)

    Thanks in advance.
  • Hello Cesar!

    Don't take this the wrong way, but why bother with Airtime at all if you're bypassing the GUI with autoDJ hack scripts?

    Second, if your remote DJs do not have access to stable Internet, no amount of buffering will ultimately help. Truer still, it makes much more sense to have ALL music on a single central Airtime server rather than trying to do it on-the-fly and expecting a perfect result anyway.

    Thoughts?
  • here is something I use

    def lineintrans(x,old,new)
      sequence([ x , new ])
    end

    # You have define a single file to be played for station transistion and ID
    # i am using the script 1 example here
    #http://forum.sourcefabric.org/discussion/15701/fallover-101-how-to-make-all-scripts-worked-easy-steps-to-build-your-scripts-fixed-silence/p1
    # just change the default

    default=fallback(track_sensitive=false,
                   transitions=[ lineintrans(stationID), lineintrans(station_transistion) ],
                     [ playmymusicbackup, default ]
            )


    # what the script does is that it plays the stationID (an audio file) then it have a next audio file that will say some like resuming to our live dj or just a sample file like an instrumental  before going to auto dj,so should
    go wrong to two files will play before going to autodj/switching back to schedule.

    The reference is found here http://savonet.sourceforge.net/doc-svn/cookbook.html under transistion
    Although these are more comphrensive

    It works for me /hope it do for you

    VOISSES
    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.
  • Do you have your music rotate in a separate line from your default fallback like this

    ############ (use this for Airtime >2.3   liqidsoap >1.01
    musicplayback = rotate blah blah blah
    default = fallback blah blah
    ##############

    and not this

    default = rotate blah blah

    Ok
    Just to correct you, Icecast can be carry authentication for each mount.
    You also  built say an 1 hour silent file using audacity and place it in the schedule (dis advantage is that it will be dead air when the dj drop)

    The full thing is that there is little you can do when there is a network drop.

    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.
  • Roger wilco, thanks for the comment, but unless you program 24/7 audio in airtime wich im not doint, an autodj is more than needed to fill the gap, or your stream goes down. Even if for a split second and i come very easy from 200 listeners to only 10 in a few seconds if the stream goes down.

    Voisses tech thanks for the very big help.

    I made a fresh install of airtime to see if the problems go away, i hope so. My ls script is now like this

    .....
    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))

    # Modification Starts here
    musicDay = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/autodj/dia/musica/")
    jinglesDay = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/autodj/dia/jingles/")

    musicNight = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/autodj/noite/musica/")
    jinglesNight = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/autodj/noite/jingles/")

    default = rotate(weights=[1,3], [switch([({ 6h-22h }, jinglesDay),({ 22h-6h }, jinglesNight)]), switch([({ 6h-22h }, musicDay),({ 22h-6h }, musicNight)])])
    #default = rotate(weights=[1,3], [jinglesDay, musicDay])
    #Modification ends here

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

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


    For now it is ok i dont have many djs working today (vacations) so i could not test it correctly. Hope to do a more intensive test tomorrow or tonight.

    Thanks for the input
  • Friend! You're attacking the problem the wrong way. Use the fallback capabilities of Icecast to keep listeners on the server in the event of intermittent source disconnects!
  • ... another reason why it almost ALWAYS makes more sense to keep your Airtime and Icecast servers separate y'all ... :x
  • "Friend! You're attacking the problem the wrong way. Use the fallback
    capabilities of Icecast to keep listeners on the server in the event of
    intermittent source disconnects!"

    Exactly Mr Wilco. But this has given me an idea. Oh dear :/  I must stop developing and start making money.
    No longer using Airtime or Libretime.
  • Friend! You're attacking the problem the wrong way. Use the fallback capabilities of Icecast to keep listeners on the server in the event of intermittent source disconnects!



    Try this post
    https://forum.sourcefabric.org/discussion/15678/tips-to-fullfil-and-spice-up-your-airtime-life-dailymonthlyor-whenever-the-pen-fill-with-ink/p1

    have not touched it long time but it covers
    • fallback mounts and stream handover so that you will not lose the listener and you djs can stream directly to a seperate mount point
    • intro file   nice to have say your station Id when the listener connects
    • a backup file  so you can restart your ls script and no one realised or you do not kick the listener
    • A RSS feed of your stream. do not why I wrote that but i might have been under the influence of "Alcohol"
    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.
  • Hello Cesar!


    Don't take this the wrong way, but why bother with Airtime at all if you're bypassing the GUI with autoDJ hack scripts?

    Second, if your remote DJs do not have access to stable Internet, no amount of buffering will ultimately help. Truer still, it makes much more sense to have ALL music on a single central Airtime server rather than trying to do it on-the-fly and expecting a perfect result anyway.

    Thoughts?


    So Here is the senaraio and why the Hack script is marvellous.

    I have a show on last sunday night but i was schedule to leave on friday. I wanted
    1. it it appear as though I was there at  my playout but just by autodj.I created some scripts of my voice telling the exact time both when I am about to handover to the station for commercials and spots (TOH) and also when I return back on the Air.The scripts allow me to put it down to the exact seconds.
    2. I created a sweeper samples to be heard ever 1m15s
    3. I then load the songs in the schedule exactly how i want them to play so lets say at 10.38 a song start,I created an switch announcing the exact song
    4. For the first 3 hour Ihad no internet access,but when I got it I patch in through the master and I use the transistion I outlined above. I went to a function that most of the station host were at.and they were suprise because they though i was at my playout spot some 500 miles away.

    This task could not be achieve with Airtime Alone as it stands or Liquidsoap (it does not carry a scheduler).

    The greater thing about the autodj hack script,if you look above is that you would require about 3 to 4 hours to achieve the said task.

    So its wise to use the script it makes a whole lot of difference.

    I recently installed Airtime in a church with a sermon broadcast to two local station,I code the script with silence detection .When the technican  gets there he just switch on the whole system,the Airtime machine comes on an ready to stream live.I there is silence it plays a backup music.

    The technican can leave go home and if the pastor calls and ask for some special songs,he just build a show and put some sort of schedule from the Airtime library.

    So its worth it.


    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.
  • Roger wilco, thanks for the comment, but unless you program 24/7 audio in airtime wich im not doint, an autodj is more than needed to fill the gap, or your stream goes down. Even if for a split second and i come very easy from 200 listeners to only 10 in a few seconds if the stream goes down.

    Voisses tech thanks for the very big help.

    I made a fresh install of airtime to see if the problems go away, i hope so. My ls script is now like this

    .....
    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))

    # Modification Starts here
    musicDay = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/autodj/dia/musica/")
    jinglesDay = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/autodj/dia/jingles/")

    musicNight = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/autodj/noite/musica/")
    jinglesNight = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/autodj/noite/jingles/")

    default = rotate(weights=[1,3], [switch([({ 6h-22h }, jinglesDay),({ 22h-6h }, jinglesNight)]), switch([({ 6h-22h }, musicDay),({ 22h-6h }, musicNight)])])
    #default = rotate(weights=[1,3], [jinglesDay, musicDay])
    #Modification ends here

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

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


    For now it is ok i dont have many djs working today (vacations) so i could not test it correctly. Hope to do a more intensive test tomorrow or tonight.

    Thanks for the input




    Please read my comments about setting the default statement in a seperate clock from the rotation.
    If you put a crossfade or some processing in that script,"All hell broke lose"
    do it right from now.so you can expand on it.I will find the notes on clocks  and append it here
    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.