[audio] configuration to stream to Icecast/Azuracast

Hello,
I’m attempting to create a direct stream on Mopidy to load on another networked host that is running Icecast/Azuracast.

My [audio] block is as follows:

[audio]
mixer = software
mixer_volume =
output = lamemp3enc ! shout2send mount=mopidy ip=0.0.0.0 port=8000 password=hackme
buffer_time =

I see in the logs that the service starts without issue:

kz@crates:~$ sudo journalctl -ru mopidy
-- Logs begin at Mon 2020-08-24 22:17:10 UTC, end at Tue 2020-08-25 18:37:15 UTC. --
Aug 25 18:37:10 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.commands Starting GLib mainloop
Aug 25 18:37:10 crates.fm mopidy[1155]: INFO     [MainThread] mopidy_mpd.actor MPD server running at [::ffff:127.0.0.1]:6600
Aug 25 18:37:10 crates.fm mopidy[1155]: INFO     [HttpFrontend-8] mopidy.http.actor HTTP server running at [::ffff:0.0.0.0]:6680
Aug 25 18:37:10 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.commands Starting Mopidy frontends: HttpFrontend, MpdFrontend
Aug 25 18:37:10 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.commands Starting Mopidy core
Aug 25 18:37:10 crates.fm mopidy[1155]: INFO     [SoundCloudBackend-5] mopidy_soundcloud.actor Logged in to SoundCloud as 'cratesfm'
Aug 25 18:37:10 crates.fm mopidy[1155]: INFO     [Audio-2] mopidy.audio.actor Audio output set to "lamemp3enc ! shout2send mount=mopidy ip=0.0.0.0 port=8000 password=hackme"
Aug 25 18:37:10 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.commands Starting Mopidy backends: M3UBackend, StreamBackend, SoundCloudBackend
Aug 25 18:37:10 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.commands Starting Mopidy audio
Aug 25 18:37:10 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer
Aug 25 18:37:10 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.__main__ Disabled extensions: file
Aug 25 18:37:10 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.__main__ Enabled extensions: stream, soundcloud, http, mpd, moped, softwaremixer, m3u
Aug 25 18:37:09 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.config Loading config from command line options
Aug 25 18:37:09 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
Aug 25 18:37:09 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
Aug 25 18:37:09 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.config Loading config from builtin defaults
Aug 25 18:37:09 crates.fm mopidy[1155]: INFO     [MainThread] mopidy.__main__ Starting Mopidy 3.0.1
Aug 25 18:37:09 crates.fm systemd[1]: Started Mopidy music server.
Aug 25 18:37:09 crates.fm systemd[1]: Starting Mopidy music server...

But I do not see a listener in netstat when running netstat -tulpn | grep 8000.

Ultimately my goal here is to create a direct stream listener for whatever is being played by Mopidy that I can then use as a playlist in Azurecast. I understand that this is out of scope for this Discourse though any advice would be greatly appreciated.

I don’t use icecast myself but the shout2send element “sends the resulting stream to an Icecast server” and the connection details of that server are described using the ip and port parameters you set in your Mopidy config. So you need to have installed and configured icecast first. Then you should see something listening, I think…!

I think I understand, the listener is the Icecast server, which i have set up on another host. The shout2send needs to be configured with the remote host’s info and configured as a mount point.

Thanks for the fast response!

Depends what you mean by “listener” there. You need an icecast server running somewhere. I could be on the same machine or it could be elsewhere. That icecast server will accept connections from an audio source (Mopidy via shout2send) and then also from 1 or more clients who want to listen to that audio. It’s kind of more like a relay. Hope that is clear.

Yea I meant listener as in the service listening, Icecast is “listening” for the stream on port 800x and the shout2send command is authenticating/sending to $icecast:$port.

1 Like

Yeh. And the mount is kind of like a path. I don’t remember if you need to setup the mount as part of the icecast config or if that part is dynamic. But hopefully their config file has some clues.