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

#76 2010-10-01 17:04:31

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

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

I don't want to use any apple software.  I'm just looking to play to my computer  (PC) at work and my android phone.  I would just use the mpd but it appears that it wont actually stream the sound.

Offline

 

#77 2010-10-01 17:15:24

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

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

I feel like I'm so close.  The music is playing and I can see the playlists but I just can't hear any sound.  I've installed raop and followed all of these steps:


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


What am I missing?  When I look at the processes running I don't see anything about raop play

Offline

 

#78 2010-10-01 19:51:37

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

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

when I run the command "raop_play 192.168.2.10 /tmp/mpdfifo" I get the error message "raop_play: can't load library 'libsamplerate.so.0'".  Any ideas what could be causing this?

Offline

 

#79 2010-10-01 21:44:23

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

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

Here's a bit from my post on the first page:

%%%%%%%%%%%%%%%%%%
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
%%%%%%%%%%%%%%%%%%

Perhaps you have the same problem, maybe its something wrong in the tgz that we have downloaded.

By the way, what are you planning to stream to?  The raop_play streams to apple express using the airtunes protocol, I'm not aware that anything else can act as one and play the music in this way.

Offline

 

#80 2010-10-01 21:46:44

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

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

Pretty sure to play to your work pc you'll need something like icecast.  I think Kai has a post about trying it and giving up....or was that karlado recently?

Not sure about an android app that would play the music, didn't think that mpod or mdroid did that....or perhaps there was something about that in an upgrade to one of them?

Offline

 

#81 2010-10-01 21:55:18

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

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

Last post I promise!  Just did a google search and seems icecast is the way to stream to android phones and mpdroid or other mpd client apps will play it.  So I think you.should drop raop and see if icecast can work

I can see you have another post going, but figure you'll see this one.

A search for icecast on this forum didn't turn up any one saying that had solved it.  If you are lucky you can get Kai to reply on this as he is pretty sharp on the possibilities of getting things to work on the 323 (eg compiling/memory issues.

Offline

 

#82 2010-10-01 22:26:01

karlrado
Member
Registered: 2009-12-07
Posts: 229

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

Icecast may be the way to go.  I have not tried it yet.

I did have some success without it.  On the DNS, I configured the MPD audio output to use HTTP streaming on port 8000.

Then, on a remote computer, I use Minion to *control* MPD, starting and stopping playback, etc.  All that works fine, but Minion does not play the audio.  I don't think that it is supposed to play the audio because there is no place to configure it to find the stream.  Perhaps the intent is to configure firefox so that it launches a media player to capture the stream and play it back.   If I end up using all this, I'll have to dig into Minion some more.   Anyway....

So I started Windows Media Player on the same remote computer and opened a URL to my DNS on port 8000.  No audio came out, but when I shut down MPD on the DNS, whatever audio content had been buffered up by WMP started playing.  I got about 20 secs or so of audio.  I conclude that WMP was missing a packet or got some other garble from the DNS and sat there waiting for some reason.  When the connection dropped, it spat out what it had.

I'm going to try this streaming on the local LAN where the DNS is when I get the chance, mainly to see if the network is the reason.  The other troubling thing is that the DNS CPU and memory were maxed out when the streaming was going on.  So it is possible that the DNS just cannot hack this task.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#83 2010-10-01 23:19:50

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

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

DAMN!  Looks like your right on raop.  Earlier in this thread lux said he had icecast almost functional but the device was bogged down with it and really couldn't run it.  There must be something lightweight out there that can make this work with android.

Offline

 

#84 2010-10-02 00:20:52

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

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

just looked back at lux's post.  He was using the 321.  Maybe the 323 has enough juice to do what I want.  I have installed icecast but need to get it running.  anyone have any suggestions on where to start with getting it running?  Also, in my mpd.conf file should i leave the fifo audio output section in tact and add one for icecast? or just have one for icecast?

Offline

 

#85 2010-10-02 01:38:50

karlrado
Member
Registered: 2009-12-07
Posts: 229

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

bigwebb83 wrote:

