MPD 0.21.16 for Volumio (arm, armv7 and x86)

Hi everyone,

UPDATE 28 Dec 2019: added package for ARM architecture (Raspberry Pis)

Here’s an EXPERIMENTAL build of MPD v0.21.16 for Volumio. It’s not official and I’m sure it will not be supported by the Volumio team in anyway. So use at your own risk and don’t hold me responsible if it breaks your existing Volumio :wink: If you want to test it, I suggest you do it on a separate Volumio installation or at least back up your data first. It’s not as scary as it sounds, but you never know…

I did it partly because I could use the YouTube plugin without having the 2/3 playback cutoff problem (there’s actually a lighter approach which I will try when I have time), but also because I wanted to :laughing: .

I have made three builds for the architectures supported by Volumio. Download the one appropriate for your device and follow the instructions below to activate it:

  • For Raspberry Pis, download the one for the arm architecture - Note that I have not tested this myself apart from seeing if it executes on a rPi
  • For x86 (Intel / AMD PCs): download the x86 version
  • For other ARM devices: download the armv7 version

Your device should have at least 1GB RAM. This is because the MPD build loads its own system libraries instead of those provided by the OS, so memory consumption would be higher than using Volumio’s MPD. To my understanding, Volumio kind of strains under 512MB, so I am not sure if these low-memory devices can afford an extra memory cost. You can still test, of course…

Note that I have not tested playing files on network shares (NFS and Samba) - so if any of you could test this aspect that would be great. **UPDATE: tested Samba for the x86 version (works ok)

Without further ado, here are the files to download:

x86: mpd-0.21.16.x86-20191227-3se7n.tar.gz

armv7: mpd-0.21.16.armv7-20191227-ogvma.tar.gz

arm (Raspberry Pi): mpd-0.21.16.arm-20191228-3v3jy.tar.gz

Here are the instructions to activate it, after you have copied the file to your Volumio device (I assume you copied it to /home/volumio). The instructions are the same for either architecture.

SSH into Volumio, then:

$ cd /
$ sudo tar xzf /home/volumio/<name of downloaded file>

This will unpack the files to /opt/mpd-0.21.16_20191227 . Depending on the speed of your device, this could take some time, so please be patient.

We should test if the new mpd is executable, just to make sure it is at least compatible with your system’s architecture:

$ cd /opt/mpd-0.21.16_20191227/bin
$ ./mpd --version

Note the ‘./’ before ‘mpd’; do not leave it out!

If mpd is executable, you should see something like this:

Music Player Daemon 0.21.16 (0.21.16)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2018 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy upnp
...
...

If you see an error here, you should not proceed further!

Finally, activate our mpd. Inside the same directory:

$ sudo ./systemd-switch-mpd.sh

That’s it! To confirm that the new MPD is loaded, do this:

$ sudo systemctl status mpd

You should see something like this:

Active: active (running) since ....
...
           └─... /opt/mpd-0.21.16_20191227/bin/mpd --no-daemon

Now you can try playing some files with Volumio.

Have fun, and if possible share your results here (your device + whether it works or any errors encountered).

If you are interested in seeing how I made the build, check out my github here:
https://github.com/patrickkfkan/volumio-build-mpd

If you are a script expert, be easy on me. This is my first bash script that’s over 10 lines long :laughing:

  • Patrick
2 Likes

Tested on Rasberry Pi 4, work like charm!!!
Thank you Patrick!

That’s good to know. You’re welcome :smiley:
Let me know if you spot any unusual behavior or errors.

First of all thanks for putting that much effort in it, however:

Raspberry Pi 3 Model B, volumio 2.673
=> Doesn’t work, unfortunately. Or I’m too stupid.

throws a “no such file” error.

(It’s also a bit disturbing that a 20191228 file unpacks to a 20191227 folder but that’s the smallest of the problems :laughing: )

don’t worry too much. If you do not have any issues with the current version, then why update?
Patrick’s version does work, we also introduce it when we move the Debian buster (work is already in progress for x86)

Hi Daraia,

After entering the mpd directory, do you see two files when you enter ‘ls’? I.e.:

cd /opt/mpd-0.21.16_20191227/bin
ls

# You should see the following two files
mpd  
systemd-switch-mpd.sh

Yes, the archive actually extracts to a 20191227 folder. I deliberately set the prefix to ‘20191227’ so you can copy and paste the commands in my instructions :laughing: .

-Patrick

Hi gkkpch,

To each his own~ That’s the great thing about FOSS.

I made the build in a way that won’t overwrite existing files, so there’s no harm in trying it out if certain things are not working well with the bundled MPD (such as YouTube streams getting cut off near the end as in my case).

