DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-05-30 17:01:37

Kai
Member
Registered: 2009-05-30
Posts: 27

Mpd music daemon with Iphone remote control and airtunes playback

Hi everyone,

Got my CH3SNAS a week ago and immediately start playing arround with it.

Being used to my home setup which was exclusively based on iTunes, Airtunes remote speakers and iPhone remote app to control playback I was searching for something similar to be provided by my new NAS. Daap itunes server and upnp all very nice but lacking the ability to remote control. The idea to have keep another computer with itunes running wasn't..well satisfying

As I couldn't find any good solution on the web for my setup (just people asking for exactly the same thing) I thought about creating it myself.

Below is a very rough guide (written from memory) about the following setup
- use mpd music player daemon to serve, and stream music directly from the NAS
- use mpod an iphone/ipod touch remote tool available for free on itunes store to control mpd on the NAS
- some experimental piece of software to stream to my airtunes speaker

Looking forward to you guys thought and comments..

Pre-Requisites    funplug 5.0/ optware environment setup; iphone or ipod touch

1) Get mpd installed from optware package repository

- Ipkg install of mpd package available on optware repository
Mpd package doesn't come with config and startup script so we have to create our own.

- create mpd.conf in /opt/etc/mpd.conf (use skeleton or copy from another distribution)
  -- change music_directory to point to your music directory
  -- change playlist/db/logs etc to point to the correct /opt/var/lib
  -- bind_to_address         "any" works for me
  -- change audio output to
     audio_output {
        type                    "fifo"
        name                    "My Fifo"
        path                    "/tmp/mpdfifo"
        format                  "44100:16:2"    # optional
     }
This will create a fifo pipe in  /tmp that can be accessed by any streaming player app that can read from stdin/ fifo pipes. Gives countless options to use mpd on the NAS.

- create startup script in /opt/etc/init.d to start mpd (write one your own or copy from any other distribution and amend as appropriate)
- you might want to re create mpd database by /opt/bin/mpd --create-db /opt/etc/mpd.conf

Start mpd /opt/etc/init.d/mpd start (or whatever your startup script is called). Set something up that ensure /opt/etc/init.d optware stuff is started at boot time.

2) Install Iphone mpod remote app

There is a bunch of remote control clients for mpd. Choose one you like if you don't have or don't want to use an iphone.

Use itunes to install this beautiful app on your iphone or ipod touch. It's free!

See here for details (and don't forget to donate to the creator, if you like this)
http://www.katoemba.net/makesnosenseatall/mpod/

Open config dialog and connect to your mpd daemon on the NAS by specifying the NAS ip address.
You should be able to see your audio files etc and control the mpd daemon running on your NAS.

You certainly won't hear anything now.

3) Make mpd stream to your airtunes speakers

Again, there are many other potential options mpd might be setup to stream audio to. As I wanted to use my airtunes speaker I had to find a solution to play to them.

Airtunes isn't generaly open to be streamed to from any else than itunes but there is some software arround that allows you to do so. Basicaly all been re-writes of the original proof of concept JustPort by Jon Lech Johansen.
- Ruby RAOP Client using ruby/rubygems and a lib called RAOP::Client:Net. I've actualy tried that one on the NAS as well! It works (!) but is way to slow in terms of CPU usage
- rtunes    BSD style clone of it..couldn't get this bsd-ish stuff to compile hence I gave up on that fairly quickly
- raop-play by Shiro Ninomiya
A collection of some unix apps that allows to stream music to your airtunes.

I've used just the player raop_play (no need for the rest)

Managed to compile it on the NAS (using compilation on the nas and funplug toolchains as my cross-compile enviroment didn't work as it should)
- setup compile toolchain through funplug gcc, binutils, kernel-headers, uclibc, gcc, make, gettext, patch, bison,flex, autoconf, automake
- setup required libs for raop_play
- funpkg install of openssl (gives you the headers as well)
- download and compile libid3tag -> install
- download and compile libsamplerate -> install
- funpkg install of zlib

Download and compile raop_play..
Raop_play comes with a configure enviroment for all tools. Since this requires more fancy libs etc. I've skipped and just complied raop_play in the subdirectory. So copy Makefile.in to Makefile and change SHELL = /ffp/bin/sh and CC = gcc
If you got a the libraries etc. setup correctly it compiles without any errors

To start raop_play streaming out of the mpd pipe.

raop_play <YourAirtunesIPAdress) /tmp/mpdfifo

