1

Okay, so I'm the lone IT staff in a radio station and I've got a headscratcher (for me). We had a pair of PCs streaming our audio (received back from over-the-air, output through a monitor into the mic jack) to a commercial streaming service, one for each of two stations. Naturally this was far less than optimal for a lot of reasons (least of which was they were running XP).

Anyway, I figured out how to consolidate these all into a single machine using ffmpeg to sample the audio inputs and output to the icecast server. So far so good. Everything has been humming along for about the past year. One problem: we have to do a lot of blackouts on sports, and when we do this, the stream is simply made not available (at the user's end, we basically have the service disable our ability to connect during blackouts). So the users get the equivalent of dead air. Not only that, but it requires us to handle the blackouts through their interface and we can't really do them locally (my preference).

So my general manager asks me to fix this. Since simply getting new equipment is out of the question, it falls to me to figure out a software solution.

The current setup just uses ffmpeg to sample the audio line and outputs to an icecast server.

What I want to do is to split this setup into an ffmpeg instance that samples the audio line and potentially does some processing on it, which feeds into an ffmpeg process that simply stays connected to the icecast server and sends whatever it receives (and if it isn't receiving anything, it just sends silence to the icecast server).

The source/sample process should be killable without killing the extreaming ffmpeg process, and a new ffmpeg source (for instance, sending audio from a pre-recorded file local to the machine) can be dropped in and start providing audio.

Probably what I want would be equivalent to an audio server. This is running on a bog standard minimal Linux Mint 19 set up for unattended operation.

Roughly:

[Audio Line] ----/---- [Extreamer ffmpeg] ---- [Streaming Service]
[Audio File] ---/
[Nothing]    --/

I am not especially familiar with things like Jack and Pulseaudio, but I'm not against using them.

What I need is mostly equivalent to having two or three audio sources connected through a switcher to a barix extreamer. But I need it in software.

I have tried the -stream-loop option to ffmpeg, but I'm not sure I'm using it right. I've also tried encoding using the source, putting it into a FIFO, and then reading the FIFO with the extreamer process. This didn't work as well as I had hoped. I recall the process transmitted the output from the first process fine, but when that ended the extreamer process thought it was done and terminated, rather than staying connected and waiting for more data.

March Hare
  • 11
  • 2

0 Answers0