just looked back at lux's post.  He was using the 321.  Maybe the 323 has enough juice to do what I want.  I have installed icecast but need to get it running.  anyone have any suggestions on where to start with getting it running?  Also, in my mpd.conf file should i leave the fifo audio output section in tact and add one for icecast? or just have one for icecast?

The fifo audio output section causes raw PCM data to be written to a file, that is read by another program.  Unless you have another program explicitly pointing at that file to read it, you don't need it.  In fact, writing it is probably slowing you down even more.  I have it disabled in my semi-working config.

I'm guessing that the /mdp.ogg file mentioned in the icecast stanza is how the data gets over to icecast.

The 323 is clocked only slightly faster than the 321, but I don't think it will be fast enough to do the encoding.

What I think is happening is that mpd is decoding your music file from whatever format and bitrate was used to encode that music file.  Then it, or something like icecast or roap, is going to encode and compress it for transmission to the device according to the parameters in the audio_output stanza.

It is this decoding and encoding that is bogging the device down.

Mediatomb is another media server that can do encoding.  However, if it determines that the target device can support the media, it won't transcode it.  And that's why Mediatomb can run OK on a DNS 323.  But it can do transcoding if needed, and then I suspect that it will show the same overload issues.

I don't know what your (bigwebb83) needs are, but it may be time to look at other solutions that do not involve transcoding.  The MPD model is that of a jukebox - you can set it up to play playlists and sort of run by itself.   If that mode of operation is really important to you and you really need MPD, I would look at running it on a different box, like an old PC running Linux.  This PC can access the media from the DNS, so you can leave the media files from the DNS.  (I know it is another box to leave running.)

If all you need is to find and play music on an Android device, I'd look for an app for Android that can play music from a mt-daapd server or uPnP device; there's got to be one of those.  Then run the media server that is built into the DNS-323 or install Firefly or install Mediatomb.

I'm guessing that you may be out of luck running MDP on the DNS to stream to the Airport Express.  I don't see a way around the transcoding.  Others on this thread seem to think the same.

Anyway, a mt-daapd server may be the "lighter weight" solution that you are asking for.  Remember that the DNS-323 was built to be a file server and a rather limited media server.  I don't think it was meant for real-time transcoding.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#86 2010-10-02 11:22:26

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

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

Yeah I've heard from others the transcoding is too much for our little box.

Streaming to the airport express does work however, thats mpd writing to fifo file and raop_play picking that up and firing off to the airport.  I presume there is no transcoding, it only works with mp3s I think so that could well be the case. 

I agree there must be an android app which can read off an mt-daapd service or even samba drive.  Of course your pc can do that but I guess you want to be able to use the phone to controll the playback even if playing from the PC.  Perhaps there is an android remote for rythmbox or some other media player which can then just pull files off the mt-daapd.

Doesn't help your streaming to work of course.

Offline

 

#87 2010-10-02 17:34:31

karlrado
Member
Registered: 2009-12-07
Posts: 229

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

I tried mpd on the DNS, doing HTTP streaming on my local LAN, instead of over the external internet.  Same deal as before - the DNS could not encode fast enough to stream.

I then installed mpd on my SheevaPlug, also on my local LAN.  Still pegs the CPU, which is about twice as fast as the DNS-323 CPU.  But this time Windows Media Player paused while buffering up the first three minutes of content and then started playing.  I'm still playing with it, but it looks like there is still some pausing going on for buffering for each song in the playlist.  So, even the SheevaPlug may not cut it.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#88 2010-10-03 20:25:25

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

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

If you hadn't noticed it....from the mpd site

%%%%
Sidenote: In my (subjective) experience it seems that the CPU usage is much lower when using the built-in http streaming server than when using IceCast. And since I use MPD 24/7 this actually makes a difference.

%%%

So if anything is going to work, it is perhaps the built-in http streaming server.

Offline

 

#89 2010-10-04 18:29:07

karlrado
Member
Registered: 2009-12-07
Posts: 229

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

