Since finally getting the BBC iPlayer listen again streams to work by switching over to the AAC streams rather than the WMA streams, it appears that the BBC have broken the AAC streams at their end. I’ve (temporarily) switched back over the to WMA versions, which work, but that I (still!) cannot seek within.
After quite a lot more experimentation, I’ve completely failed to get seeking within iPlayers WMA-based “listen again” streams to work. Although I’ve yet to prove it definitively, it seems that the Squeezebox Server code doesn’t support seeking within such a stream – flagging my transcoding command line as being capable of seeking, and then using the GUI to attempt to actually seek in the stream doesn’t result in the Squeezebox Server passing the seek location to my transcoding command.
More research into WMA streaming seems to indicate that passing the seek command from a client to the server is not trivial on non-Windows platforms, and appears to be based on a collection of proprietary and less-than-well-documented dataflows.
So my (completely unsubstantiated) suspicion is that Squeezebox Server running on a non-Windows platform (like mine) doesn’t support seeking within WMA streams.
However, there is always another way. And in this case, it transpires that not only do the BBC stream their iPlayer radio streams as WMA, but also as AAC, which is a codec that is significantly better documented and supported on Linux. So by simply changing the preferences within the iPlayer plug-in it’s possible to switch to using the AAC streams, which are supported by both my Jogglers and my Classic player. Better yet, it’s possible to also seek within the “listen-again” versions of those streams. In short, it all now “just works”.
Although I’m now using AAC streams for iPlayer access, the work that I put into getting WMA streaming to work with the Jogglers hasn’t been wasted, as there are other Internet Radio stations out there that do only broadcast in WMA, and this transcoding solution allows me to access them too.
And finally, unlike the Jogglers build-in Internet Radio application, the Squeezeplay application buffers enough content (irrespective of codec) to completely avoid skipping and audio drop-outs. Perfect!
After a lot of trial and error, I now have the Jogglers able to cope with WMA streams, which is to say that they can now play the BBC iPlayer Internet Radio streams. There are a few limitations, but I finally feel like I’m getting somewhere with the problem.
The solution is (as expected) to transcode at the Squeezebox server, converting WMA streams destined for the Jogglers into PCM streams. However, working out exactly how to do that has involved quite a lot of trial and even more errors. Ultimately, on my Ubuntu based server, I only needed to create a single file – /etc/squeezeboxserver/custom-convert.conf.
the transcode that I am describing, and the device for which this must take place. So, WMA to PCM, for a device with a given MAC address.
the capabilities of the external transcoding application described in line 3. Refer to the comments in the convert.conf file in the same directory for what the codes mean; in this case, that this transcoder can cope with both files and remote streams.
the command line to do the actual transcoding. The syntax is a little odd, as mplayer has no obvious way to write PCM to stdout (which is what is required), but using /dev/fd/1 as the output file achieves this admirably. $FILE$ is substituted with either a filename or a URL depending on the source of the WMA that needs to be transcoded; either is acceptable to mplayer.
Squeezebox server doesn’t seem to correctly clean up the transcoding processes, and leaves them running in the background. It’s not clear to me when (or even if) they ever get terminated, and if so, by whom?
It seems to me that when playing back a “listen again” stream, I ought to be able to seek backwards and forwards in it. Unfortunately, this doesn’t work. The stream simply restarts from the beginning, which is frustrating. Adding the additional substitution code into the custom-convert.conf file to enable start time offsets to mplayer doesn’t improve the situation, and in fact, seems to usually break the (currently working) transcoding of the WMA streams. I’ve exhausted my debugging of this, and posted for assistance on the Squeezebox server forums – I’m beginning to suspect that it may be a limitation.
Having lived with with a Joggler in my study for about a week now, I’m starting to get a feel for its strengths and weaknesses. In theory, it’s a great little tool to have instantly available, with instant access to Internet radio, my audio collection, the traffic conditions, news headlines etc.
But in practice I’m making very little use of any of the built in applications; the Trafficmaster-based travel application is kind of interesting, but the SatNav in the car does a better job at the point in time when I most need it. The RSS-based news reader is OK, but it’s based on what the Sky news people think will be of interest, and often I don’t agree with them. The weather forecast application is pretty enough, but can’t be sufficiently localised, and has a bug that means the upcoming days are sometimes out of sequence!
The Internet radio application is undoubtedly the one I use the most, usually for the national BBC radio stations, but unfortunately it doesn’t buffer enough content, and often stutters and falters. But it is very convenient and easy to use.
On the other hand, the Squeezeplayer application, which turns the Joggler into a Squeezebox, is a joy to use. The touchscreen is beautifully integrated with it, and the ability to rapidly “flick” through my music collection, along with their album art, is simply joyous. There are down-sides however. Integration between the Squeezeplayer application and the main O2 “Tango” GUI is basically non-existent. The Squeezeplayer application simply runs over the top of the rest of the GUI, taking over completely. This means that they run independently with different time-outs, screen-savers etc, which can be a little confusing. However, I can easily forgive it that when I get another Squeezebox for only £50.
However, the Joggler isn’t a perfect Squeezebox replacement. The Squeezeplay application doesn’t have the same support for native audio formats as the hardware players – so while it has excellent support for MP3, and supports PCM/WAV/AIFF & FLAC even at esoteric 24bit 96KHz rates, it cannot play WMA files/streams in any form. Which unfortunately means it doesn’t support the BBC iPlayer plug-in. This is frustrating, as I suspect that the Squeezeplayer will do a much better job of buffering Internet radio streams than the native Joggler application.
So the question is, how to enable WMA support?
My initial thought was to enable WMA support in the basic Joggler OS (which is just Linux), with the expectation that it would be possible for the Squeezeplayer application to trivially exploit that support. The problem with this approach is that Squeezeplayer is really an embedded application; it’s not designed to run on an operating system with varying capabilities, and expects instead a bare minimum, to which it must supply all the domain specifics – ie, the audio decoding. So even if I did supply WMA support in the OS, the Squeezeplayer application wouldn’t exploit it without me making significant changes to Squeezeplayer. It’s basically a non-starter (for me anyway).
The next option is based on the understanding that Squeezeboxes (and hence the Squeezeplayer application) do not directly talk to Internet radio stations. Instead, they talk to a Squeezebox Server, which acts as a proxy for the Squeezeboxes, and talks to the Internet radio stations on their behalf. Fortunately this allows us to apply transcoding to the Internet radio stream, decoding it from the original format, and re-encoding it into another format that the Squeezeplayer can process.
This has potential, except the documentation is poor, and all my attempts to date have resulted in the Squeezeplayer “hanging” at the point where it is starting to stream the Internet radio stream. Debugging information seems to be telling me that the right transcoding options have been identified by the server, and that the correct external programs have been located. What’s not clear is whether or not they are being correctly invoked. More work to be done!
As I mentioned in my last post, there was a period of time where I believed that my Squeezebox 3 audio player had terminally died. This seemed at the time to be a complete disaster, because Logitech no longer service, nor sell them. Fortunately, I was rescued by a colleagues superior electronics skills, but in the meantime I’d started investigating what options I had for replacing my Squeezebox. The obvious choice was to purchase either a new Logitech Touch, or Logitech Duet system, both of which are essentially plug and play replacements for my (older) Squeezebox 3. However, at more than £250 each, this would have been an expensive option, especially for a device that I was not terribly taken with.
A more interesting option was the discovery that it was possible to take the control system software from the Duet, and port it to a generic Linux computer. This would allow that computer to act like the Duet system, at least functionally.
The really interesting discovery was that people were running this on “hacked” O2 Jogglers creating their own Squeezebox Touch, but with a bigger touchscreen display. Given that Jogglers can be purchased second-hand on EBay for around £50, this proposition starts to look very attractive indeed. The only drawback is the lack of high quality audio outputs.
However, this can be easily resolved through the use of a USB DAC, which can be connected between the Joggler and an amplifier, to provide very high quality audio out – potentially much better than that provided by my existing Squeezebox 3. Something like this HRT Music Streamer II would be perfect.
In the end, I no longer needed another very high quality Squeezebox, but the opportunity to add a couple more “adequate quality” Squeezeboxes, at very low cost, was too good to miss. I acquired a pair of second-hand Jogglers, added the additional software to them and plugged some powered speakers into the headphone sockets.
The result is “good enough” music/video players for my study and the kids playroom, that can also do interesting things with various internet-based applications (calendars, news, weather, mapping etc). Result!