ic: website ic:blog
  ic: website Home · Archives · Photo Gallery · ic: forum RSS logo - thanks to www.nineteenlabs.comWeb feed (RSS)  
The life and times of james Hart: his family, his music, life in Luton and his occasional escapes onto the internet.

« Vive La Difference (in Luton..!) | Main | Hemel Hempstead Snow Centre - and Santa! »

Tuesday, 8 December 2009

BBC iPlayer on the Goodmans internet radio (and elsewhere!) - techie

The BBC iPlayer is an amazing thing - not only can it play live and catch-up TV and radio programmes on a computer, but it is now available on all manner of gadgets, from Nokia mobile phones to the Nintendo Wii. This latter option has been an absolute wonder, since we can now catch up on practically any BBC programme on the lounge TV without having to plug in a laptop or watch on the mac from the kitchen table. It's easy to install, since it appears as a free download in the Wii Shopping Channel.

The interface designers have done a fantastic job of making it easy to use; the Wii version is amazing, since it uses the Wii-mote controller to select programmes from an interactive menu, and even on the tiny screen of my N95 it's quick to find and play the programmes I'm interested in. If you get the chance, then, it's always worth seeing if the iPlayer's supported on your portable device (unfortunately, we're not quite there with our Samsung i600 - it's Windows Mobile Smartphone 5, which is a bit old to be supported, I think).

One device that has - until now - been sadly devoid of such function has been the internet radio in the kitchen. The reason for this is that the system by which on-demand content is generated has changed substantially since the Penbex directory was created. For a start, the rather annoying (and poor quality, in my opinion) RealAudio system is no longer used - MP4 (for video) and AAC (for audio) are the preferred formats, both of which use a clever Flash player that decrypts the stream, for security.

I've been waiting, therefore, until the 'legacy option' - Windows Media - is supported. I've known for a while that the Coyopa system (the BBC-end of which is supported by my department) generates WMA files, but the distribution beyond the BBC hasn't been ready. That's until now.

BBC Audio & Music Interactive have published the means to gain access to the material they supply - I believe manufacturers and suppliers need to sign a 'non-disclosure agreement' to gain access to it - and I made it my project, over the weekend, to write an automatic script to read the on-demand availability file, and format it so that the Goodmans CD1505Wi radio could play it.

In fact, given that the radio uses fairly straightforward comma-separated lists of station name, stream URL and type, it was fairly straightforward (if a little time consuming, since my Linux shell scripting remains rusty, since I don't write it all the time!) to create an A to Z list of available programmes for each national network. Slightly more complicated was making it a little easier to navigate, since the four-line text screen isn't really very versatile, but I managed to do something which generated a separate comma-separated file for each day, and listed each title in time order, with the start time at the left-hand side.

Of course, creating the text files was enough of a challenge, but getting the radio to see it was another matter entirely! The original firmware automatically points to the Penbex server for the first continent-based list (stationcn.penbex.com.tw/island.csv). This is maintained by the system developers, and although it is possible to submit stations for them to add, it is not possible to remove stations, and, although I've been in contact a few times (for example, to have the defunct BBC Radio RealAudio streams replaced with Windows Media ones), submitting updates via email is not ideal.

An enterprising radio owner - William Jansen (who kindly contacted me through an earlier comment, and has a blog of his own at penbex.wordpress.com) - has modified the firmware to use his own directory at penbex.mine.nu, which is more interactive - in fact, he has been kind enough to make me a moderator, so I can make a start on maintaining the 2,000 or so UK radio stations. His directory is organised in a very similar way to the Penbex one - it has continents (plus internet only and a user-submitted list of 'private' stations, which enables addition of bespoke stations, and is really useful as an alternative to the internal 'favourites' list, which is limited to twenty items), then countries, and underneath that, there is a list of radio stations.

However, the original Penbex list has an additional layer, where, instead of a station stream, a comma-separated file can be linked to, containing alternative connection options and interactive content. William is looking into implementing this, which I can then link to my automatically generated list. Over the weekend, though, I needed to find an alternative means to do this.

My dear mate Jon (who was visiting for the weekend, and therefore got roped into trying to solve this conundrum!) worked through all the possibilities - and some rather nifty network traffic analysis using Wireshark. The trick I eventually settled on was to get my router (a Linksys WRT54G - one of the definitive home routers, since it runs a version of Linux that can support different firmware; I'm currently using DD-WRT, which is so versatile you can even use it to create a separate wireless hotspot for guests!) to point all requests for stationcn.penbex.com to my home webserver, and create my own, slightly modified islands.csv file that includes an 'On Demand' link to my CSV files. I also cheekily included a Hart Family Favourites list, so it's quick and easy to find and play our own stations. Here, then, is a video of my version of iPlayer for the Penbex Internet Radio:

(Flash video - 4MB)

I am, of course, very happy to share the script I wrote. I've got to double-check that the xml file locations are publically accessible, and will link to it on this blog post when I know it's OK to do that - it's just one single script, using built-in Linux functions, and all the folder names can be defined based on the file structure.

For the time being, though, it's nice to be able to listen to any BBC Radio show in the kitchen without having to resort to a PC - it's one of the reasons I bought an internet radio in the first place!

Posted by james at December 8, 2009 9:29 PM

This site is owned and operated by Image Communications, including all content and stuff.
It's powered by Movable Type 5.2