You'll see some infos on the screen if it find and connects to your airtunes device.

Generate a startup script (or use any existing) to bring up raop_play in the background. Here is what I use:

raop_play <YourAirtunesIPAdress) /tmp/mpdfifo > /tmp/raop.log 2>&1 < /dev/null &

(Mpd daemon needs to run before or raop_play exists due eof of the pipe. Keep in mind if restarting mpd)

4) Voila Party..
Now I can use my ipod touch to remotely play my music library with only the NAS running. Gives you almost the same user expierience than using the itunes setup but with no extra computer running itunes ;-)

5) Problems/Issues
Mpod occasionly loses connection but this seem pretty common for itunes/iphone remote users.

Streaming starts with some delay (build in raop_play) but nothing too serious.

Had occasions were something old was in the buffer being played while skipping songs. But nothing to annoying.

CPU load on the NAS is ok. MPD seems to be using a bit of memory. Still got itunes mt-daap, samba and even upnp running in paraellel with no issues on performance. Haven't stress tested the setup though.

Hey this is all pretty experimental!

6) Thougths/ Future

- complile and repackage mpd for funplug for people who don't want to use optware (once I figure out how to create a funplug package ;-) If anyone has any space to put it let me know.
- package raop_play and depending libraries for funplug to allow easier access for other people. Raop_play has some stuff in it that isn't required for this. I might strip down it if I find time.
- get startup scripts clean up and make daemonizing of raop_play a bit more failsave..
- write a nice howto on the wiki..
- the iphone app mpod is due to an update quite soon and will support cover art etc. Can't wait for that.


Thanks to the countless people on the planet that made this possible!!

Thanks
Kai

Offline

 

#2 2009-06-21 14:54:43

Soprano
Member
Registered: 2009-01-18
Posts: 17

Re: Mpd music daemon with Iphone remote control and airtunes playback

This sounds real cool. What is the status on this project? Does this replace mt-daapd?  Is there a step-by-step on how to get this running? Thanks!

Offline

 

#3 2009-06-24 13:54:10

Kai
Member
Registered: 2009-05-30
Posts: 27

Re: Mpd music daemon with Iphone remote control and airtunes playback

Well..having used this day by day since I would say it works without any problems.

As it didn't seem there was much interest in this I haven't yet bothered creating a HOWTO or a more user friendly straight forward way of getting this up and running. If you feel comfortable you might give it a try following my step-by-step above and post here were you might get stuck.

In regards to mt-daap it might be a replacement but it is a slightly different approach. mt-daap is basicaly for browsing/streaming content to itunes clients (or other devices understanding daap).  Itunes client can than playback the audio locally on your PC or laptop or output it to remote airtunes (or apple TV)

Mpd is able to playback or stream you library to a number of different audio devices which could be local audio, icecast/shoutcast streams, pulseaudio etc. or in my case my airport express (airtunes) speakers.
It can also be accessed remotely by a number of clients (web, GUI or iphone)

For changing and maintaing this music library I still use itunes. I've just created all this for greater flexibilty and to remove the need of having itunes running on some PC all the time for simple playback.

With the NAS running all the time I just need to grab my ipod touch to fire up music whenever I like.

Offline

 

#4 2009-06-26 01:55:46

oenie
New member
Registered: 2009-06-26
Posts: 2

Re: Mpd music daemon with Iphone remote control and airtunes playback

This is EXACTLY what i have been thinking about the past few days.
I'm really interested in trying this out myself, since i haven't got any spare pcs lying around, and i really want my wife to be able to easily play music as well.
Looks like i'm going to have to hook myself up with an iPod Touch soon ...
Which generation iPod touch are you using ? It doesn't sound like i specifically need a 2nd generation one ?
(seeing the difference between them is almost nothing, except for bluetooth and maybe some patches)

If you happen to make that HOWTO, i'm VERY interested. Although i'm no stranger to linux, and have done some compiling myself, you kinda lost me in your crosscompile toolchain mumbo-jumbo smile

Kudos for the effort !!

Last edited by oenie (2009-06-26 01:59:57)

Offline

 

