A
A
Anatoly Evladov2017-01-19 22:46:04
Computer networks
Anatoly Evladov, 2017-01-19 22:46:04

How to broadcast a common audio stream by combining two streams into one?

There are two audio streams:
1) Radio, let's say https://www.radiorivendell.com , although it doesn't really matter, we have a stream
2) A list of audio files, each of which lies on a remote server and is available via a link.
It is necessary if the second second list is empty (we can check this) - broadcast the first audio stream, and if an entry was added to the second list - you need to switch to broadcasting this file. And go again to broadcast the first audio stream as soon as the audio files from the second list are over.
In general, it seems to be nothing complicated, but I don’t understand how to implement the actual change of active streams .... maybe you can somehow, for example, mix them all the time, but at some point, turn the volume down to 0 alone or something?
In general, the mechanism of how this can be done is of interest (mixing two threads with the priority of the second), and how can this be done? While looking at nginx rtmp. But I’m looking, I haven’t even touched it with my hands yet, I don’t know how suitable for this task ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2017-01-20
@leahch

MPD https://www.musicpd.org to help you. You will write a client-switcher in two days yourself in python, for example. At the same time, there will be only one output stream, even for a showcast, even for a multicast, there are a lot of plugins for this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question