Recommendations for software for network audio streaming

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
nicholasjackson
Messages
2
Reaction score
0
TL;DR
Looking for open-source, actively maintained audio streaming tools that support RTP. Need to mix/duck mic input over ongoing file streams for a real-time voice-over feature. Currently using FFmpeg but need more control.
Hi everyone,
I'm looking for recommendations for audio streaming software over a network. I'm currently working on a WPF Application that requires open-source tools that are actively maintained and preferably offer enterprise support due to security concerns.

At the moment, I'm using FFmpeg, but I find it limiting in terms of controlling the audio streaming process. I'm trying to implement a feature that allows concurrent streaming of both microphone input and audio files. Both streams use RTP to transmit raw mono audio.

The specific use case looks like this:

The user begins streaming an audio file (which may be looped or played once).

While the file is streaming, the user speaks into the microphone.

Ideally, the system should lower (duck) the audio file's volume to make the mic audio more prominent. If that's not feasible, the fallback would be pausing the audio file stream to let the mic stream play uninterrupted, then resuming the file afterward.

If anyone has worked on something similar or knows of technologies that could help achieve this, I'd really appreciate your insights. Thanks in advance!
 
Physics news on Phys.org
Well I am closing this thread as I have managed to find a solution with ffmpeg. Posting the command here:```
ffmpeg -f dshow -i audio="yourMicrophone" -stream_loop -1 -i yourAudio.mp3 ^
-filter_complex "
[1:a]volume=0.25[mp3quiet];
[mp3quiet][0:a]sidechaincompress=threshold=0.03:ratio=20:attack=3:release=400:mix=1[ducked];
[ducked][0:a]amix=inputs=2:duration=first:dropout_transition=2[aout]
" ^
-map "[aout]" -ac 1 -ar 44100 -acodec pcm_s16be -f rtp rtp://127.0.0.1:5004```
 
My immediate reflex, without thinking or digging too much, was PULSAR. I have problems determining if it's genuinely open source, but since it's the go-to on Linux installations I would (like to) think so without being able to make any guarantees.

https://pulsar.apache.org/

Stumbled over this searching just a thin layer deeper:

https://github.com/irtlab/rtptools

https://trac.ffmpeg.org/wiki/Capture/PulseAudio

Sorry, if I'm just making a lot of noise but getting Ardour6 up and running I seem to remember there was no way without Pulsar.

EDIT: Oh, just ignore me then. Don't know why I couldn't see those post only after I made my own post.