#5 2009-06-26 04:18:55

lotech
Member
Registered: 2007-12-24
Posts: 19

Re: Mpd music daemon with Iphone remote control and airtunes playback

Awesome. I think its a little early in its life for me, but I look forward to following this, and eventually using it!

Offline

 

#6 2009-06-30 13:10:45

Kai
Member
Registered: 2009-05-30
Posts: 27

Re: Mpd music daemon with Iphone remote control and airtunes playback

Ok, you've got me. Will spend some more time to get this into a more complete shape.

Will start with re-compiling mpd for fun_plug and create a package from it to get rid of the optware dependency. Might just bastardize the raop stuff into a package as well to allow easy installation afterwards.

Ayone got a pointer to get me started on howto create fun packages? Couldn't really find a good tutorial on it?!

Offline

 

#7 2009-07-01 09:04:11

lotech
Member
Registered: 2007-12-24
Posts: 19

Re: Mpd music daemon with Iphone remote control and airtunes playback

Please do! An easy package installation would be great.
I see theres a few apps for controlling mpd in OS-X - Theremin and Ario look good.

Offline

 

#8 2009-07-08 20:06:53

Kai
Member
Registered: 2009-05-30
Posts: 27

Re: Mpd music daemon with Iphone remote control and airtunes playback

Ok, compling mpd as a funplug package turned out to be a much harder job then expected. Mpd higly depends on glibc which isn't available with straight funplug (which uses uclibc).  Merging glibc into a uclib environment would be a hack and rather ugly. Hence I recommend using optware as they have a proper enviroment to deal with glibc dependencies.

Anyway I compiled and uploaded the rest of the stuff as packages. So if you want to give it a try at least you can get it running without any need to compile anything.

Here is a step by step.

1) Get optware enviroment installed as per wiki
http://dns323.kood.org/howto:optware

2) Check for mpd package (good test if your optware is installed properly) by
#ipkg list | grep mpd

3) And install with
#ipkg install mpd

4) copy mpd sample config
cp /opt/share/doc/mpd/mpdconf.example /opt/etc/mpd.conf

5) Edit /opt/etc/mpd.conf (as above)
- change music_directory to point to your music directory
  -- change playlist/db/logs etc to point to the correct /opt/var/lib
  -- bind_to_address         "any" works for me
  -- change audio output to
     audio_output {
        type                    "fifo"
        name                    "My Fifo"
        path                    "/tmp/mpdfifo"
        format                  "44100:16:2"    # optional
     }
NOTE: address any seized to work for me in version 0.15..use your NAS IP address as a workarround

6) Create a startup file in /opt/etc/init.d/S21mpd (here is a copy of mine:)
<<SNIP>>
#! /bin/sh
#
# System startup script for the Music Player Daemon.
#
### BEGIN INIT INFO
# Provides: mpd
# Required-Start: $network $remote_fs alsasound
# Required-Stop: $network alsasound
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: This script takes care of managing the Music Player Daemon
### END INIT INFO

#. /etc/rc.status

# Reset status of this service
#rc_reset

MPD_BIN="/opt/bin/mpd"
MPD_CFG="/opt/etc/mpd.conf"
MPD_PID="/opt/var/lib/mpd/mpd.pid"
test -x $MPD_BIN || {
    echo "$MPD_BIN not installed";
    if [ "$1" = "stop" ] ; then
        exit 0
    else
        exit 5
    fi
    }

case "$1" in
    start)
        echo -n "Starting mpd "
        $MPD_BIN $MPD_CFG
        ;;
    stop)
        test -e $MPD_PID || {
        echo "$MPD_PID doesn't exist!"
        exit 0
        }
        echo -n "Shutting down mpd "
        $MPD_BIN --kill $MPD_CFG
        ;;
    try-restart)
        $0 status
        if test $? = 0; then
            $0 restart
        fi
        ;;
    restart)
        $0 stop
        $0 start
        ;;
    status)
        echo -n "Checking for mpd: "
       
        echo $MPD_BIN
        ;;
    *)
        echo "Usage: $0 {start|stop|try-restart|restart|status}"
        exit 1
        ;;
esac
<<SNAP>>

and make it executable (#chmod +x /opt/etc/init.d/S21mpd)

7) Create database
#/opt/bin/mpd --create-db /opt/etc/mpd.conf

