Jeff Garvas
2017-03-20 19:23:39 UTC
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. 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)
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?
Thanks,
Jeff
stream silence, and inject very short audio files sourced from a police
scanner. 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)
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?
Thanks,
Jeff