You can edit almost every page by Creating an account. Otherwise, see the FAQ.

Liquidsoap

From EverybodyWiki Bios & Wiki


Liquidsoap
Liquidsoap logo
Developer(s)The Savonet Team
Initial release2003
Stable release
1.1.1 / May 8, 2013; 10 years ago (2013-05-08)
Written inOCaml
Engine
    Operating systemUnix, Linux, Microsoft Windows and Mac OS X.
    TypeStreaming media
    LicenseGPL
    Websitehttp://liquidsoap.fm/

    Search Liquidsoap on Amazon.

    Some use of "" in your query was not closed by a matching "".Some use of "" in your query was not closed by a matching "". Liquidsoap is an audio programming language developed initially to produce audio and video source streams sent to an Icecast server. The difference with other available tools is that Liquidsoap interprets a dedicated script language, which makes it very versatile and adaptable to a lot of various usages.

    The recent releases of Liquidsoap also include the possibility to interact with the local sound card or to output multimedia data to local files using various formats. Thus, Liquidsoap is not only a source client for Icecast, but a general purpose specialized audio language dedicated to the automation of audio and video processing and streaming.

    Liquidsoap is released under the GNU General Public License (GPL), is part of the Savonet project, and is developed in OCaml. The Savonet project also provides OCaml modules used for the various features supported by Liquidsoap.

    Design[edit]

    Describing an audio stream can be very complex: several inputs (files, stream relaying, sound card input) that can be combined in various ways (audio processing, mixing, track scheduling, fall-backs) and finally be output in various other ways (several servers, contents and formats). Liquidsoap uses its own scripting language for configuration.

    Streams[edit]

    A stream in Liquidsoap

    In the Liquidsoap language, audio and video streams are represented by variables. However, a stream is an infinite object, hence streams variable in Liquidsoap cannot be directly manipulated. Instead, they are processed through operators that wrap operations around them.

    Additionally, a stream is a high-order object[clarification needed] that represents an infinite sequence of audio or video data samples but also metadata and breaks which represent tracks limits.

    For example, a stream can be defined from an external audio stream the following way:

                                                                     
    s = input.http("http://server.org:8000/stream")
    

    Later, if the user wants to apply a volume change to this stream, he uses the amplify() operator:

                                                                                              
    s = amplify(2.0, s)
    

    This code redefines the source s. The new source now has an amplification process applied to it, which will take the data from the original source, apply the amplification to it and pass it to the new source.

    Eventually, the stream is passed to an output, which can be either a local output, to the sound card, a JACK server, a file, etc.., or an output to a distant server such as an Icecast server:

    output.icecast.vorbis(host="server.org",mount="my_radio", s)
    

    A functional language[edit]

    The Liquidsoap language is a functional language. Hence, functions can be used as variables. In particular, since streams are infinite objects, the only way to apply an operation on every element of the stream is to define a generic function that is applied to each element once it is generated.

    For instance, you can define an operation on each metadata carried by the stream:

    # A function to apply to each metadata
    def f(m) =
      (.. Some operations on m ..)
    end
    
    # Redefine s and apply f
    # to every metadata
    s = on_metadata(f, s)
    

    Dynamic[edit]

    A graph generated by a script

    When executing a script, Liquidsoap parses each operators and definitions. From these objects, it generates an oriented graph of operators whose roots are the sources and leaves the outputs.

    This graph is executed on the reverse order: for each output, Liquidsoap asks for a complete frame of data. Then the output propagates this to the nodes below it, up to the roots of the graph where the source fills the frame.

    During this execution, the same frame object is passed to each operators in the graph, allowing a minimal number of copies of the audio and video data, which is important to maintain a correct efficiency.

    External links[edit]


    This article "Liquidsoap" is from Wikipedia. The list of its authors can be seen in its historical. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.