Posts: 102
Joined: Thu Jan 07, 2016 1:28 pm

remote mp3player

Sat Feb 20, 2016 6:33 am

i wanna create a html page on my such that
it should display all files in /media/musicPD
and for example from the displayed file names i click on
123.mp3 it should play that mp3 on local headphone jack (maybe using omxplayer)
how should i do this?

Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: remote mp3player

Sat Feb 20, 2016 9:52 am

One step at a time
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

Posts: 102
Joined: Thu Jan 07, 2016 1:28 pm

Re: remote mp3player

Sat Feb 20, 2016 11:21 am

elatllat wrote:One step at a time
its one step only i guess :o
okay so basically i wanna play music through a web page

Posts: 131
Joined: Fri Jan 01, 2016 2:45 pm

Re: remote mp3player

Sat Feb 20, 2016 2:25 pm

I did exactly that years ago on an old laptop which I used to drive our stereo. I wrote in PHP because I was interested in learning PHP at the time. Or maybe I used mod_perl. I'm no longer interested in PHP and find no need to sharpen my Perl skills these days so I would probably choose Python. There's an outside chance I might choose Java and write it as a back end for an Android and/or IOS app.

I just checked my backups and find the file is still there. It's in mod_perl. I could make it available to you if you would be interested in using it as a starting point. Looking deeper, I might have PHP and mod_perl implementations.

Here's the steps I followed IIRC (and guessing from looking at the files. It was about 12 years ago.)
  • Install a web server, probably apache, and configure PHP and mod_perl. I would probably look for a lighter weight server for RPi.
  • Install a database engine. I used MySQL which was popular at the time. I think I'd go with SQLite today.
  • Write the code which populates the database of the music collection. (probably not a web app.)
  • Write the code to put up a web page and query the database in various ways to select music to play.
  • Write the code to put selections in a play list or queue of some sort.
  • Write a back end that would pick music off the queue and play it. (Probably not be a web app.)
  • Write a web page that would allow me to control the player (start/stop/pause/skip.)
If all you want to do is get a music player going and have no interest in developing a web page or learning all of this stuff, I would start searching 'the usual subjects' (Bitbucket, Github, etc) for something that will meet your needs.


Posts: 131
Joined: Fri Jan 01, 2016 2:45 pm

Re: remote mp3player

Sun Mar 06, 2016 11:36 pm

Or just install mpd in Jessie or Jessie Lite. I tried Pi Musicbox and (A ready to write .IMG file which uses mopidy) and mopidy on Jessie and struggled to get either working. Tried mpd and it is looking good!

User avatar
Posts: 386
Joined: Thu Aug 30, 2012 7:19 pm

Re: remote mp3player

Mon Mar 07, 2016 8:58 am

I use Picore on a Pi1.
I run Logitech Media Server software on my main desktop Ubuntu in the loft, it has 65GB of music on it, the picore acts as a player for the music on the Desktop. I control it with an Android app called Squeezer. Works beautifully. Of course it needs two computers, but I dont see why you couldnt have another Pi as the music server running Logitech Media server, its available for the Pi. you can also control Logitech Media server from a browser as well if thats what you'd rather do. It also supports podcasts and streaming radio stations.
Pi 2 running LibreElec Krypton, Pi 2 running Wheezy Desktop, Pi 1 headless Wheezy, downloading Radio, Pi 1 running Picore headless Media Server, Pi Zero to be an Old Time Radio Project. Pi 3 testing. Pi Zero W downloading Radio shows headless.

Return to “General discussion”