Yeah, I didn't want to go to IceCast anyway, in case it required a specific type of client.  My longer term plan is to build an HTPC that can do real time video encoding, so something like mdp would be better off there.

So, I am done with this.  Perhaps the discussion helped bigwebb83 get going and perhaps raop will be able to run ok on the 323.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#90 2010-10-27 17:34:35

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

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

It helped me get going but now things have ground to a halt.  It just doesn't look like there's any option available to make this work for me...

Offline

 

#91 2011-01-09 00:21:39

mastervol
Member
Registered: 2008-09-06
Posts: 81

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

ok i tried what was described in this thread and gave up.
the integrated httpd died whenever i tried to connect.
i didn't get in the hassle of configuring icecast though.

so i searched for another solition ... streaming mp3s from the nas with mt-daapd works flawlessly.
at least within the lan, i still have to check via internet.

not very pretty but hey it works.

usage:
ipkg list | grep mt-daapd
mt-daapd.conf is self explanatory

daap media player via code google or. android market


DNS-323     F/W: 1.06  H/W: ??  ffp: 0.5  Drives (normal mode): 1 x 1,5 TB Seagate SATA II ST31500341AS, 1 x 250 GB Western Digital SATA I

Offline

 

#92 2011-01-09 21:07:02

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

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

Yes, but presumably you have a computer turned on to control this, i.e itunes running on a pc which then outputs to speakers/hifi.

The idea here is to NOT have a pc turned on and only have the NAS working, streaming to an apple express which outputs to hifi.  Controlled via smartphone too.

I'm actually hoping the rewrite of mtdaap (forked-mtdaap) will be set up to work on the custom firmware (alt-f), but it'll depend on some smart bugger taking my suggestion and putting in the hard graft smile

Offline

 

#93 2011-07-29 11:46:36

cocomo
New member
Registered: 2011-01-08
Posts: 4

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

Thanks to this thread I've now got my DNS streaming music to them Airport Express. My question is what are people using to update the database?

I've installed mpc to do the update but it seems that the command "mpc update path/to/new/mp3s" isn't working at all. I'm getting no errors in the mpd log and I'm not sure if mpc has one.

Offline

 

#94 2011-10-12 18:08:32

jrmaki
New member
Registered: 2011-10-11
Posts: 1

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

Can anyone play flac files with this setup? I have installed mpd and can play mp3 files with it. When I try to create the database with flac files on the music directory the database creation crashes. I even tried running mpd with a database file created in a Ubuntu box. Mpd starts ok with that database file and can play mp3 files. But when I try to play a flac file mpd crashes. There is nothing useful in the log file even if I run mpd in verbose mode. Can someone help in getting the flac play to work?

Offline

 

#95 2011-10-12 19:55:00

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

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

If I remember correctly, you can enable transcoding in the .conf file.  So the flac gets converted to mp3 on the fly.

I got it working I believe.  I don't use this anymore so can't check, but do search for mpd and transcode, or flac, should turn up

Offline

 

#96 2011-10-12 22:54:52

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

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

Sorry, i'm a big fat liar.

It was forked-daapd (rewrite of mt-daapd) installed on the custom firmware Alt-F, that Idid this on.  I would recommend trying Alt-F, it's very good.  Forked-daapd gives the same functionality as this mpd/roap setup.  Although I must admit I haven't got the remote working...haven't had time to try it for a while.

anyway, sorry for the false alarm

Offline

 

#97 2011-10-14 22:43:03

cubicapple
New member
Registered: 2011-10-14
Posts: 1

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

Hi guys!

I've just set up the MPD+raop_play couple on my 323 and got it working at the first try, thanks to the Kai's excellent explanation and very helpful subsequent discussion.

I've encountered two problems though:

1) (minor) Droid Client crashes every time I touch a folder or a track in its explorer. No problems with other clients (e.g. mpc or jukebox).
2) (major) I can't adjust the playback volume which is very loud. In GUI clients volume controls just don't do anything. In mpc it says 'error: problems setting volume'. I tried switching mixer_type from default to both"software" and "hardware" -- didn't help.

Any ideas?

--
Alex

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB