Liam Pool's picture

Hi all, 

first, I'm very new to this forum and I have tried to search but nothing seemed to fit. I've been out of the linux world for a while (I have been running a debian file server from home for ages, but have not done much to in latley)

I've bee charged with buidling a new server box for my inlaws R/C Car club. thye use it to host the results of the races on at the local track. I'm fine with getting all the basic going, thank to an easy LAMP installation + samba and getting the hosting to work. so bar it's been brilliant. 

Where I would like some help with is to build an audio player in the server so the output is from the local sound device on the server. This will be a headless box so the controll will need to be from a web interface. The other reason the control needs to be via web interface is because the person running it does not want to be typing commands all day, they need to be able to click to start and stop. 

Bonus if there is some way of making a playlist / queue on what to play next. 

I've spent the last 2 hours googling and havent had much luck as I'm not sure i'm phrasing the search request in the right way for google to understand. 

Any help would be appreciated. 

Liam Pool

Forum: 
Jeremy Davis's picture

I'm not sure about web control, but there is a lot of software these days that can easily be controlled with a Smartphone app. I have an Android phone so I can't speak for iPhone, but there is pretty much at least one app for most of the popular Linux music/media players. OTTOMH Banshee, Amarok, VLC and XBMC all have at least one app (but probably more - XBMC which I have been playing with lately has 4 or 5 to choose from last time I checked...)

So I know it's not really answering your question, and I guess with most of them, it may require some extra stuff (like installing X etc) but thought I'd put it out there! With the XBMC remote I've been using (the 'official' one) it cool, especially for music because you can have the screen off and adjust volume, cue songs up to play next, check out album artwork, etc. Speaking of XMBC, AFAIK it can now be installed headlessly, although as most would use that config as a media server (rather than a media player) I'm not sure how your scenario would go with it?

Going back to your original thoughts, I have never come across something specifically like you're after, but surely it must be possible. Just a case of finding some software that can do it (or perhaps building your own if you're so inclined...?)

Jeremy Davis's picture

I've been thinking some more about your request and thought I'd just give it a quick google. And it seems that there is no shortage at all of 'jukebox' type software. Some is commandline (so you could control it over an SSH connection easily), some uses a client-server model (so you have a desktop app that connects to your server) and some is what you were explicitly asking for with a WebUI. I can't vouch for any of it (I didn't know that any of it existed before I got on google) but I'm sure with a bit of sifting and testing you will find something.

Be great if you could post back with what you went with, why and how easy it was to install, configure and use. And even if you could document your installation and post that back too! I sense a TKL Jukebox appliance coming on!! :)

Oops almost forgot the links!:
http://www.tuxarena.com/2011/12/10-console-music-players-for-linux/
http://www.linuxlinks.com/Web/Multimedia/Jukebox/
http://en.wikipedia.org/wiki/Music_Player_Daemon
And I'm sure that there's more, these are just the first few of interest that showed up!

Liam Pool's picture

HI Jeremy, 

Thank you for your help so far. 

After I made the post I found one that appears to work. (I'm running it on a virtual server atm during the design and testing phase - about another 2weeks max).

I instaled vlc and sound a site that said if you open up the server address (either name or IP) and view port 8080 (192.1.1.1:8080) you will get a web control interface. You do need to edit the hosts file to allow the network segment you are on access to the server. 

2 things with it so far - It's very slow and clunky and the other is that as I"m on a virtual server, i'm not sure if the sound is actually working - I think I have the sound device configured wrong.

Alot of the ones I initially found online would be a jukebox, but would not output to the audio on the server, but stream to a remote device - not what I need for this. 

Sorry for the slow reply, I was out at my grandfathers 90th birthday dinner last night that was almost 2 hours away. I"ll look at the links you have posted when I am fully awake again.

The idea that you will arrange a plug in module will be ideal for my situation, as then it would give full control to the person running it, a single site to go to and control everything, rather than multiple adresses. 

The person running it does have an iPhone and he uses that at the momnet to play the music over the PA but he finds it annoying when he has to be on the phone and no music is playing, so he has requested it all happen from the PC. 

Once more, thank you for the help, and I look forward to any more advice / info you can provide. Linux is not my native OS so it's always a fun chalenge getting into it. 

 

Liam

Liam Pool's picture

Hi all, Thought I'd post back here with an update now I have my hands on the physical box we are going to be running this on. I'll make it as broken down, step by step as possible (but more then likely there will be something I miss - sorry) Please also understand I am not very experienced with Linux, so this is cobbled together from reading other forums and asking my good friend Google on what to do, so it may have some steps that are not needed as well. 

Earlier in this thread, I was planing on using VLC, but I found I Was not able to understand how to configure it so it could see the soundcard, so I did what every good 'hack' does, scrap it and find something else :)
 

Here is the process I found that works

  1. Install tuenkey LAMP server from USB Key (prepare usb Drive with unetbootin - http://unetbootin.sourceforge.net/ and your preferred ISO file)
     
  2. Configure the base netowrking via the server console to ensure you have internet access - It's fine to let your own networks DHCP server assign the address at the moment, but we will need to change this later on.
     
  3. For my use I needed a user to be able to copy files to the server from a windows machine, so I installed Samba
    apt-get update
    apt-get install samba webmin-samba

     
  4. I'm also going to be using this box as a DHCP server so I instaled the approperate modules.

    dpkg --configure -a
    apt-get install bind9 dhcp3-server webmin-bind8 webmin-dhcpd
     
  5. I had found that the TKLAMP server did not have any audio modules installed (ALSA). So I had to get them installed. I'm stupid and couldn't work out the actual module name, so I installed aptitude
    apt-get install aptitude
     
  6. Run the aptitude
    aptitude
     
  7. This is where I Failed to document exactly what I did (late night tired and not sure what I was doing = no documentation kept)
    I think I installed the Alsa files - again not sure what one, but I hope that gives you a heads up
     
  8. Next was to install the MPD player (Stolen from: http://mpd.wikia.com/wiki/Install)
    First, edit /etc/apt/sources.list and enable the 'universe' repository.
    apt-get update
    apt-get install mpd

     
  9. now we should have all the modules installed we need, we can configure the server how we need it.

    1. re-configure your networking if needed - for me this will be a stand alone serve on it's own netowrk, not connected to anything else, so I removed all the pointers for DNS and gateway. 
       
    2. Configure the users
       
    3. Configure the samba shares. I created a new folder in /usr/ called Media and shared it via samba so a user can write to it.
       
    4. Configure your apache as you need it.
       
    5. Configure MPD - edit /etc/mpd.conf and change the line:  music_directory and point it to the location of your music store
       
  10. upload media files to the samba share for the audio files
     
  11. I tried a few different interfaces and this one I felt was the best, it would pick up media files f from the server with out having to re-build the DB.  http://mpd.wikia.com/wiki/MPDamp download it and copy the files to a space on the apache server
     
  12. Do any other configuration you need like set up webmin users and any other configurations you need. 

Hope this helped. We are going to do a beta test of the system tomorrow and do any final configuration needed. 

Thanks for the help people have put on here. Jeremy You're hint that there was other ways is wat set me on the track to find the solution, so a big gold star for you 

Logan Blackman's picture

Hii Liam

I can help you for making playlist in Lamp Box without any PHP skills. so here's a simple way of making a playlist or queue in an audio player (LAMP box) without using PHP:

  1. Create a text file in the LAMP box that contains a list of audio files.
  2. In the audio player, read the text file and extract the audio file names.
  3. Store the extracted audio file names in an array.
  4. Start playing the first audio file in the array.
  5. When the current audio file finishes, play the next audio file in the array.
  6. Repeat this process until all audio files in the array have been played.
  7. If the user wants to skip a song, simply move to the next audio file in the array.
  8. If the user wants to add a new audio file to the playlist, simply append the new audio file name to the end of the text file.

This is a simple way of creating a playlist or queue in an audio player without using PHP. I hope these points can help you. 

Thank You

Jeremy Davis's picture

And a big gold star right back at you! :)

Thanks heaps for posting back. A quick browse of the MPD wiki and I think I have just discovered a server that I never knew I needed until now!! And with Android iPhone and GTK remote clients what a winner!!

Add new comment