Mopidy and Pulseaudio

I have a Pi 4 with the latest Raspi OS image installed. I foolw the documentation for installing mopidy and use it with Pulse audio but I cannot hear any sound.

My mopidy.conf file:

[http]
hostname = 0.0.0.0

[local]
media_dir = /home/pi/Music

[audio]
output = pulsesink server=127.0.0.1

My /etc/pulse/default.pa file

#load-module module-esound-protocol-tcp
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
#load-module module-zeroconf-publish

On Iris interface I got no outputs. Why?
Thanks in advance for your replies.

Raspbian lite or desktop? The former doesn’t use pulseaudio. the latter does, but I think might require you to login first, possibly even graphically (rather than via ssh). Pulseaudio isn’t ideal for a headless setup.

I’m using Raspbian desktop with autologin to graphical desktop; I try to stop and restart mopidy after I logged in (I used paplay to hear alsa base wave files and it works) but with no success. Why?
I follow the instructions (Running as a service — Mopidy 3.1.1-1-gf17acacf documentation) but with no results…

Thanks for the extra detail. Can you share any errors in your log?

mar 30 12:43:04 raspberrypi systemd[1]: Starting Mopidy music server...
mar 30 12:43:04 raspberrypi systemd[1]: Started Mopidy music server.
mar 30 12:43:06 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.__main__ Starting Mopidy 3.1.1
mar 30 12:43:06 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.config Loading config from builtin defaults
mar 30 12:43:06 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy-local.conf
mar 30 12:43:06 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
mar 30 12:43:06 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
mar 30 12:43:06 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.config Loading config from command line options
mar 30 12:43:07 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.__main__ Enabled extensions: file, m3u, iris, local, stream, softwaremixer, http
mar 30 12:43:07 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.__main__ Disabled extensions: none
mar 30 12:43:07 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer
mar 30 12:43:07 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.commands Starting Mopidy audio
mar 30 12:43:07 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.commands Starting Mopidy backends: FileBackend, M3UBackend, StreamBackend, LocalBackend
mar 30 12:43:07 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.commands Starting Mopidy core
mar 30 12:43:07 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.commands Starting Mopidy frontends: IrisFrontend, HttpFrontend
mar 30 12:43:07 raspberrypi mopidy[836]: INFO     [IrisFrontend-8] mopidy_iris.core Starting Iris 3.57.3
mar 30 12:43:07 raspberrypi mopidy[836]: INFO     [Audio-2] mopidy.audio.actor Audio output set to "pulsesink server=127.0.0.1"
mar 30 12:43:07 raspberrypi mopidy[836]: INFO     [HttpFrontend-10] mopidy.http.actor HTTP server running at [::ffff:0.0.0.0]:6680
mar 30 12:43:07 raspberrypi mopidy[836]: INFO     [MainThread] mopidy.commands Starting GLib mainloop

This is my mopidy log. As you can see there are no errors. I think the December 2020 Raspi OS update (definitely moved to Pulse Audio) could cause some issue.

Does that log include you trying to actually play something? That is the point where it would open the audio device and possibly produce an error.

Yes, the desktop image does now use Pulseaudio. Last time I checked (using that December release) that was not the case for the lite image, despite what the release notes implied. They currently seem to have different audio setups in each image. I assume they intend to resolve this but they are not very good at sharing their plans for breaking changes.

If I click on a mp3 file in Iris it starts playing but I cant’hear any sound and the log file remains the same I posted before.

And what audio output are you using on your Raspberry Pi? The 3.5mm jack? The HDMI (with speakers in your screen)? Or some kind of audio HAT? How is that configured?

I tried both of them but without success. :cry: :cry: :cry:

I solved it! :muscle: :muscle: :muscle: :muscle: :muscle: I simply added user mopidy to audio group. Iris still says “no outputs” but i can hear the sound and manage it with Pulse tools. Thanks anyway… :wink: :wink: :wink: :wink:

The Mopidy debian package adds the mopidy user to the audio group as part of installation. When using the desktop Raspbian image and HDMI sound you need to add the mopidy user to the video group (as per the installation documentation). I’m still guessing here since my previous questions didn’t get a clear answer but nevermind, glad you got it working!

Sorry, there was a miserunderstanding for the previous question. I answered:

I tried both of them but without success. :cry: :cry: :cry:

I used both jack and HDMI output. And in my /etc/group file this was the audio group row (after mopidy package installation)
audio:x:29:pi,pulse
Thanks again

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.