mpd SoundCloud support

Raspberry Pi related support

mpd SoundCloud support

Postby bastienauneau » 26 Feb 2015, 10:33

Hi all

Posting here status on soundcloud support for mpd
First, pre-required :
Code: Select all
pacman -S base-devel boost yajl

base-devel will take care of installing gcc, automake, autoconf
boost is for mpd core
yajl is required for souncloud support, it's a JSON library
after that, run
Code: Select all
git clone git://git.musicpd.org/master/mpd.git
cd mpd
sh autogen.sh
./configure
#with yajl installed, it will auto enable soundcloud support
#to force enable, use ./configure --enable-soundcloud
make
#make will take a looong time, more than an hour on RPI

Been trying to compile using mpd git master (0.20, not released yet) and using 0.19.9
On the RPI, it did not compile, while it did compile fine on my laptop (ubuntu 14.04 LTS)
What did the trick on RPI, was to add -fpermissive compilation flag in the configure.ac
(specifically AX_APPEND_COMPILE_FLAGS([-fpermissive]) ) @ line 1346 and 1357

after that, replacing the mpd binary was not enough. I had to do
Code: Select all
pacman -R mpd-rune
make install
#check that right version is deployed
mpd -V
systemctl start mpd

That mpd worked on both RPI and Ubuntu 14.04 LTS, using radio stream to test
But soundcloud did not work on any of these platform
Code: Select all
mpc
volume: 96%   repeat: off   random: off   single: off   consume: off
ERROR: Failed to decode https://soundcloud.com/yoann-minkoff/devil-got-my-soul?in=yoann-minkoff/sets/yoann-minkoff-ep

I'm investigating this issue at the moment
I don't think it's due to soundcloud using JSON rather than XML by default since 01/12/2014, because yajl is a JSON lib
I don't think it's due to https, because https is supported

Please do post any idea you may have on that issue
I will continue to post here as I'm going forward

Here is some version info, that may help
Code: Select all
[root@runeaudio mpd]# mpd -V
Music Player Daemon 0.19.9

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright (C) 2008-2014 Max Kellermann <max@duempel.org>
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

Storage plugins:
 local

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [faad] aac
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve
 [pcm]

Output plugins:
 null fifo alsa ao oss jack httpd recorder

Encoder plugins:
 null vorbis lame wave flac

Archive plugins:
 [bz2] bz2

Input plugins:
 file alsa archive curl ffmpeg mms

Playlist plugins:
 extm3u m3u pls xspf asx rss soundcloud cue embcue

Protocols:
 file:// http:// https:// mms:// mmsh:// mmst:// mmsu:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// alsa://
[root@runeaudio mpd]#
bastienauneau
 
Posts: 17
Joined: 16 Jan 2015, 15:18

Re: mpd SoundCloud support

Postby bastienauneau » 26 Feb 2015, 18:02

SUCCESS !
soundcloud source is now working. The mistake was mine. I didn't load the soundcloud url properly
As noted in a couple of forums, and when using mpd -V, soundcloud is a "playlist plugin". From that playlist, the stream(s) url is(are) extracted, and played

the right way of using is :
Code: Select all
mpc load soundcloud://url/soundcloud.com/yoann-minkoff/sets/yoann-minkoff-ep
mpc play

A client_id is mentionned in the soundcloud API and in forums, but I did not add any of those in the config file, and it works like a charm

ACX, I'll be happy to continue on that task
Do you want me to merge it in ? I'd like to learn about runeaudio dev processes, and participate more
I can do some pkgconfig file, should I make a git patch ?
Is there any guideline doc for that ?

Edit : I guess I try to fit in that :
https://github.com/RuneAudio/RuneOS/blo ... opment.txt
bastienauneau
 
Posts: 17
Joined: 16 Jan 2015, 15:18

Re: mpd SoundCloud support

Postby ACX » 26 Feb 2015, 22:44

bastienauneau wrote:ACX, I'll be happy to continue on that task
Do you want me to merge it in ? I'd like to learn about runeaudio dev processes, and participate more
I can do some pkgconfig file, should I make a git patch ?

Absolutely yes, we love people who get their hand dirty and help us testing and improving our work.
You can do a pull request to the MPD PKGBUILD, to start.

bastienauneau wrote:Is there any guideline doc for that ?

Edit : I guess I try to fit in that :
https://github.com/RuneAudio/RuneOS/blo ... opment.txt

Good, I see that you are already on track :) Unfortunatly that guideline is uncomplete and outdated, but it will be reviewed soon for the 0.4, and will be the base for all the future cross-platform development. We aim to transform it in something universal and as automated as possible.
User avatar
ACX
RuneAudio co-founder
 
Posts: 1687
Joined: 29 Nov 2013, 02:25
Location: Udine, Italy

Re: mpd SoundCloud support

Postby Orion » 26 Feb 2015, 22:48

Hi bastienauneau,
You can make a pull request on our PKGBUILD:

https://github.com/RuneAudio/RuneOS/blo ... BUILD.0.19

Thanks for your contribute.

Simone.
RuneAudio - Embedded Hi-Fi music player
SoloStereo - Alla riscoperta dell'alta fedeltà
User avatar
Orion
RuneAudio co-founder
 
Posts: 189
Joined: 29 Nov 2013, 02:03
Location: Udine, Italy

Re: mpd SoundCloud support

Postby bastienauneau » 08 Mar 2015, 04:33

Just did a pull request
Tell me if there's anything wrong

And if there's any other pakage that you know need upgrade ?

Cheers
bastienauneau
 
Posts: 17
Joined: 16 Jan 2015, 15:18

Re: mpd SoundCloud support

Postby bastienauneau » 08 Mar 2015, 14:39

Would it be usefull if I work on a script that build all packages ?
The cookbook download the packages from the web, so I thought of an makepkg-all.sh put in packages folder
Acx, Orion what do you think ?

Meanwhile, I'm checking issues on github
Are these up-to-date ? Relevent ?
bastienauneau
 
Posts: 17
Joined: 16 Jan 2015, 15:18

support RuneAudio Donate with PayPal


Return to Raspberry Pi

Who is online

Users browsing this forum: cmh714 and 13 guests