Solution for multiple DJs and other input streams.Why buffering may not be the answer?
  • You do not have to read my babbling in this top post or final thoughts just scroll to the next if you just want a solution.

    One of the first thing to do in any complicated situation is to define(analyse) that situation and then look at the available answer before implementing the solution.Keep in mind the mnemonic "Measure twice Cut Once"

    Here are two definition that most people confused with

    • a cache is a component that transparently stores data so that future requests for that data can be served faster.

    •  a buffer is a region of a physical memory storage used to temporarily store data while it is being moved from one place to another.
    http://en.wikipedia.org/wiki/Data_buffer

    Advance reading here http://savonet.sourceforge.net/doc-svn/sources.html and the Topic is Caching mode

    Most time people see buffers underrun or overrun within Airtime (AT) there only thought is to increase or decrease buffers.

    Whilst this maybe true for Alsa ( see Pulse Audio - Sound Server),its not necessarily true for Liquidsoap and many computing solutions.


    you can see that this increase and decrease panacea towards buffering is not the answer.

    Here Are just a few of the side-effects to taking this approach

    • CPU utillization
    • Memory utilization
    • Lock ups and shutdown
    • Latency

    The solution to this is to try and used some type of component that transparently stores data so that future requests for that data can be served faster.Yes that sounds familiar and its called Cache` and the main resource to use is a Server.

    Liquidsoap has its own habour server which can also be used as http server.

    Airtime uses this harbour server (input and output) and also Icecast Server.(Output but can also use it as an input)

    Here is my suggestion when to use an Icecast server (Icecast can carry up to 25 mount points,If you need more,consider more interface and listen sockets)

    • You have Limited minimal resources - CPU,RAM Bandwidth etc.
    • You have plenty stream inputs(DJ's,Relays etc).
    • You are using a modified Ls_script
    • You are doing encoding,decoding and re-encoding.
    • You utilize your server for more than one task.


    My General thought (IMHO) is that you should reserve the use of Master and Show Streams for high bandwidth or LAN sources and
    where you have adequate resources


    Post edited by Voisses Tech at 2014-02-27 12:16:09
    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.
  • 3 Comments sorted by
  • Solution 1 This has been a proven concept and method

    In the Airtime Manual at (and what I would recommend)

    http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/icecast-handover/

    You will see and approach to using mount points but if you read

    http://www.icecast.org/docs/icecast-2.3.1/icecast2_config_file.html

    Under the topic

    Mount Specific Settings

    You can see the many options

    Lets say John is a dj in Hidden Lands and Your AT is in Some Other lands(SOL)

    Add the following to your mount point

    <mount>
            <mount-name>/DJ_Hidden_Lands</mount-name>
            <intro>/DJ_Hidden_Lands_intro.mp3</intro>
            <burst-size>65536</burst-size>
            <mp3-metadata-interval>4096</mp3-metadata-interval>
            <hidden>0</hidden>
       </mount>



    You can put whatever other configuration you want from Mount Specific Settings such as Authentication,etc

    You do not need any failover since you will be treating these as separate mounts

    Give your djs these the relevant information from this mount and asked them to stream to that settings.
    Remember to give them also your Stream IP- address or  fully qualified domain name (FQDN).-Some Other lands(SOL)



    Now you can go ahead and put that as a Webstream in Your AT. for the times you want

    Notice you can increase a number of things  as per settings and you can even record that stream separately and the added bonus,you can write a script to record the stream,before the dj comes online or as an archive

    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.
  • The Other Two solutions require additional skills

    Another Solution is to  also use the mksafe operator that will insert silence during failures.
    Then Strip that silence

    This require a good knowledge of LS to introduce it in the Airtime LS script and sometimes require you to pay close attention to changes
    when upgrades.

    This is What I have been using but around AT 2.4 The Ls script changed and what I used before I had to change radically to work.
    I would not recommend it to "faint of heart"


    There is a suggested solution to speed up the stream to match the LS speed.The Verdict is still out on that.

    Post edited by Voisses Tech at 2014-02-27 12:03:09
    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.
  • Final thought.

    I am amongst the few who feel LS can conquer a lot of headaches but you also have to be aware of both Icecast and Liquidsoap
     
    Here is an analogy to better understand Buffers and Cache.

    Your Water pipe at home with a filter

    The Tap will be the buffer (RAM,)
    The Filter will be your Cache
    The Size of the filter cup your Resource ( CPU,etc.)
    The Pipe will be the Channel
    The size of the pipe your bandwith
    The Water be the stream

    As water (stream) is sent to the tap (RAM) received the water (stream) its send to the filter(cache) and are held Filter cup(CPU,etc.)

    Remember I am a simple person,I care not what you think of my analogy

    Now increase or decrease any of those component and you determine the effect,but just to say a bigger buffer will not compensate for lower bandwidth or inadequate resource.

    Even for Buffers you have to set a max.size to get the best.

    I hope this will help you in your choice,but its not a definitive answer and the way I see it,If  you have a better analogy,please put it forward for other to understand

    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.