8) Startup mpd
#/opt/etc/init.d/S21mpd start

Mpd should be running now and output to fifo pipe. Check /tmp for mpdfifo. Check mpd logs for any errors

Now to install the airtunes stuff:


1) Install openssl from fonz respository (I assume you know how to install fun packages. If not have a look arround the forum and the wiki)

#funpkg -i openssl-0.9.8k-1.tgz

2)Download and install libsamplerate
http://rapidshare.com/files/253454614/l … -0.1.7.tgz

Put in in your package directory on your NAS or somewhere you like and install with.

#funpkg -i libsamplerate-0.1.7.tgz

3) Download and install libid3tag
http://rapidshare.com/files/253453679/l … -0.15b.tgz

#funpkg -i libid3tag-0.15b.tgz

4) Download and install raop (the airtunes streaming tool)
http://rapidshare.com/files/253454916/raop.tgz

#funpkg -i raop.tgz

This installs the raop_play binary in /ffp/bin
You might wanna play arround it directly but keep in mind it is a bit "selective" in the formats it takes. (see http://raop-play.sourceforge.net/ for details)

5) Create startup script for raop.

Create /opt/etc/init.d/S22raop  (to ensure it is started after mpd is running a boottime) and paste:

/ffp/bin/raop_play YOURAIRPORTIPADDRESS /tmp/mpdfifo > /tmp/raop.log 2>&1 < /dev/null &

into it.

Don't forget to make it executable!

6) start raop
#/opt/etc/init.d/S22raop

DONE

You should see the raop_play as well a number of mpd processes running.

You know can connect by using any mpd remote client or if you like to stay on the NAS for testing install the mpc (console based client) by #ipkg install mpc

cherio
K.

Last edited by Kai (2009-07-08 20:09:29)

Offline

 

#9 2009-07-28 14:20:15

oenie
New member
Registered: 2009-06-26
Posts: 2

Re: Mpd music daemon with Iphone remote control and airtunes playback

Thanks a LOT for this howto, i got it to work without any noteworthy problems.
The only thing i did have to do was to put an optware.sh script into the ffp/start directory, to allow for the funplug to auto-start the optware services at boot time. don't know if i overlooked this step in the optware-howto, but i would like to mention it anyhow.

Supposedly, when not having installed optware yet, this script would actually do it for you.
Afterwards, it would just make sure that the path is set, together with starting the services as mentioned before.

i found this useful script around these forums in this thread : http://dns323.kood.org/forum/viewtopic.php?id=3609

One happy music listener here !!!

Offline

 

#10 2009-11-26 22:43:33

borg
New member
Registered: 2009-11-04
Posts: 3

Re: Mpd music daemon with Iphone remote control and airtunes playback

I want this aswell can any of you guys get on a play a do it for me. I dont understand a thing your writing. I think i have to read a book about linux or something. smile

Offline

 

#11 2009-12-31 14:15:07

Fourer
New member
Registered: 2009-12-31
Posts: 3

Re: Mpd music daemon with Iphone remote control and airtunes playback

Hey Kai,

Thanks for you HowTo.

I've a mistake by creating the Database (Failed to listen on ayn : address already in use.)

How canI stop MPD ?

Look at my top

Code:

Mem: 57276K used, 4628K free, 0K shrd, 10884K buff, 24416K cached
CPU:   0% usr   0% sys   0% nice  99% idle   0% io   0% irq   0% softirq
Load average: 0.03 0.01 0.09
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
  928 29933 root     R     1360   2%   0% top
 1561     1 root     S      476   1%   0% fancontrol
32151 32150 root     S    16844  27%   0% /opt/bin/mpd --create-db /opt/etc/mpd.
32149     1 root     S    16844  27%   0% /opt/bin/mpd --create-db /opt/etc/mpd.
32150 32149 root     S    16844  27%   0% /opt/bin/mpd --create-db /opt/etc/mpd.
32153 32150 root     S    16844  27%   0% /opt/bin/mpd --create-db /opt/etc/mpd.
 1921  1910 root     S     9620  15%   0% /ffp/bin/php-cgi
 1912  1910 root     S     9620  15%   0% /ffp/bin/php-cgi
 1945  1912 root     S     9620  15%   0% /ffp/bin/php-cgi
 1944  1921 root     S     9620  15%   0% /ffp/bin/php-cgi
 2042  1882 root     S     6432  10%   0% /ffp/libexec/mysqld --basedir=/ffp --d
 2044  2042 root     S     6432  10%   0% /ffp/libexec/mysqld --basedir=/ffp --d
 2045  2044 root     S     6432  10%   0% /ffp/libexec/mysqld --basedir=/ffp --d

