People give PulseAudio a lot of flak but it turns out you can route arbitrary audio into arbitrary applications without needing a fancy JACK setup, just any regular PulseAudio system. This can be useful for blasting whatever the heck you want into conference calls, for example.
First, create a null sink with some name:
export SINK_NAME=blahaj
pacmd load-module module-null-sink sink_name=$SINK_NAME
Next, start up your application recording from the monitor of the sink which gets automatically created ("Monitor of Null Output"). You can also switch it using pavucontrol: once the application starts recording open the pavucontrol recording tab and change the input source.
Now you can play audio into the sink and it will get picked up by the recording application, for example with ffmpeg:
export STREAM_NAME="pick any name"
ffmpeg -re -i my_audio.flac -f pulse -device "$SINK_NAME" "$STREAM_NAME"
Comments
No comments yet. Be the first to react!