Warning This project is no longer maintained. If you intend to let people listen in to a Jamulus server from a website, consider using jamulus-lounge instead.
Simple script to stream sound from Jamulus to an Icecast server. Also shows listener count in Jamulus.
Everything runs on the same machine (accessible from localhost
).
- Jamulus server running on default port
- Icecast server running on port 8000
- JACK
- Jamulus client compiled from source with this patch applied with executable located at
../jamulus/Jamulus
- Ruby 2.5 or later
- ffmpeg
<client>
<language>en</language>
<name_base64>bGlzdGVuICAgIFsyXQ==</name_base64>
<instrument>0</instrument>
<country>0</country>
<autojitbuf>0</autojitbuf>
<jitbuf>20</jitbuf>
<jitbufserver>20</jitbufserver>
<audiochannels>2</audiochannels>
<audioquality>2</audioquality>
</client>
You need 3 terminal tabs (e.g. in tmux)
-
Start a JACK server:
jackd --no-realtime -d dummy
-
Stream to Icecast:
echo "icecast://source:<password>@<ip>:<port>/<mountpoint>" > icecast_endpoint ffmpeg -f jack -ac 2 -i icecaster -acodec libmp3lame -ab 128k -f mp3 $(cat icecast_endpoint)
-
Run the script periodically:
while true; do ruby check.rb; sleep 10; done
- Streaming will start when there is an active listener AND participant in Jamulus server.
- Streaming will end when there everyone left the Jamulus server.