BBC radio stations on the iPhone

Updated to add FStream. This is recommended by a commenter, and again I’ve not tried it. Mixed reviews, suggesting a few problems, but it’s free – so it’s probably worth a shot, eh?

From time to time, I get emails asking if I’m ever going to make an iPhone version of the BBC Radio Widget. The answer is always the same – I’d love to, but the iPhone doesn’t natively support the formats that the BBC broadcast in. That’s because the BBC only broadcasts in RealPlayer, Windows Media and Flash-wrapped formats, which are not only closed but not really licensable; you have to wait for the appropriate plugin from each vendor – Real, Microsoft, and Adobe – to be available on your platform.

Now, that’s not entirely true, as there are open source projects which have reverse-engineered RealAudio and Windows Media Audio. Getting them to work on the iPhone, though, would be totally non-trivial and well beyond my abilities. However, it seems like an extremely select few of the available iPhone radio apps actually have managed such a feat! The apps which should be compatible are:

(All prices are correct at time of writing.)

There may be more, but they’re the ones I’m pretty certain about; blowed if I’m paying for a bunch of apps just to test them! Of these, I’ve only actually tried Internet Radio Box, and in brief testing it seemed to work solidly – even if the interface was a bit ugly and awkward. For the price, it’s hard to complain.

There are some caveats to this. Firstly, the format each of these seems to have implemented is Windows Media. The problem with that, is only the dozen or so major national stations – Radio 1, 2, 3 etc. – are available as WMA. Local stations aren’t streamed in that format, only RealAudio, so you’re out of luck with them… but you can still listen to the cricket (Five Live Sports Extra).

Secondly, I have no idea if these stations will work for you outside the UK. RealAudio streams are available worldwide, Flash streams aren’t; but I know nothing of the WMA streams. So, no guarantees.

Finally, and least importantly: just because the application is compatible, doesn’t mean the streams are listed by default. You might have to add the locations of the stations yourself. If that’s the case, the easiest way is to browse the BBC Web API; click on “More Information” for a channel, then “Get Locations”; you’ll need the windows-media url. Update: Commenter Hywel has done what I was too lazy to do, and collected the urls together below. I do know that at least Internet Radio Box includes them in its built-in directory already.

I’m quite impressed to see that some apps have gone the extra mile to get these annoying formats working, because I think it’s an order of magnitude harder than just supporting the native formats (MP3, AAC) as most do. Oh, and no-one’s paid me to advertise their app, either. Unfortunately. :)

eBay’s fraud problem

I realise this isn’t exactly news, but one more small voice can’t harm: eBay is dying. Slowly, messily, rotten with scammers and spammers and all the low-life scum who are the reason we can’t have nice things.

A year ago, I sold a MacBook on eBay. I had a couple of “Would you end it early?” offers, but nothing worse. The eventual buyer was happy, I was happy, and I rather enjoyed the experience.

This year, I sold an iPod and a broken Mac mini. Woah. One bid cancellation (a perfectly sane bid, which the guy left in place for 24 hours, not the “wrong amount” as he claimed), one request to ship to Cyprus (despite my clear terms stating no international shipping), complete with petulent retort when I pointed this out! One request for German postage, but this sounded more legit. Still refused. Two offers of cash to end the iPod early (for way below market value; I guess it’s worth a try, eh?). And that’s just what I can remember. I enjoyed it rather less.

A friend of mine sold his old iPhone today. Not only has he spent the last week politely telling people wanting to do dodgy deals and international shipping (probably to some distant relative in Nigeria) to fuck off, and not only did he have a fellow withdraw a bid because he “couldn’t contact the seller” (my arse) which eBay essentially ignored after having it reported – but when the iPhone finally ended it was to an American account. Registered the previous day. Which had no feedback. And had been bidding on high priced electronics.

Clearly a scumbag scammer. It happens. What shocked me was that his second place bidder was almost identically positioned – except that he’d been even more prolific, bidding on dozens of items in the last day.

One of the accounts was no longer registered within an hour of the auction’s end.

Fortunately, in this case the third place bidder seemed to be legitimate, and jumped on a second chance offer pretty quickly – with immediate payment. So, this time it ended… okay; but I can’t see my friend selling more on eBay soon.

Fraud on is no secret, but had been holding out. No longer, it seems. eBay don’t care, because they just keep jacking up their fees to keep profits rising despite a fall in usage, but it’s so shortsighted. The worse it gets, the fewer real transactions take place, and you can only raise the prices so far before they’re an even bigger discouragement than the fraud. (At least you can avoid fraud, with due diligence.)

Eventually there won’t be anyone left but the scammers. And they’re not exactly the best customers.

Interesting Rosetta problem

