Monday, September 16, 2013

Using a Raspberry Pi as a media server

Just got a Raspberry Pi. Pretty sweet. So far I like it.

I've had this post as a draft for quite a while, planning to make some great interesting post, but I've run into quite a bit of trouble trying to find a reliable setup that I liked, and that worked.

Here's what I've got that works ok so far:

First off. I don't have that big of an sd card(which is like the hard drive) for my pi. and all of my music is on my desktop computer. First thing I do is use sshfs to gain access to my music.
$sshfs desktop:Music/ Music/
I use public/private rsa keys to connect so I don't need a password. I also have the desktop computer's ip defined in my /etc/hosts file. For any help check here.

Now that I have access to my music, my most used tool is cmus. It is a music player that supports a music library, has vi like commands, and runs inside a terminal. There are others out there, the first I tried was MOC, but after trying cmus I switched.

After logging into my pi via ssh. I run tmux.(more info about tmux here.), then run cmus, find the music I want to listen to, start playing, then detach tmux, and I can then exit ssh.

Another option. If you wanted to control your music from say... your phone. Then I would use:
$vlc -I http ~/Music/
This will run vlc as an http service, the the Music/ folder as the main library. I was using this but I have a large music library, and it was hard to navigate very well. If you specified the folder with all the music you would like to listen to I think this would probably work better.

Currently working on running the nuvola music player, then using nuvolaplayer-client to control it from another computer. If I get it working I will definitely update.
=================
UPDATE: I just installed OpenELEC on my raspberry pi (It runs xbmc). It's easy to set up. I would recommend this method if you are going to be using it for different types of media.

No comments:

Post a Comment