O!MPD on Raspberry Pi

O!MPD on Raspberry Pi

Due to lack of time, this is no longer developed.

You can use DietPi (https://dietpi.com) – O!MPD is now part of dietpi-software, so you can install and configure it with a few simple moves.

More info can be found here: https://dietpi.com/phpbb/viewtopic.php?p=5171#p5171

If you own Raspberry Pi ver. 2, you could try O!MPD by installing system image prepared by me. This image probably will also work on RPi ver. 3, but I haven’t tried this. That way you can have one universal and powerful Media Centre for all of your multimedia and internet streams. System consists of:

  • XBian 1.0 (knockout, kernel: Linux 4.9.28+)
  • Kodi 17.1 (Git:2017-03-21-1187263)
  • MPD 0.19.1
  • O!MPD 1.03
  • all necessary programs (mysql, php, apache)

Basicly it is XBian with installed and configured MPD, servers (database, www) and O!MPD. All is ready to use. Just write image (here is how) to SD card (4GB minimum) and start your Raspberry Pi from it. Then connect your music library. You can use:

  • USB drives – just connect them to USB ports and XBian automatically mount them
  • network share – mount it on /var/lib/mpd/music/nas (to do it at boot time just edit file /etc/rc.local)

Next open page http://<your-Raspberry-Pi-IP-address>/ompd , log in as admin (pass: admin) and update library – first update will take long time (about 1,5h for ~1400 albums).

If you want to use Kodi – connect TV/monitor. More about Kodi you can find on its web page. You can also find some interesting informations about Kodi at www.cloudwards.net.

Audio outputs

By default audio is directed to HDMI output if appropriate device is detected. If not, audio is directed to analog output.

If you want to use external USB DAC, you have to edit file /etc/mpd.conf. Find section audio_output for ALSA (line number ~211) and edit parameter device. Value of this parameter should correspond to number of your sound card/USB DAC seen by XBian. You can see all of your audio devices by command:
aplay -l
In my case the result is:

root@xbian ~ # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: M20 [M2Tech USB Audio 2.0], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

I use M2Tech USB to SPDIF converter seen as card 1, device 0, so device looks like this:

device        "hw:1,0"

Login credentials

For ssh session use:

  • username: xbian
  • password: raspberry

or

  • username: root
  • password: raspberry

For MySQL and phpmyadmin:

  • username: root
  • password: root

For O!MPD GUI:

  • username: admin
  • password: admin

16 thoughts on “O!MPD on Raspberry Pi

  1. Dirk

    Wow thanks very much, what a program. Got it working on my Raspberry. First the original program and then your version, which is much better. It doesnt need write access to the location where the music files are stored, and reads the information from the mp3 tags.
    Playing the audio was the hardest thing for me getting started. I didnt expect that mpd also needs to index all of the audio files.
    Thanks again.

  2. human_fly

    Hi,
    I have installed the interface on my Raspberry Pi, not with the image thou as I already have some apps running on the Pi that I want to keep.
    The interface look fantastic! Been trying every system available the last couple of weeks for my headless music player. Hoping this could be the one…
    But I have a problem. When I update the library it gets stuck on 16% and all files imported have 00:00 length.
    So what can I do? Where is the log file?

    1. Artur Sierżant Post author

      Hi,
      I assume you use v1.01. If yes first go to section Debug in config.inc.php (almost at the end of this file) and change $cfg[‘debug’] to true. Also make sure that your www server has write permission to /tmp directory. Next run update – log file will be placed in /tmp/update_log.txt. When update gets stuck, look into log file: I think last line will be something like:
      Going into fileStructure for album_id: e1awxrhuoz
      Then look one line above and you will see the folder that makes troubles. Try to investigate what’s wrong with it: if you wish, share first file from this dir (or at least tags from it) and I will try to figure it out.
      Anyway – let me know if you solved problem.
      Best regards,
      Artur

      1. human_fly

        Thank you, found the corrupt folder. Library updated successfully now.
        Next question. I don’t have permissions for the mpd player. How can I solve that issue?

  3. human_fly

    Is there ant way to load album artwork from the web?
    I don’t have a jpg of every single album and I don’t want to download them all.
    Thanks!

  4. Steve

    I would love to use your software. The interface is much cleaner than other things i found on the internet. I only have the following problem and I’m not sure what i’m doing wrong.
    I placed the raspberry image on a SD card (multiple already) (dd bs=1m if=(game file) of=/dev/disk(x) )
    But the raspberry 2 fails to boot only the red led stays on after the green led briefly turned on when i connected the power supply.
    The raspberry still functions correctly (tested with raspbian)
    Would loved to know what is going on. This will be difficult because there is no output on the connected screen.
    Any advice

    1. Artur Sierżant Post author

      Hi,

      the image was made using Win32DiskImager – if you have Windows, you may try to write image using this program. If it won’t work, I can make image using linux dd and share it. Please try Win32DiskImager first and let me know.

      Regards,
      Artur

      1. Steve

        Artur,
        Thank you for your response.
        I’m afraid that i’m having the same issue with Win32DiskImager??
        The only thing i can tell extra is that the raspberry is not connected to a keyboard or mouse. I just hooked it up to the TV to see if there was any screen output.

        Maybe it’s time for me to learn Linux and do a manual installation.
        Best regards,
        Steve

          1. Artur Sierżant Post author

            I’ve just written downloaded image using Win32DiskImager (v0.9.5) and 4GB card and everything works OK – I also use RasPi2 without keyboard and mouse. So, to be honest, I don’t know why it’s not working in your case… Maybe try to download image again (although, if there were error during downloading, you wouldn’t be able to unpack zip file…).

  5. Steve

    Artur,

    I’m going to download and unpack it on a windows computer.
    Rewrite the image with Win32DiskImager on a 4gb SD card and retry.
    I’m sorry you could not re-produce the error.
    If it still fails… then I’m going to try a clean Xbian image and try to install everything manually. (duckduckgo is my friend)
    I found some information about soft float and hard float version of raspbian which with some chipsets fails to boot with the same symptoms green led briefly flashes and the only led that stays on is the power LED. (i’m not sure what everything means but i’m going to try some things)
    If i find a solution I will let you know. could be helpful if someone else runs into the problem.
    Thanks for the help and best regards,
    Steve

Leave a Reply

Your email address will not be published. Required fields are marked *