mpd server | proxy plugin | on RPi

  • Dear CvH,

    after using mpd server for a while, is it possible to add the 'mpc' binary as well to the addon? This would allow to match the volume so that while starting kodi and mpd approx. match the same volume level. The start script can be modified individually ie. manually to do that.

    Here are the libs required (run on raspbian):

    Code
    root@raspberrypi:~# ldd $(which mpc)
    /usr/lib/arm-linux-gnueabihf/libarmmem.so (0xb6ef3000)
    libmpdclient.so.2 => /usr/lib/libmpdclient.so.2 (0xb6ecd000)
    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6d8e000)
    /lib/ld-linux-armhf.so.3 (0xb6f09000)

    btw - if someone wants to use mpd server with a different LE built, ie. not the Millhouse one, this can be achieved by using a normal raspbian install and copy all libs related to mpd in one dir, copy them to LE into a unique dir and adjust the path-to-search libraries. I can confirm this works (before the Millhouse builds were updated with mpd server addon). The following commands are helpful:

    on raspbian - it can be required to run this on some libs as well if these also depend on other libs, so one really collects all necessary libs:

    Code
    ldd $(which mpd)

    There is surely some bash possibility with 'find' to do this automatically.

    On LE, run for the directory where all libs + mpd + mpc are located (I just use '/storage/mpd' here):

    Code
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/mpd/

    start mpd (of course it requires a working mpd.conf):

    Code
    /storage/mpd/mpd --no-daemon /storage/mpd/mpd.conf

    The calls for LD_LIBRARY_PATH and to start the mpd daemon can be put in some autostart script or whereever suitable. And it requires a proper alsa.conf to work with kodi.

  • Sure! Thx + pretty cool, yes I can try it out - RPi2 (should work for RPi3, too, right?) and RPi 1 (old one with the P5 header, sorry don't know exact model, but it is from 2011-12/ chinese production, exact model is not printed on it):

    LE runs within a VM? Then I can try also normal PC x64.

  • Cool. Thanks! will try out next few days and send a short report. Good, if it works within a VM I can test both addons. Basic functionality is easy to test with mpc, and that is all was is required (adjust volume, etc.)

    btw - I found out that the mpd-client on LE is broken for Krypton and Leia probably due to the main skin (estuary). Switching to old Confluence shows it works. Strangely, installing kodi on Win 7 64bit the mpd client worked there also with estuary. I wrote a short bug report on the github page of the developer (Crash while starting Kodi Krypton/ Leia (LE built) · Issue #40 · lzoubek/xbmc-plugin-mpdc · GitHub), but it seems some time ago someone reported a similar problem, but the result was unclear (my trials are reproducible), and the problem is still there.

    Question - is this something I can post here or not?

    best wishes,

    lcg

  • Ah - MIA - what a pity, thanks for the info. So somehow there should be at least a small note in the info that the addon does not work with every skin.

    Now for mpc (see build number) on a RPi2/3:

    Code
    LibreELEC (community): devel-20180424210314-#0424-gadc0ff9 (RPi2.arm)
    LibreELEC:~ # mpc volume 50
    ....
    [paused]  #1/13   0:00/5:36 (0%)
    volume: n/a   repeat: off   random: off   single: off   consume: off
    LibreELEC:~ #

    Please ignore the 'n/a' value next to volume, this is just because the test was done with a LE image that was configured for a DAC configured with alsa. And the RPi3 used was a different one without the DAC on it (no time to reconfigure alsa). So everything seems to be fine :-). Sorry, I could not test on PC and it seems LE does not work within VMs/virtualbox (anymore). But I assume it will work, too.

    best,

    lcg