it seems that the process is already working.

How can I stop it all ?

Thanks for your answer.

Offline

 

#12 2010-01-08 01:36:20

Bink
New member
Registered: 2010-01-08
Posts: 1

Re: Mpd music daemon with Iphone remote control and airtunes playback

I just about fell over when I found this thread - like others, this is a real dream, and I've read a million posts before saying that it just can't be done.

Unfortunately, I am having a bit of trouble too:

Fourer wrote:

I've a mistake by creating the Database (Failed to listen on ayn : address already in use.)
.

I get the same error - using the 323's IP or "any" makes no difference.

Also, I haven't been able to get the downloads you posted to work correctly. I get nothing but tar magic errors. (Doesn't matter if I download and then upload or if I use wget - same error.)  I reinstalled Busybox, but no change. Other tgz files install fine (before and since).

Thanks so much for your willingness to share all of your hard work.

Last edited by Bink (2010-01-08 01:37:47)

Offline

 

#13 2010-01-11 19:50:23

Kai
Member
Registered: 2009-05-30
Posts: 27

Re: Mpd music daemon with Iphone remote control and airtunes playback

Ok, haven't been here for a while.

Your key problem seem to related to general usage of mpd. There is tons of help to find on mpd handling and I'm not really an mpd expert but anyway I'm trying to help as good as I can

1) Start and stop mpd by using the script I suggested #/opt/etc/init.d/S21mpd stop. Or kill the process id manualy.
Just typing mpd will usualy fork another instance if /opt/bin/mpd is in you path (which is likely) and gets you in trouble.
There is a verbose option if you like more output..
Usage:
  mpd [OPTION...] [path/to/mpd.conf]

Music Player Daemon - a daemon for playing music.

Help Options:
  -?, --help         Show help options

Application Options:
  --create-db        force (re)creation of database
  --kill             kill the currently running mpd session
  --no-config        don't read from config
  --no-create-db     don't create database, even if it doesn't exist
  --no-daemon        don't detach from console
  --stdout           print messages to stderr
  -v, --verbose      verbose logging
  -V, --version      print version number



2) Looks like you got some isssues creating the mpd database. In my config any mpd files including the database are located in /opt/var/lib/mpd. Look here for errors in the logs. Might be your config being wrong etc. Go for some clean up i.e kill mpd; remove the db and start all over again with

3) In regards to my .tgz files? Hmm?! Never had issues with it nor seem anyone else using them?
Check the following
#which tar -> mine gives /ffp/bin/tar
#which gzip -> mine gives /ffp/bin/gzip

then try if you can manualy ungzip and untar. (gzip -d <file.tgz> then tar -tvf <file.tar> should list the folders and content?)

thanks
K.

Offline

 

#14 2010-01-13 22:28:35

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Mpd music daemon with Iphone remote control and airtunes playback

Kai I think you'll find quite a few people are interested in this.  I've seen a number of requests.

Now I just need to convince the wife that an airport express, a NAS, and a fair bit of my time is worth it smile

Any issues about what sort of NAS this would run on?

Good work.  I hope I can get the gear some time and give it a try.

Offline

 

#15 2010-01-14 14:42:33

Kai
Member
Registered: 2009-05-30
Posts: 27

Re: Mpd music daemon with Iphone remote control and airtunes playback

Well in terms of making this available to other NAS or platforms..

Mpd is not an out of the box compile (though not rocket science) due to library pre-requisites and the glib dependencies (which may cause issues on some small devices using uclib..see a few post above). But it is available as optware packages which makes it easily accessible for many devices.

The raop bit for the airport device is a pretty straigth forward compile if you get the libs together. If you get a more powerfull device you might even give the ruby raop thing a try as it works pretty well but brings way more overhead due to ruby runtime (reason I decided against it and gone native C)

