You are not logged in.

#1 2008-01-26 04:32:41

raul_nds
Member
From: Lisbon, Portugal
Registered: 2007-06-28
Posts: 258

How do I setup mpd + remote access?

I see a lot of people using mpd to play their songs locally, but I want to take this a step further, and be able to access my music database from anywhere, not just on the local computer.

I understand that mpd allows this, but my doubt is more on "remote access" part. Like, not having a static ip, how can I set up a SECURE entry point?

BAsically, i was thinking on leaving my desktop at home running, with all my music stored, and be in college, with my laptop, and be able to use Sonata, or another graphical client to listen to my music at home.

Is this possible with SSH? Is it worth the trouble? I don't really need it, I just thought it would be fun big_smile also, if possible, and if any of you guys did this, how about the quality? In my head it makes sense that you have to "download" the music from the "server", how is the speed via a ssh connection?

Thanks!

Offline

#2 2008-01-26 05:11:49

_adam_
Member
From: Dora, Alabama
Registered: 2006-05-18
Posts: 94

Re: How do I setup mpd + remote access?

You'll need to set up icecast and configure mpd to output to the icecast server(gotta remember to turn the volume down or disable the hardware output in mpd or else it'll still be blaring at home big_smile ). From there you'll need a client(pretty much any audio/media player will work) to connect to the icecast stream. Since I already have an ssh connection open to my machine all the time I just use ncmpc in ssh to set up playlists in mpd(It's also one less port to have to forward). AFAIK, mpd and the mpd clients communicate cleartext(don't quote me on that, I haven't taken the time to tcpdump it yet), so even if you set a password in mpd, its still not secure. Maybe you could tunnel it but that would be even more trouble.

As for your dynamic IP, set up an account on dyndns and use ddclient to keep your ip updated.

Last edited by _adam_ (2008-01-26 05:13:30)

Offline

#3 2008-01-27 02:00:12

raul_nds
Member
From: Lisbon, Portugal
Registered: 2007-06-28
Posts: 258

Re: How do I setup mpd + remote access?

Thanks for your response! big_smile

It's a cool solution you have there, but that's cheating a little right? Basically you have to have a console, and you're managing your playlists with your ssh connection at home.

What I want is, for example, open sonata, specify my host name (I have one now), the port, password, and access my .mpdconf, having my Library on my remote computer. Is this possible?

So far I have:

-mpd running at home
-a hostname (via DynDNS) that I can ping remotely

So i guess what's missing is:

-allow connections
-figure out (or specify) which port to use
-figure out what the hell does Sonata mean with password! password for the remote server? how is this possible without a user? oh wel..

Offline

#4 2008-01-27 02:28:34

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: How do I setup mpd + remote access?

I'm not an expert by any means, but if mpd is designed to workout side the the LAN thing should be good

1. Get an account with dyndns, get software to update your ip, ez-ipupdate (aur) can do this
2. Setup port forwarding to whatever port mpd is running on (should be in /etc/mpd.conf)
3. If there is a listen section in the config you might have to change the localhost part, to your LAN IP (192.168.1.3)
4. Set password in mpd config, so others can't gain exclusive access to it ( I don't think you need a username IIRC)
5. In sonta set the host to yoursupercoolname.dyndns.org (whatever)
6. Fill in password info, etc...

The main thing you got to make sure you do is setup that port forward or you won't get far. College might block the default port of mpd.

A few ports that are typically open:
20 + 21 (FTP)
37 (at least at my school)
80 (HTTP/WEB)

20 would probably be the best if your school blocks the default mpd port....


Website - Blog - arch-home
Arch User since March 2005

Offline

#5 2008-01-27 02:52:40

nj
Member
Registered: 2007-04-06
Posts: 93

Re: How do I setup mpd + remote access?

I don't believe mpd will do what exactly what you want it to do. The reason is that mpd is designed to play files only on the machine that it is running on. Clients, such as Sonata, do not receive any sound data from mpd. To play songs remotely, you'll want to set up icecast to stream. Port forward both the mpd port (default 6600) and icecast port (default 8000) via ssh. Then you can connect to localhost:6600 in Sonata and http://localhost:8000/mpd.ogg in any player.

As for the speed, mpd reencodes all data into ogg format for icecast using the bitrate you specify in the mpd.conf file, so the quality is as good or bad as you want.

Offline

#6 2008-01-27 03:42:49

raul_nds
Member
From: Lisbon, Portugal
Registered: 2007-06-28
Posts: 258

Re: How do I setup mpd + remote access?

"Music Player Daemon (MPD) allows remote access for playing music (MP3, Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists."

It says REMOTE access...for me remote is "far far away"

=\

Offline

#7 2008-01-27 04:53:40

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: How do I setup mpd + remote access?

Oh my how could I miss that. MPD play on the computer that the daemon is installed. So what you want won't work unless you want to spoke your girlfriend/wife when you computer just starts playing music. What you looking for is something like a icecast as _adam_ has said.


Website - Blog - arch-home
Arch User since March 2005

Offline

#8 2008-01-27 04:58:05

raul_nds
Member
From: Lisbon, Portugal
Registered: 2007-06-28
Posts: 258

Re: How do I setup mpd + remote access?

Hmmm I get it now. I guess I overestimated mpd then big_smile

So I don't really need any mpd client to listen to the strem. The clients are only for local access?

Offline

#9 2008-01-27 05:00:37

WiLLiE
Member
From: Sweden
Registered: 2005-02-27
Posts: 135

Re: How do I setup mpd + remote access?

MPD plays files local on the computer MPD is running on (or mounted samba/ntfs/etc shares).
MPC/other client controls MPD remotely. On the other side of the world if you want.

The sound is still playing on the computer where MPD is running.
If you want sound elsewere, do as other have suggested, and run MPD with icecast to stream to remote computers.

edit: a bit late but whatever..

Last edited by WiLLiE (2008-01-27 05:01:58)

Offline

#10 2008-01-27 05:44:45

raul_nds
Member
From: Lisbon, Portugal
Registered: 2007-06-28
Posts: 258

Re: How do I setup mpd + remote access?

Thanks for your replies guys. Actually I misunderstood the "remote access" part. It make more sense to me to acess my music from China and play it there, than to access my music from China, and play it in Portugal. Nevertheless, when I have the time i'll try the Icecast solution.

See, I don't really need it, because I have an iPod, it's just the geek side speaking big_smile

Offline

#11 2008-01-28 13:30:36

gejr
Member
Registered: 2007-05-23
Posts: 92

Re: How do I setup mpd + remote access?

I highly recommend kPlaylist. (It has nothing to do with KDE)

It's not exactly the same, but it's awesome and allows me to play the music at home anywhere. It's a php script, that streams music over http. Can't be easier, and it's accessible from windows, linux, mac, whatever. No other open ports needed than port 80.

Check out http://www.kplaylist.net

And a screenshot here smile

Offline

Board footer

Powered by FluxBB