SACD ISO playback in MPD

Discuss client development (or even MPD development if you feel so inclined), ask questions about the client libs, MPD feature requests from client developers, etc...
tuxx
Posts: 16
Joined: March 21st, 2015, 5:21 pm

Re: SACD ISO playback in MPD

Post by tuxx » May 15th, 2015, 3:06 pm

you will have to install git, in order to get the source code locally. What is the distro you are using?

DuffyMoon
Posts: 11
Joined: May 12th, 2015, 10:31 pm

Re: SACD ISO playback in MPD

Post by DuffyMoon » May 15th, 2015, 3:41 pm

It's a variant of Debian

DuffyMoon
Posts: 11
Joined: May 12th, 2015, 10:31 pm

Re: SACD ISO playback in MPD

Post by DuffyMoon » May 18th, 2015, 1:28 am

I installed git and tried again.

This time I got to

Code: Select all

./autogen.sh
which produced the response

Code: Select all

-bash: ./autogen.sh: No such file or directory
Afterwards, when I try to use MPD, the database has vanished :(

DuffyMoon
Posts: 11
Joined: May 12th, 2015, 10:31 pm

Re: SACD ISO playback in MPD

Post by DuffyMoon » May 19th, 2015, 10:04 pm

OK, I found autogen.sh in the mpd directory. Do I have to execute the commands while in the mpd directory?

Update: tried typing it when in the mpd directory and got:

Code: Select all

./autogen.sh: 8: ./autogen.sh: aclocal: not found

DuffyMoon
Posts: 11
Joined: May 12th, 2015, 10:31 pm

Re: SACD ISO playback in MPD

Post by DuffyMoon » May 22nd, 2015, 12:12 am

Anyone alive out there?

wkchand
Posts: 2
Joined: May 24th, 2015, 2:47 am

Re: SACD ISO playback in MPD

Post by wkchand » May 24th, 2015, 2:55 am

Hi All,

I tried to enable the sacdiso support on the latest version of MPD, but failed.

I have got the following error message during "configure".

"configure: WARNING: unrecognized options: --enable-sacdiso"

My MPD is from "git://git.musicpd.org/master/mpd.git"

Please help and advise.

DuffyMoon
Posts: 11
Joined: May 12th, 2015, 10:31 pm

Re: SACD ISO playback in MPD

Post by DuffyMoon » June 2nd, 2015, 11:17 pm

I've given up with this and am trying a different approach - convert the iso to separate dff files.

Ran
Posts: 144
Joined: February 25th, 2013, 3:47 am

Re: SACD ISO playback in MPD

Post by Ran » June 3rd, 2015, 1:21 am

DuffyMoon wrote:I've given up with this and am trying a different approach - convert the iso to separate dff files.
Right on! This will give you much more flexibility with tagging and folder structure.

Enjoy the music!

wkchand
Posts: 2
Joined: May 24th, 2015, 2:47 am

Re: SACD ISO playback in MPD

Post by wkchand » June 6th, 2015, 1:27 am

Yes, at the end, I have extracted all ISO files. And enjoy the music now.

xxxbugxxxx
Posts: 3
Joined: July 7th, 2015, 5:55 am

Re: SACD ISO playback in MPD

Post by xxxbugxxxx » July 7th, 2015, 6:04 am

manisiutkin wrote:Could you try this:

mpd --kill /etc/mpd.conf
rm /var/lib/mpd/tag_cache
git clone git://git.musicpd.org/manisiutkin/mpd.git
./autogen.sh
./configure --enable-sacdiso --disable-iso9660
make
make install
mpd /etc/mpd.conf
initially got the following error


In file included from src/lib/sacdiso/sacd_metabase.cpp:25:0:
src/lib/sacdiso/sacd_metabase.h:24:23: fatal error: upnp/ixml.h: No such file or directory
#include <upnp/ixml.h>

after installing libupnp, the above error is gone, however , it shows the following one


libdecoder.a(libdecoder_a-sacd_metabase.o): In function `sacd_metabase_t::init_xmldoc()':
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:132: undefined reference to `ixmlLoadDocument'
libdecoder.a(libdecoder_a-sacd_metabase.o): In function `sacd_metabase_t::~sacd_metabase_t()':
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:70: undefined reference to `ixmlDocument_free'
libdecoder.a(libdecoder_a-sacd_metabase.o): In function `sacd_metabase_t::get_track_node(unsigned int)':
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:143: undefined reference to `ixmlDocument_getElementsByTagName'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:143: undefined reference to `ixmlNodeList_item'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:145: undefined reference to `ixmlNode_getChildNodes'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:147: undefined reference to `ixmlNodeList_length'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:148: undefined reference to `ixmlNodeList_item'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:150: undefined reference to `ixmlNode_getAttributes'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:155: undefined reference to `ixmlNamedNodeMap_getNamedItem'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:157: undefined reference to `ixmlNode_getNodeValue'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:160: undefined reference to `ixmlNamedNodeMap_getNamedItem'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:162: undefined reference to `ixmlNode_getNodeValue'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:166: undefined reference to `ixmlNode_getChildNodes'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:175: undefined reference to `ixmlNodeList_length'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:176: undefined reference to `ixmlNodeList_item'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:178: undefined reference to `ixmlNode_getAttributes'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:182: undefined reference to `ixmlNamedNodeMap_getNamedItem'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:184: undefined reference to `ixmlNode_getNodeValue'
libdecoder.a(libdecoder_a-sacd_metabase.o): In function `sacd_metabase_t::get_info(unsigned int, tag_handler const*, void*)':
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:82: undefined reference to `ixmlNode_getChildNodes'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:86: undefined reference to `ixmlNodeList_length'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:87: undefined reference to `ixmlNodeList_item'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:89: undefined reference to `ixmlNode_getNodeName'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:91: undefined reference to `ixmlNode_getAttributes'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:97: undefined reference to `ixmlNamedNodeMap_getNamedItem'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:99: undefined reference to `ixmlNode_getNodeValue'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:102: undefined reference to `ixmlNamedNodeMap_getNamedItem'
/root/mpddsd/mpd/src/lib/sacdiso/sacd_metabase.cpp:104: undefined reference to `ixmlNode_getNodeValue'
^

xxxbugxxxx
Posts: 3
Joined: July 7th, 2015, 5:55 am

Re: SACD ISO playback in MPD

Post by xxxbugxxxx » July 12th, 2015, 6:10 am

Hi.

Thanks a lot for your work, I got it compiled on Volumio RPI2 and works very well.

One question, it seems the "playable_area "stereo" " does not do anything, when updating database, MCH still shows up in the Library.

Tried it and the same happens in Archphile.
Do you know why?

Thank you.
# playable_area "multichannel" (not set by default, shows both tracks)
playable_area "stereo

dariocs
Posts: 1
Joined: November 19th, 2015, 6:48 pm

Re: SACD ISO playback in MPD

Post by dariocs » November 19th, 2015, 6:58 pm

Hi,
Thanks for this add-on.
I'm trying to install it on my RPi following the instructions posted. However, when I reach this step:
./configure --enable-sacdiso --disable-iso9660
I get the following error message:
checking for boostlib >= 1.46... configure: We could not detect the boost libraries (version 1.46 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
configure: error: Boost not found
Which is quite weird, since I ensured installing libboost-all-dev (version by default v1.55)... Is there any special version to install? Or am I not installing the correct library? Or do I need to do something else after "sudo apt-get install libboost-all-dev"?
Finally, is there anything else needed apart from C++ and Boost libraries to compile and run this add-on?
As you can see I'm quite a newbie in RPi, so please try to answer like if you were talking to your dog ;)
Thanks!

HexBorNit
Posts: 1
Joined: December 2nd, 2015, 2:09 pm

[SOLVED] Re: SACD ISO playback in MPD

Post by HexBorNit » December 2nd, 2015, 4:51 pm

Hi,

I'm trying to build mpd with SACD ISO and DVDA ISO reading capability on an up-to-date copy of PCLINUXOS (PCL).

Building:
http://git.musicpd.org/cgit/manisiutkin/mpd.git/

with
./autogen.sh

and:
./configure --prefix=/home/david/bin/mpd/ --exec-prefix=/home/david/bin/mpd/ --with-boost=/home/david/bin/boost --enable-libmpdclient --enable-flac --enable-database --enable-documentation --enable-ffmpeg --enable-dsd --enable-sacdiso --enable-dvdaiso

lead to make failing. The first warning to show was:
/home/user1/src/mpd/src/lib/dvdaiso/libmlpdec/mlp_parser.h:23: warning: the name `libavcodec/mlp_parser.h' supplied as the second argument in the \file statement is not an input file

and the error at the end was:
/home/user1/src/mpd/src/lib/upnp/Device.hxx:80: warning: The following parameters of UPnPDevice::Parse(const std::string &url, const char *description, Error &error) are not documented:
parameter 'error'

I have successfully built, what I thought was, v0.19.11 from:
git clone git://git.musicpd.org/master/mpd.git

and:
git checkout v0.19.11 -b mpd-0.19.11

However, what I get with mpd --version is:
Music Player Daemon 0.18.8

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright (C) 2008-2013 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.

Decoders plugins:
[mad] mp3 mp2
[mpg123] mp3
[vorbis] ogg oga
[oggflac] ogg oga
[flac] flac
[opus] opus ogg oga
[sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
[dsdiff] dff
[dsf] dsf
[faad] aac
[mpcdec] mpc
[wavpack] wv
[modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
[wildmidi] mid
[fluidsynth] mid
[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 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:
shout null fifo alsa ao oss openal pulse jack httpd recorder

Encoder plugins:
null vorbis opus lame twolame wave flac

Archive plugins:
[bz2] bz2

Input plugins:
file archive curl ffmpeg mms cdio_paranoia

Playlist plugins:
extm3u m3u xspf pls asx rss cue cue

Protocols:
file:// http:// https:// mms:// mmsh:// mmst:// mmsu:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// cdda://

which, may or may not be right. I am using this build now.

Can anyone help me with building mpd with sacdiso and, possibly, dvdaiso working?

Cheers

My error :oops: the build actually worked. How ever --version does not nominate SACDISO or DVDAISO as being present.

smoothquark
Posts: 16
Joined: November 2nd, 2014, 6:16 pm

Re: SACD ISO playback in MPD

Post by smoothquark » May 28th, 2016, 2:37 pm

Thank you once again for the wonderful work. Found a small bug when reading xml files for sacd iso. It looks like multichannel files do not get the (SACD 5.1) added on as by default the track number are for the stereo tracks (1 to x). This patch works against current git (http://git.musicpd.org/cgit/manisiutkin/mpd.git/):

--- mpd-master/src/decoder/plugins/SacdIsoDecoderPlugin.cxx.original 2016-05-28 12:45:54.198768570 +0100
+++ mpd-master/src/decoder/plugins/SacdIsoDecoderPlugin.cxx 2016-05-28 13:11:58.103855743 +0100
@@ -378,6 +378,7 @@
return false;
}
unsigned track = get_subsong(path_fs.c_str());
+ unsigned track_sacd = track; // pass correct track to sacd_metabase
unsigned twoch_count = sacd_reader->get_tracks(AREA_TWOCH);
unsigned mulch_count = sacd_reader->get_tracks(AREA_MULCH);
if (track < twoch_count) {
@@ -396,7 +397,7 @@
string tag_value = to_string(track + 1);
tag_handler_invoke_tag(handler, handler_ctx, TAG_TRACK, tag_value.c_str());
tag_handler_invoke_duration(handler, handler_ctx, SongTime::FromS(sacd_reader->get_duration(track)));
- if (!sacd_metabase || (sacd_metabase && !sacd_metabase->get_info(track, handler, handler_ctx))) {
+ if (!sacd_metabase || (sacd_metabase && !sacd_metabase->get_info(track_sacd, handler, handler_ctx))) {
sacd_reader->get_info(track, handler, handler_ctx);
}
return true;

manisiutkin
Posts: 21
Joined: September 28th, 2014, 5:43 pm

Re: SACD ISO playback in MPD

Post by manisiutkin » June 12th, 2016, 7:23 am

I've pushed this fix in git. Thanks!

cliffb
Posts: 1
Joined: November 14th, 2016, 10:56 am

Re: SACD ISO playback in MPD

Post by cliffb » November 14th, 2016, 11:11 am

Hello and thanks for the great job.

i have a problem

when i type: make install CPPFLAGS="$(pkg-config --cflags glib-2.0)"

the output is:

src/lib/sacdiso/sacd_media.cpp: In member function ‘virtual bool sacd_media_stream_t::open(const char*)’:
src/lib/sacdiso/sacd_media.cpp:104:54: error: no matching function for call to ‘InputStream::OpenReady(const char*&, Mutex&, Cond&, Error&)’
is = InputStream::OpenReady(path, mutex, cond, error);
^
src/lib/sacdiso/sacd_media.cpp:104:54: note: candidate is:
In file included from src/lib/sacdiso/sacd_media.h:28:0,
from src/lib/sacdiso/sacd_media.cpp:24:
./src/input/InputStream.hxx:135:24: note: static InputStreamPtr InputStream::OpenReady(const char*, Mutex&, Cond&)
static InputStreamPtr OpenReady(const char *uri,
^
./src/input/InputStream.hxx:135:24: note: candidate expects 3 arguments, 4 provided
src/lib/sacdiso/sacd_media.cpp: In member function ‘virtual bool sacd_media_stream_t::seek(int64_t)’:
src/lib/sacdiso/sacd_media.cpp:121:30: error: no matching function for call to ‘InputStream::Seek(int64_t&, Error&)’
if (is->Seek(position, error)) {
^
src/lib/sacdiso/sacd_media.cpp:121:30: note: candidate is:
In file included from src/lib/sacdiso/sacd_media.h:28:0,
from src/lib/sacdiso/sacd_media.cpp:24:
./src/input/InputStream.hxx:277:15: note: virtual void InputStream::Seek(InputStream::offset_type)
virtual void Seek(offset_type offset);
^
./src/input/InputStream.hxx:277:15: note: candidate expects 1 argument, 2 provided
src/lib/sacdiso/sacd_media.cpp: In member function ‘virtual size_t sacd_media_stream_t::read(void*, size_t)’:
src/lib/sacdiso/sacd_media.cpp:142:48: error: no matching function for call to ‘InputStream::Read(void*&, size_t&, Error&)’
size_t read_bytes = is->Read(data, size, error);
^
src/lib/sacdiso/sacd_media.cpp:142:48: note: candidate is:
In file included from src/lib/sacdiso/sacd_media.h:28:0,
from src/lib/sacdiso/sacd_media.cpp:24:
./src/input/InputStream.hxx:362:17: note: virtual size_t InputStream::Read(void*, size_t)
virtual size_t Read(void *ptr, size_t size) = 0;
^
./src/input/InputStream.hxx:362:17: note: candidate expects 2 arguments, 3 provided
src/lib/sacdiso/sacd_media.cpp: In member function ‘virtual int64_t sacd_media_stream_t::skip(int64_t)’:
src/lib/sacdiso/sacd_media.cpp:154:30: error: no matching function for call to ‘InputStream::Seek(int64_t&, Error&)’
if (is->Seek(position, error)) {
^
src/lib/sacdiso/sacd_media.cpp:154:30: note: candidate is:
In file included from src/lib/sacdiso/sacd_media.h:28:0,
from src/lib/sacdiso/sacd_media.cpp:24:
./src/input/InputStream.hxx:277:15: note: virtual void InputStream::Seek(InputStream::offset_type)
virtual void Seek(offset_type offset);
^
./src/input/InputStream.hxx:277:15: note: candidate expects 1 argument, 2 provided
src/lib/sacdiso/sacd_media.cpp: In member function ‘virtual bool sacd_media_stream_t::seek(int64_t)’:
src/lib/sacdiso/sacd_media.cpp:130:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
src/lib/sacdiso/sacd_media.cpp: In member function ‘virtual int64_t sacd_media_stream_t::skip(int64_t)’:
src/lib/sacdiso/sacd_media.cpp:163:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Makefile:8429: recipe for target 'src/lib/sacdiso/libdecoder_a-sacd_media.o' failed
make[1]: *** [src/lib/sacdiso/libdecoder_a-sacd_media.o] Error 1
make[1]: Leaving directory '/root/mpd'
Makefile:4792: recipe for target 'all' failed
make: *** [all] Error 2


can everyone help me?

Please

Cliff

manisiutkin
Posts: 21
Joined: September 28th, 2014, 5:43 pm

Re: SACD ISO playback in MPD

Post by manisiutkin » November 19th, 2016, 9:38 am

The fix is put in git.

conta
Posts: 99
Joined: October 31st, 2013, 4:59 pm

Re: SACD ISO playback in MPD

Post by conta » November 26th, 2016, 11:06 pm

Thanks a lot for your remarkable work for the handling of SACD-ISOs.
I enjoy your foobar2000-plugin since a lot of time - it's working awful!
But the SACD-ISO integration in MPD seems a lot more difficult... :oops:

After a lot of mistakes i don't have anymore errors while compiling your code. I take the following parameters:

Code: Select all

./configure --sysconfdir=/etc --enable-soxr --enable-sacdiso --disable-iso9660
make CPPFLAGS="$(pkg-config --cflags glib-2.0)" LIBS="$(pkg-config --libs glib-2.0)"
In the /etc/mpd.conf i add following lines:

Code: Select all

decoder {
plugin "sacdiso"
dstdec_threads "4"
edited_master "true"
lsbitfirst "false"
}
BUT i can still not find any entry for the test-sacd.iso (Dire Straits - Brothers in arms) in the database. Am i missing an important point for this process? The same iso plays without any problem in Foobar2000 under Windows.
Is it maybe necessary to write a xml-file for the iso?
Are there some hidden levers to pull? :roll:

Update:
xml-file created in Foobar does not help...

conta
Posts: 99
Joined: October 31st, 2013, 4:59 pm

Re: SACD ISO playback in MPD

Post by conta » December 1st, 2016, 7:10 pm

I still haven't any clue why the SACD-ISOs doesn't appear in the database.
But i have following lines in the mpd.conf:

Code: Select all

Dec 01 19:49 : config: option 'dstdec_threads' on line 402 was not recognized
Dec 01 19:49 : config: option 'edited_master' on line 403 was not recognized
Dec 01 19:49 : config: option 'lsbitfirst' on line 404 was not recognized
So all the settings for the decoder-plugin are not recognized. Does that mean, that the whole code is not compiled correctly?
While compiling, there are no problems.

conta
Posts: 99
Joined: October 31st, 2013, 4:59 pm

Re: SACD ISO playback in MPD

Post by conta » December 14th, 2016, 6:16 pm

To resume my monologue... :roll:

In the meantime i got the sacd-support running. I installed the following libraries, which are obviously important:

Code: Select all

sudo apt-get install build-essential automake autoconf libtool pkg-config libcurl4-openssl-dev intltool libxml2-dev libgtk2.0-dev libnotify-dev libglib2.0-dev libevent-dev dh-make

sudo apt-get install libupnp4-dev libboost1.55-dev libmpdclient-dev libsystemd-dev libicu-dev libexpat1-dev libssl-dev
BUT, there are some other news, at least for me:
Today i compiled the current master/mpd.git and to my surprise it seems that it can handle iso's. At least i can see the iso in the database, which is very new to me.
So are there chances, that iso-support will get a fully supported feature of MPD?

The option --enable-sacdiso gives me an error while ./configure - so its no surprise, that the iso is not playable, but it seems there is something going on!

Post Reply