There are a bunch other streaming audio devices apart from the airport express that may do the same job. Remember the mpd setup is pretty open in what/where to output audio too.

Offline

 

#16 2010-01-19 23:20:21

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Mpd music daemon with Iphone remote control and airtunes playback

I might be able to grab a DNS-313 cheap, however any clue if this hardware can cope with mpd and raop-play?  I believe its not nearly as powerful as the 323 hardware, but a fair bit less info out there on it other than it seems to be able to be hacked similarly to the stuff here.

Offline

 

#17 2010-02-27 23:17:53

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Mpd music daemon with Iphone remote control and airtunes playback

Managed to get hold of a DNS-323 on ebay.  Have thrown in one drive, upgraded to 1.08 firmware, threw on fun plug and set it up for time machine backups from my mac.

Now its time for this cool trick smile  The apple express is on the way.  In the mean time am stepping through your instructions Kai (thanks again).  Optware is nice and simple, mpd is not so bad though got a bit mixed up changing the config files.  Next is to check the iphone link up.  Have installed open ssl, however rapidshare is teasing and can't download the other packages.  So will have to keep trying until there are more download spots....won't be trying to compile them myself smile

Anyway, thats the progress so far, will write again when I get a bit further.

Haim

Offline

 

#18 2010-03-01 11:04:08

Kai
Member
Registered: 2009-05-30
Posts: 27

Re: Mpd music daemon with Iphone remote control and airtunes playback

Oops..Haven't really thought about the download limitation rshare puts on non premium downloaders

Here is a zip containing all the packages above to get their in one go: http://rapidshare.com/files/357373958/mpdraop.zip

Offline

 

#19 2010-03-02 11:21:20

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Mpd music daemon with Iphone remote control and airtunes playback

Cheers Kai, I'll download that when I get home.

Having some troubles with mpd install.  Database is not creating.  It has created the database file once (empty), but now it won't.
The log file says it is trying to add the mp3's, move get a following error (ffmeg: failed open) which from searches may be due to them being variable bit rate and/or non conforming id3 tags.  Some don't get this error but still aren't added.  I think previously it tried to add them all, now seems to just stop after a few.  There is also a comment somewhere about file names with spaces being a problem, but someone else rebuffed this so unclear.

I have tried chmod 777 for all the files as I thought that might be a problem and changing login in the conf file to be root.  No luck.
Next try will be to just try to add some mp3s that seem to be ok in the log file and see if they can be added and a database file created again.

It seems in newer versions of mpd the database is auto created on start of mpd rather than manually created.  I guess the optware version is an older one perhaps.

Anyway will try as above, and then post for help in mpd forums if it doesn't work.

Cheers for the files smile

Haim

Offline

 

#20 2010-03-06 09:40:39

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Mpd music daemon with Iphone remote control and airtunes playback

Hi again!

Its working !! smile 

Had some fun with starting raop as it couldn't find libsamplerate, so I uninstalled and reinstalled and noticed the files were put in
/ffp/lib/lib/       (note the extra lib)

So I moved everything down a folder (including the pkgconfig directory items) and raop started fine smile

I guess thats something defined in the .tgz file??  The other two funplug packages installed in the correct directory.

Anyway now it works, so thanks a bunch.  Tiny lag, i'm very impressed.

Only remaining issue for me now is testing it on reboot.....and getting all my music on there sad

I'm getting ffpmg: Open Failed messages in the mpd log when trying to create the database.  So it seems there are issues with my files, perhaps the id3 tags sad  For checking the raop playing I changed the directory to one with items which didn't fail on import and these imported correctly with a good database file afterwards.  Not much luck yet with sorting out the files, I think I might need to run some iD3 checker/fixer program.

Anyone else had issues with iTunes created mp3's ??

Anyway, thanks a bundle Kai !

Offline

 

#21 2010-03-08 11:26:08

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Mpd music daemon with Iphone remote control and airtunes playback

In case anyone is interested...

with the verbose option added to the creation of database I have worked out a bit more

i.e. mpd --verbose --create-db /opt/etc/mpd.conf

In the log file I can see ffmpg can't find the length of the track in the id3 tags and this is required for variable bit rate mp3s.  So now I need to fix them up with some id3 tag code (mpd site has a link to some so will see if I can sort that out).
Actually these still get into the database file, but supposedly will stop before the end of the tune when playing.