Having set up a brand new Mac mini for my parents (woo!), I tried running the excellent Eric’s Ultimate Solitaire – only to run into a hang while it was opening (this is on 10.5.7). Curiously, in two of the three user accounts (on migrated, one new), the hang occurred; but in the other account, also migrated, it booted fine. This was a pretty major problem, as basically my mother couldn’t live without “Eric”, as she affectionately refers to it. It’s been a constant companion ever since the demo shipped on our first Mac, a Performa 6320.

I deleted cache files, ran maintenance scripts, repaired permissions, deleted preferences… Everything I could think of, but to no avail. I finally ended up staring at the Get Info window for the app, wondering what was wrong, and noticed that it was a PowerPC application.

Universal Binary logo

Now, I know about Leopard’s Rosetta technology for running PPC code on Intel Macs, and I knew that Ultimate worked fine with it: not only did it work in an account on this new Mac, it worked when I tested it on my laptop. So, I figured maybe Rosetta was broken somehow in these two user accounts. I decided to try opening an application in Rosetta – you can force this using the checkboxes in the Get Info window of a Universal application – to test it out. I chose, and it worked fine. Puzzled, I went back to Ultimate for the last time, and… it loaded!

I’ve since tested the solution in other accounts, and each time it’s worked: Ultimate was hanging on launch, I opened Chess in Rosetta mode, and went back to Ultimate to find it was fixed. Best of all, it seems to be permanent.

So, I don’t know if anyone’s ever come across a similar problem, or even this solution, before; but if you’re having trouble with a PowerPC application on an Intel Mac, I highly recommend opening an app like Chess in Rosetta mode and seeing if it helps to jump-start compatibility.

Addendum: Whether the problem lies with Ultimate or with Leopard I honestly have no idea. Ultimate has always been reliable for us (and it’s very heavily tested :)). On the other hand, I had to reinstall iLife Support and zap the P-RAM in order to solve a Leopard problem with slow screensavers (of all things) – that stemmed from using the Migration Assistant. So, I have my suspicions on this one…

Notes on the HTML 5 video codec debate

HTML video tag

You may or may not have heard about the disagreement over HTML 5’s video codec support. Let’s ignore the patent arguments completely, and the licensing fees (which I’m sympathetic to) — I’m not a lawyer, so I can’t bring anything useful to the table.

Basically, the choice is between H.264 and Ogg/Theora, and both Google and Apple think Theora sucks — for hardware support, and in general. (By the way, I’ll apologise now for my inconsistent references to Ogg and Theora; for reference, Ogg is the umbrella project, Theora is the video codec, and Vorbis is the audio codec.)

Let’s examine video quality. Noses were put out of joint by this comment from a Google guy:

If yt were to switch to theora and maintain even a semblance of the current youtube quality it would take up most available bandwidth across the internet.

Clearly, that’s hyperbole. Equally clearly, he doesn’t think much of Theora’s video quality. (Bear in mind, this is coming from the side that’s shipping support for both H.264 and Theora in Chrome; he has fewer reasons for bias than, say, an Apple guy who has some investment in H.264’s success.) This prompted a comparison from Greg Maxwell at Xiph, the people behind Ogg. I’ll summarise my criticisms of that comparison in Handy List Format:

  • Only the first pictures compare H.264 and Theora. The second set compare H.263, the legacy YouTube codec, and Theora, which is not even slightly relevant to HTML 5 (and only relevant to the quotation above if we’re being slightly pedantic).
  • YouTube’s H.264 files aren’t anywhere near the best quality that H.264 can deliver. They’re designed for mobile playback, and as such are designed to be playable by common, low-cost mobile hardware. Files designed for desktop playback — even GPU-accelerated playback — can have much more complex features enabled, and deliver vastly better quality at the same file size. The Ogg files, to my knowledge, are the best that the codec can deliver, without regard for the power of the hardware needed to play it back.
  • Even this H.264 file clearly clearly beats Theora. Note especially the grainy banding around the water lilies, which is often indicative of a codec that’s struggling slightly at the specified bitrate.
  • The Theora files were encoded by an expert, but the H.264 files were encoded with catch-all settings by an automated process. Anyone vaguely serious about video will tell you that different clips need different treatment, and a human who knows what he’s doing will totally outclass a machine which applies the same settings to every clip.
  • H.264 is famously useful at all kinds of bitrates and resolutions. Most codecs are only suitable for a limited range of values, so even if H.264 can be outclassed under specific circumstances (and, again, I see no evidence here that Theora’s going to do that), it wins for its versatility.

So, you’ll gather I’m not a giant fan of Ogg either. From my lengthy use of H.264, my (admittedly limited) exposure to Theora, and considering the opinions of those I trust, I can’t convince myself that Ogg is anything other than inferior. This is not to say that it’s irrelevant, or unimpressive; just less desirable in this context.

The lack of hardware support, though, is inescapable. Lots of video cards have H.264 decoding capabilities, which allow the playback of compatible video without stressing the computer. This is a Good Thing™. There aren’t any such decoder chips for Theora (or if there are, they’re extremely rare), which means decoding would have to be done on the CPU. While that’s generally fine for desktops (if inefficient, even a possible problem for HD video), it completely rules out mobile devices; iPods, iPhones et al rely on hardware decoding to play back video, as their CPUs are about an order of magnitude too weak. So, this alone is probably a deal-killer for anyone interested in mobile video… as both Google and Apple are.

Think of the situation with Flash video. That is largely CPU-grunt-based, and runs bearably on the desktop. When it comes to mobiles, it’s like running through treacle, and really not a viable option. Apple and Google even went to the trouble of creating an H.264-based alternative — which can utilise hardware acceleration — to YouTube for the iPhone. We’ve got essentially the same choice here: either go with Ogg/Theora, which will exclude mobile browsers completely and perpetuate exactly the same bloody mess of incompatibility that HTML 5 is supposed to help resolve, or go with a solution which can easily be supported on a wide gamut of platforms.

So why don’t Apple follow Google, preferring H.264 but implementing both? They’ve actually, of course, taken a quintessentially Jobsian position: a crappy implementation is worse than none at all. (Especially if Theora’s adoption might harm the chances of something better coming along.)

So, what to do? Ian Hickson wrote a remarkably even-handed review of the situation and concluded that any requirement for codec compatibility had to be dropped, to prevent an unworkable specification.

His conclusion rather surprises me though. What’s wrong with requiring at least Ogg or H.264 support of compatible browsers? Sure, it’s just codifying the status quo, and it means that there’s no single file that can be guaranteed to play in every HTML 5-capable browser. It does, though, protect against any further fragmentation in support.

Needing two files might be inconvenient. But it beats 3. Or 4. Or 5…

Solution for iPhone OS 3.0 icon problems

If you’ve been having trouble with messed up icons in iPhone OS 3.0 — duplicated or missing icons, switched icons on apps — then here’s a solution… if you’re jailbroken.

It seems to be caused whenever you have to force-reboot your phone (holding down the home and power buttons), or when certain apps reboot your phone uncleanly (like when installing through Cydia). Edit: saurik says Cydia doesn’t do anything wrong, and he should know; it’s just an unfortunate coincidence. The only known fix for unjailbroken phones is deleting your apps and reinstalling them, which of course deletes all your data. For jailbroken devices, though, you can just dump the icon cache with Mobile Terminal or through SSH:

mv /private/var/mobile/Library/Caches/ /private/var/mobile/Library/Caches/; killall SpringBoard

This renames the file and restarts SpringBoard. If everything seems okay, you can then delete this old file:

rm /private/var/mobile/Library/Caches/

This solved all my icon issues magically, and I’ve not had any side effects. Much better than deleting all my apps!

Ow ow ow

I crippled myself (well, sprained my foot) while playing squash last night. Ever get the kind of pain that hurts so much you have to laugh? Well, climbing stairs is hilarious…

Also, I maintain that victory over an injured dude is no victory at all, TOM. :-)

A brand new site, and an updated widget. Oh my!

It’s been weeks in the making, it’s taken so much hard work (most of that in bludgeoning IE6 into giving me a vaguely-working site) — but Phantom Gorilla finally relaunched this evening! It’s been hard, but I’m really, really pleased to have cut away so much of the crap in my old template (and to see the last of one awful stopgap-become-permanent solution in particular). It feels good to have the convenience of my own code for pages, too, instead of forcing WordPress to manage my whole site — clearly something it’s not supposed to do.

I’ve used lots of shiny new CSS toys, so you’ll get the best experience in Safari 4 or 3, closely followed by Firefox 3.5 or 3; but it’s been designed to degrade gracefully as far down as IE6. Not that I get much IE traffic, of course.

The other exciting news is the release of BBC Radio Widget 4.0 today, after a seriously lengthy beta period. It just kept collecting features — a RealPlayer workaround, Flash streaming, near-universal schedules — and turned from a 0.0x update into an X.0. Hopefully you’ll agree it’s worth the wait!

Update: It occurs to me that due to the site rearrangement, and my new permalink structure, some links and feeds may need updating. And I swear I’m a better writer when I’ve had more than six hours’ sleep in the last 72…

Problems with BBC World Service, 28th May

If you’re having problems listening to the BBC World Service today (“Requested file not found” error): it appears that the BBC, or one of their content delivery partners, is having a small problem. You may find you can get it to work if you try enough times. Unfortunately there’s nothing I can do, so let’s hope it’s fixed soon.

Beta test a new widget

Transmission widgetLong ago I made a widget for Clutch, the Transmission web interface – and it never made it past early testing. Now Clutch is part of Transmission, and I’ve been updating the widget to work with the latest Transmission builds.

If you’d like to help me test this, and have some input into the final design, email hawkman@ this domain. :)

Just fixed a comments issue I didn’t know I had

Comments are now working again. Don’t know what went wrong there.