Hi,

2017-03-20 14:23 GMT-05:00 Jeff Garvas <[email protected]>:
>
> I'm using liquidsoap for an unconventional use case where I predominantly
> stream silence, and inject very short audio files sourced from a police
> scanner.

Well, that certainly is an interesting usage!

> The way I've come up with doing this (thanks to some help from
> others here) is as follows below.   This is working very very well.
>
>
> # This creates a 1 second silence period
> silence = blank(duration=1.)
>
> #
> myqueue = request.queue()
> myqueue = server.insert_metadata(id="S4",myqueue)
>
> # If there is anything in the queue, play it.  If not, play the silence
> defined above repeatedly:
> stream = fallback(track_sensitive=false, [myqueue, silence])
>
>
> Here is the challenge I have -- I want to be able to include a
StreamTitle=
> in the streaming payload immediately prior to adding a new track to the
> queue.   I ran a packet capture on windows based application that supports
> alpha tagging and in the payload itself of the mp3 stream there is a
> StreamTitle= immediately prior to the begining of a new mp3 audio source
> (when transitioning from silence)

By StreamTitle, I assume that you mean to set the track's metadata, like
artist or title as they are later sent via output.icecast etc.

Have you tried the annotate: protocol? You can wrap your request into a
annotate: uri, allowing you to pass extra metadata.

For instance, instead of:
  <source>.push http://.. (or /path/to/file etc.)
You can do:
  <source>.push annotate:title="My Custom Title",artist="My custom
artist":http://..

And the annotated metadata will be added, possibly overriding any metadata
with the same field name in your original request.

> This creates two questions in my mind.    First, what format of metadata
is
> this approach?  I do not want to have to send http requests to the icecast
> server for each change because they're happening too frequently.  (the
> tracks are sometimes very brief).    How can I rewrite a field out of a
.mp3
> file into SongTitle= to do this cleanly?   Or do I have to manually do it
> via the socket I'm using to add tracks to the queue?
>
> My second question is, if you've set the StreamTitle to something and your
> queue runs out and you go back to the silence loop above will the previous
> track title remain?  If it remains is there a clean way to change that
title
> once, not every second you're waiting for an item to get queued?

By default, fallback() and switch() replay the last metadata from a child
source when switching back to it.

By the way, do you need a finite silence in your script? It feel like, with
track_sensitive=false, your fallback would switch to the request source
immediately when it becomes available..

Hope this helps,
Romain
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to