Other problem is there are some files that will crash the database creation.  No idea why.  AFterworking out it was still running and actually waiting for it to crash instead of killing the process, I found it was failing on the same mp3.  I removed that and it could go further.  Haven't yet weeded out all the problem mp3s.  Not sure what the issue is with the either.

OF FURTHER NOTE:

The forked-mtdaap guys are working on building this functionality into their version of Firefly/mtdaap.  Its based on the same raop-play I believe and they have the iTunes iphone client link up already done from what I've read.  This should be a great option as the NAS already has a version of this as its iTunes server (and as a package with firmware 1.08 one can change to Firefly) so should install ok, then it will have everything necessary 'out of the box'.

http://forum.fireflymediaserver.org/vie … p;start=15

See posts by 'ace', one of the forked developers.

Offline

 

#22 2010-03-09 11:38:30

Kai
Member
Registered: 2009-05-30
Posts: 27

Re: Mpd music daemon with Iphone remote control and airtunes playback

haim wrote:

OF FURTHER NOTE:

The forked-mtdaap guys are working on building this functionality into their version of Firefly/mtdaap.  Its based on the same raop-play I believe and they have the iTunes iphone client link up already done from what I've read.  This should be a great option as the NAS already has a version of this as its iTunes server (and as a package with firmware 1.08 one can change to Firefly) so should install ok, then it will have everything necessary 'out of the box'.

http://forum.fireflymediaserver.org/vie … p;start=15

See posts by 'ace', one of the forked developers.

I looked into that option allready and been in contact with Julien the main developer.  Keep in mind that this is not firefly anyone knows about (dead end, code no longer maintained, upstream developers gone) but a complete rewrite. Unfortunately this doesn't look to be a straight run on a standard firmware NAS as it makes use of more uptodate kernel features (i.e.ionotify; and signalfd) that don't exist in the old firmware kernels.
Julien won't shut the door for any type of system architecture but embedded isn't his main target obviously.

So bottomline I think we have to see and wait once this matures to a usable product but I expect you at least need to run a uptodate native linux distribution to get this going. (which works without problems - got a recent git extract to compile on my ch3snas which now runs an uptodate debian squeeze )

Offline

 

#23 2010-03-09 11:58:21

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Mpd music daemon with Iphone remote control and airtunes playback

Thanks for the heads up.

I hadn't realised they had departed so much.  I think due to my usage requirements I had assumed mtdaap was embedded based, not sure why.

Looking in the how-to's it seems putting a full linux dist on puts us in possible bricking territory....although there seems to be a thread on doing this without flashing the firmware so maybe this will get much easier.

Anyway I'll keep plugging away with your solution smile  Slow going, but thats due to my unfamiliarity with linux and even more so with the fun of small children smile 

Its a fun project anyway.

Offline

 

#24 2010-04-02 19:29:54

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Mpd music daemon with Iphone remote control and airtunes playback

Got a bit sidetracked by some other projects, and the 'official' firefly add-on overwriting /opt  and destroying my optware install every reboot!

Anyway, all working now.  Had to convert some mp3 idtags with itunes to version 2.3 and remove flac files as these were crashing the mpd database creation.  Now working perfectly.

One more time, thanks Kai.

It seems what I read about raop-play constantly making network traffic even if not playing anything is correct.  Any ideas for getting it to only send when the fifo file contains anything?  Might be the only way is really to code it.

Offline

 

#25 2010-04-08 14:06:35

Kai
Member
Registered: 2009-05-30
Posts: 27

Re: Mpd music daemon with Iphone remote control and airtunes playback

haim wrote:

It seems what I read about raop-play constantly making network traffic even if not playing anything is correct.  Any ideas for getting it to only send when the fifo file contains anything?  Might be the only way is really to code it.

Not much to do about it without do some rework on the code. Doable but raop is not the nicest piece of code on the planet to be honest.

Other workarround I've tried is to have mpd pipe output to stdout which is available since a few version. That way mpd starts the "stream" program only if output is required. Unfortunately not the optware default one but I did a recompile of the packacke.  Furthermore raop can't really read from stdin ;-(( so some more tweaking is necessary. As all this didn't work to my satisfaction I gave up on that one fairly quickly.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB