[HN Gopher] Liquidsoap - A scripting language for multimedia str...
       ___________________________________________________________________
        
       Liquidsoap - A scripting language for multimedia streaming
        
       Author : selvan
       Score  : 103 points
       Date   : 2021-08-22 08:27 UTC (2 days ago)
        
 (HTM) web link (www.liquidsoap.info)
 (TXT) w3m dump (www.liquidsoap.info)
        
       | benbro wrote:
       | Is there something similar for offline mixing and transcoding as
       | fast as possible instead of live?
        
         | twothumbsup wrote:
         | For video theres VapourSynth[0], not sure of an equivalent for
         | audio outside of just scripting ffmpeg but that's probably not
         | as flexible as what you're after.
         | 
         | [0] http://www.vapoursynth.com/
        
           | benbro wrote:
           | Thanks
        
       | trutannus wrote:
       | Why are the 'examples' on a programming language website text
       | explanations, rather than code examples? This project could
       | benefit from following the writers' rule of thumb: "show, don't
       | tell".
       | 
       | On the first page they have only two lines of pretty trivial code
       | which makes it hard to tell if I want to spend more time looking
       | into this project. To make matters worse, the first place I'm
       | exposed to actual code is on the second page of their
       | documentation. Until then, it's all wall-o-text style pages.
        
         | abathur wrote:
         | I found documentation > cookbook
         | (https://www.liquidsoap.info/doc-1.4.4/cookbook.html) a better
         | place to scratch this itch :)
        
           | trutannus wrote:
           | This should be on the first page! Exactly what would get me
           | into the project.
        
       | JohnBerea wrote:
       | Why is this a new programming language, instead of just a library
       | for existing languages?
        
         | pavlov wrote:
         | Maybe people who want to program radio shows mostly don't know
         | a general-purpose programming language, and making them learn
         | one would be overkill?
        
           | robmccoll wrote:
           | I would argue that the learning curve for learning a
           | programming language and a well-written purpose-built library
           | versus a domain specific language is virtually the same. If
           | the target is someone that has zero experience programming,
           | their process will likely involve a lot of cookbook copy-
           | paste at first, then tweaking the recipes, and then once they
           | have some confidence of how the steps fit together and some
           | inferences about the causal model behind it, they may start
           | to piece together their own recipes.
           | 
           | A lot of complex domain specific libraries are practically
           | languages all their own even though they are just sets of
           | APIs inside a general purpose language (think OpenGL, CV
           | libraries, ML and scientific Python libs, etc.). Knowing
           | Python doesn't put you at too much of an advantage over
           | someone who doesn't when it comes to applying PyTorch. The
           | advantage of a library is that the learner can eventually
           | expand beyond its capabilities and compound some of their
           | investment and capability versus a DSL that puts you at the
           | mercy of what the author is willing to add / implement.
           | 
           | DSLs seem to come from a mindset that someone won't have to
           | learn much in order to be dangerous, which is almost never
           | the case. The bigger leap seems to be between things like:
           | 
           | - GUIs that are fully guided / wizard type setups
           | 
           | - GUIs that are somewhat drag and drop (can have similar
           | challenges to free-form text, but at least you know what
           | tools are available to you)
           | 
           | - Text that is guided (e.g. a configuration file that is
           | completely filled in, but has a lot of comments and can be
           | tweaked
           | 
           | - Free-form text wherein you are starting from a blank canvas
           | and need to have some ideas in your head about what is
           | possible and what tools you have at your disposal
           | (programming)
        
         | UncleOxidant wrote:
         | I notice it's written in OCaml, so maybe you can use it as a
         | library from OCaml?
        
       | UncleOxidant wrote:
       | Oh, nice, it's written in OCaml.
        
       | theon144 wrote:
       | Liquidsoap is great! It's hugely flexible, I can hardly imagine a
       | broadcast-like use-case that wouldn't be covered by it.
       | 
       | Strange timing though; according to the liquidsoap slack channel,
       | the "hopefully last beta" of 2.0.0 was released just two weeks
       | ago, and it has some great improvements, like "first-class
       | support of video" (which is huge, it's not just video
       | multiplexing or these 24/7 YouTube streams, but some advanced
       | real-time stuff[1] was already possible), and "Enhanced language
       | features making the script language a fully-featured language"
       | which sort of was a headache in my experience - it was in this
       | "Greenspun's moratorium"[2] where you could do a lot of things,
       | but some of it was really awkward, and there were walls in
       | unexpected places.
       | 
       | So, when I saw this post, I thought 2.0.0 was out, but it seems
       | it's right around the corner still? Anyway, I'm really looking
       | forward to it, and I recommend anyone interested to follow the
       | project!
       | 
       | [1]: https://www.liquidsoap.info/doc-1.4.4/video.html#detailed-
       | ex... [2]: https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule
        
       | ivoras wrote:
       | LiquidSoap is great - literally once you get a hang of it, it's
       | very powerful at what it does - scripting a possibly dynamic and
       | interactive program list for a digital radio for example.
       | 
       | But its documentation is difficult to parse, examples are too
       | advanced and the learning curve steeper than it should be.
       | 
       | It took me a week to have something going, even if it was "take
       | this bunch of MP3s and randomise them with jingles here and
       | there", nothing more complex than that.
        
       | 52-6F-62 wrote:
       | I'm working on an [ _very_ basic] audio streaming project.
       | 
       | Still looking at the examples and docs and cases, but this might
       | be just what I need to fill some gaps--at least in future
       | iterations. Particularly a simple encoder/transcoder interface.
       | 
       | Are there any live examples viewable/listenable?
        
         | twodai wrote:
         | https://github.com/LibreTime/libretime
         | 
         | Check out this project called libretime, in the past they used
         | liquid soap for their playback. Basically it's an online Foss
         | radio streaming platform mainly used for radiostations to add
         | in automation for their coverage
        
           | 52-6F-62 wrote:
           | Thanks. I'm always keeping my eyes open for projects in the
           | larger space.
           | 
           | LibreTime looks to be a lot larger than the domain I'm
           | working to serve but it looks great and also looks like a
           | good place to take notes on open sourcing an audio project.
        
         | flimble wrote:
         | https://github.com/UniversityRadioYork/jukebox is a pretty good
         | example of lots of its capabilities glued together. It's also
         | my go to tool for gluing live audio things together
        
           | 52-6F-62 wrote:
           | Excellent! Thank you
        
       ___________________________________________________________________
       (page generated 2021-08-24 23:02 UTC)