I’m aware Buster will come with the latest MPD, so my build will probably be just an interim thing. I’m actually more of a “if it ain’t broke, don’t fix it” type of person, but I still had to do this because I listen to YouTube stuff all the time and it’s annoying to have streams getting cut off suddenly :frowning: . And because I’ve done it I might as well share it here in case someone finds it useful one way or the other :wink: . It’s a great learning process for me anyway!

Anyhow, have a great New Year!

Best regards,
Patrick

yes, I see them. Even though the “./” command throws the error, when I skip the “./” and go only with mpd --version, it shows your output. Despite told otherwise I tried to install but -of course?- it didn’t work.

And -sadly- I have the 2/3 issue, too, which is really annoying. Otherwise I wouldn’t bother myself with that nerd-stuff. I’m a lazy person. :laughing:

Give me a moment to think about this… If you can see the files inside the directory but cannot execute them, then it is quite possible the binary is not compatible with the underlying system. But that would be odd because if it worked for rPi 4 then it should also work for rPi 3 (the underlying OS is the same). And since you mentioned the archive “…20191228” unpacks to “…20191227” directory then you must have downloaded the correct ‘arm’ version. :confused:

I’ll see if I can get my hands on a Pi 3B these two days (that’s the model you have, right? Not the 3B+), so I can test it myself.

Btw, if you run mpd inside the /opt/mpd-0.21.16_20191227/bin directory without the leading ‘./’, you are actually running Volumio’s MPD . You can verify this by looking at the output - the version number shown is 0.20.xx and not 0.21.16 :wink:

Also btw, don’t mind me asking, you didn’t happen to move the files inside the package around, renaming the directory or unpack it to a different location? The absolute path to the build must be /opt/mpd-0.21.16_20191227 , otherwise it won’t work :sunglasses:

Oh, happy New Year to you too! :laughing: :laughing:

Best regards,
Patrick

Me lazy person just copying out of my amazon order:
Raspberry Pi 3 Model B ARM-Cortex-A53 4x 1,2GHz, 1GB RAM, WLAN, Bluetooth, LAN, 4x USB

And yes, this is clearly an “I’m stupid” thing. After your hint with the moving around first I felt offended since I DID NOT move files around but then I realized I copied it initially in a wrong folder. It now installed itself and music’s playing. So at least it didn’t get worse. I’m going to test the 2/3 issue and if that’s solved, you’re my personal hero of 2019 AND 2020! :mrgreen:

Happy New Year!

Edit: First Song played till the end. Party saved!

I’m glad that it worked out in the end :slight_smile:

Let me know if you run into any issues ~

Me getting ready for countdown in 20 minutes :laughing:

No problem Patrick, appreciate the work. Do continue…

Hello patrickkfkan
I installed the MPD as you described. Songs from youtube are now played correctly.
But now I have a problem with the database: new albums are no longer added to the database correctly. You can only see the cover without content.
Can this come from installing the MPD player?

It is possible :frowning: Would a rescan (under Sources) solve the problem?

Unfortunately, a rescan does not work and the entire database is no longer filled.
Can you fix this?

What are your music sources, e.g. CIFS, internal, USB…? And what files are they, e.g. MP3, FLACs…?

Also, what version of Volumio are you on?

I might need to do some testing on my side but my schedule is kind of busy at the moment but I’ll try to deal with this when time allows.

My server where the files are located is integrated via nfs.
Most of them are Flac and mp3 files

VERSION: 2.699

it worked the fix for youtube but now i can not control the volume from the interface…i m the only one? can we fix this?
thanks for your effort!

update : i dont know what i did but i fixed it. i restarted the audio device and now its fine.

Hi everyone, especially patrickkfkan,

thanks for Volumio, which is the best HIFI system for rPi I know. Thanks for the MPD and the Youtube mod. Youtube now plays like a charm.
Previously I had the well known youtube plugin problem that the songs stop at about 80%. It persisted over all recent Volumio and plugin versions for about the last 10 months.

But now, I have the very same problem with the new MPD like dippes: the music library was empty and a rescan/actualisation just manages to get a small amount of it back, restart does not fix it. Additionally I observe that internet radio stops after few minutes at least for the first start, reproducibly. The latter is quite strange to me.

My system is Volumio 2.699 on raspberry Pi 3B+, Hifiberry DAC+ and inserted is a (FAT32, I guess) USB stick with the MP3, OGG, FLAC, M4a, and AAC files, mostly AAC and Mp3 compressed.

It would be nice when a conclusive Volumio version could fix the youtube stuff, since the problem is known for quite a long time. But I really appreciate patrikkfkan’s effort, too.

Best

1 Like

mpd 0.21.16 works like charm on my Raspberry PI 3B+ now. Many thanks! That youtube 2/3 cutoff was an annoying problem. What could be the reason for that?