It may be possible to send more than one concurrent RTP stream via your local network by assigning a different Multicast IP to each of them with:
# stream 1
pactl load-module module-null-sink sink_name=rtp1 format=s16be channels=1 rate=44100 sink_properties="device.description='rtp1'"
pactl load-module module module-rtp-send source=rtp1.monitor loop=0 destination=188.8.131.52
# stream 2
pactl load-module module-null-sink sink_name=rtp2 format=s16be channels=1 rate=44100 sink_properties="device.description='rtp2'"
pactl load-module module module-rtp-send source=rtp2.monitor loop=0 destination=184.108.40.206
and then listen on the receiver to the corresponding IP with
pactl load-module module-rtp-recv sap_address=220.127.116.11 # resp. 18.104.22.168
However I was unable to test if this really works how I think it should.
In addition, this method has several disadvantages:
- for each RTP sending stream we need to define it's own (exclusive) sink.
- sending multiple uncompressed audio streams via our network will inevitably lead to congestion, as these streams will take a lot of bandwith.
- we need a script solution to be able to select a "channel" from the streams on the receiver side.
- generating multiple simultaneous RTP streams will need quite some CPU power on the server, so this is possibly risky.
A much better alternative that I would like to suggest here is to set up an Icecast Server on your Ubuntu server. It is no so hard to do:
With this solution you will be able to
- stream compressed audio data (e.g. ogg or mp3) in your network
- send multiple audio channels (i.e. "radio stations") simultaneously
- switch easily between these streams from the receiver (which could then also be an Internet Radio receiver, or a smartphone) just from the name of the stream
- Ices2 resp. Ices help you to stream playlists, Darkice to stream data of your sound card.