I got one of mine working pretty well for a single-URL web radio.
I just used Raspian, which is pretty much my "reference" for doing anything quick and custom as it has a nice big software repository.
A unique thing I did is that upon boot-up, it checks to see if a HDMI display is connected to it, if there is, then it assumes I want to use the RPI for something else and boots into the default LXDE GUI desktop. If it senses that there is no display it then shuts down the GUI and runs a script that goes something like this:
Code: Select all
while true ; do
omxplayer -o local http://<insert your web radio url here>
So yes, you can use omxplayer for web streams and it might use the GPU for decoding the audio.
I need to improve this because I have the customized "boot mode" decision happening in /etc/rc.local which happens AFTER all the GUI and other services are started up that I don't need, so therefore it takes a lot longer to boot up than it should. What I should do is create a separate sysV "run level" for it (say run level 3, where 2 is the default GUI mode) that then makes this decision out of "rcS" and avoids loading up all the stuff I don't need, only to shut a lot of it back down.
Oh and I have "espeak" announcing what WiFi network it connected to and its IP address before it enters the above web radio infinite loop.
In my case have one of those tiny USB Wifi adapters often sold as "compatible RPI accessories" from RPI dealers plugged into a model A, then powered by a cheap DC-DC converter that is then slaved off the 12-volt battery that is already in my home-made "boom box" portable amplified stereo speaker system, so the thing is totally wireless and portable within my WiFi range. For most people simply plugging the RPI into a set of amplified "computer speakers" may serve their needs.
When I first got my first RPI (I was in the 2nd batch made, 1st batch of 10,000), the firmware was too young such that the audio out of this thing was terrible. Now it sounds fine to me despite others claiming that it may only have 11-bits of dynamic range.
I've also substituted the above script for one (more messy) script that uses the clever "pi-fm" program to then rebroadcast the stream on an FM-Broadcast channel so I can then just use a normal FM radio to hear it. This works amazingly well too (other than very occasional "glitches" in the audio), but it only broadcasts a mono signal.
Anyway if you need more details on how I did any of this, let me know, maybe I'll have the more efficient "sysV run level" version of it running by then.