Time for some Safari 5 extensions

The last few days I’ve been playing around with Safari 5′s extensions features, which are incredibly cool and surprisingly flexible. The following are the results:

Google Reader Tools 1.0

GR Tools is a toolkit with lots of neat tricks for integrating Google Reader into your browser. There’s a toolbar icon which checks for new items at regular (configurable) intervals; it’s also possible to automatically view any feed you load in Google Reader instead of Safari. You can even change the appearance of Reader — because, frankly, it’s really ugly — using some built in styles (including the beautiful Helvetireader by Jon Hicks) or your own custom stylesheet.

Qwantz Secrets 1.0

Qwantz Secrets reveals the secret texts on Dinosaur Comics when you mouseover the image — or optionally click it, or press “s”. There’s also a bookmarklet for iOS devices which can’t run extensions (and can’t see the hidden text in any of the usual ways).

Both of these automatically update, and can be downloaded from my new extensions page. Bug reports and suggestions are extremely welcome.

Getting Flash errors with BBC Radio Widget?

The largest single problem I’ve heard of with BBC Radio Widget is a Flash security dialog, which beachballs the computer. Only a very few people get it — and I’m not sure why — but the solution is here.

Major BBC streaming changes affecting BBC Radio Widget

Update: Despite how things looked, and what the iPlayer help pages said, RealPlayer has had a stay of execution from Auntie – for national stations, at least. Local and regional stations are not available any more as RealPlayer streams. Most have been replaced by a “Sorry, no longer available” audio message, but one or two are missing completely, and it’s these which can cause the undismissable dialogs and beachballs with RealPlayer plugin. I strongly recommend that everyone upgrades to the latest version, as Flash is now used by default. (RealPlayer is still available for some stations, but you have to choose to use it by option-clicking the widget’s “i” button.)

The original post remains below, unaltered.

The BBC  have removed RealPlayer streaming as an option for listening to their radio stations online. This has major ramifications for the widget.

In a nutshell: using RealPlayer streaming – the default mode – with BBC Radio Widget 4.03 may cause your computer to become unresponsive.

There’s an easy fix. Switch to Flash streaming, right now. Option-click the “i” button, and choose Flash. This will only work for national stations, though, and therefore you should avoid using regional and local stations on v4.03.

There’s good news too, though… Flash streaming now works internationally, so you can ignore the UK-only warning on the widget. Also, v4.1 of the Unofficial BBC Radio Widget is due for release within days, restoring streaming for all stations – as well as bringing improvements in Flash streaming reliability, schedule fetching, and many, many bug fixes. You can help test it, too, if you get in touch.

British trains suck

This is a moan — if you don’t like to hear people venting their petty frustrations, look away now!

So today, I’ve waited five minutes for a train which started at the station I was at. (How did it manage to be late? I don’t know.) Narrowly avoid missing an appointment.

On the way home, I miss my connection because my first train is five minutes late, and I have to sit on the platform watching the seconds tick by. I catch it, and arrive at the halfway point only to find that half the trains are running an hour late — except mine, of course, which has just left — and now I’ll be waiting an hour for the next one. Finally, I end up stuck near some smelly people (like, seriously stinking-of-something-unmentionable, smell-them-from-several-seats-away smelly).

Not as bad as when I was heading to York a couple of months ago, though. £40 for a 90-mile journey, paid on the morning. Got on the (late) train, and was greeted by an announcement that we’d be further delayed. Waited ten minutes, then a further announcement that we’re moving to the end of the platform to get out of the way. As we stop, a scant thirty seconds later, we’re told the service is cancelled. And we have to walk all the way back along the platform.

Over the course of the next half hour, they cancel one train after another — each time insisting that the train will run, right up until the point of cancellation. (It later turns out that the line was completely blocked, so they’d have known no trains could run. They almost certainly knew at the time they were happily selling me tickets, too.)

Awesome. No wonder people like cars.

BBC Radio Widget beta testers wanted, once again

Update: version 4.1 has been released. You should use that!

I’ve been working hard on a new version of BBC Radio Widget. It’s got some pretty wide-reaching under-the-hood changes – which are pretty much invisible, but need testing – and some nice tweaks such as the option to open BBC schedule pages if fetching the information fails. If you’re interested in helping me test it, get in touch.

A complicated solution to a simple problem

So, I wanted to listen to TMS while I work in the charity shop. There’s nothing like a bit of slightly-mad banter to liven up a slow afternoon. Unfortunately, as any real Englishman will know, it’s only available on Radio 4 LW, or Five Live Sports Extra (which is digital/internet only); and I don’t have any portable kit capable of picking it up. I also don’t have an internet connection in the shop.

I do have an iPhone, but it’s an iPhone 2G and it’s running on Vodafone UK, who don’t have an EDGE network. (I’m with them despite this as they’re considerably less sucky than O2 in every other conceivable way.) That means GPRS, which tops out at a realistic 3-5kB/s. Not exactly speedy, and supporting a radio stream of only around 24kbps – considerably lower than the 48+ needed for apps like InternetRadioBox to get me delicious internet radio straight from Auntie.

The solution? NiceCast. It’s hooked up to grab audio from my widget on my Mac back home (running in Flash mode so I at least start off with good audio), which it encodes to 24kbps mono MP3 for streaming to my phone (password-protected; don’t sue me, personal use only!), and then plays in InternetRadioBox. Turns out it’s quite reliable, and the audio sounds surprisingly good (it’s only voice, after all). I’m sat here right now listening to the Ashes with my phone lying on the desk, feeling very smug. It’d be better if it didn’t look like England were going to be all out for under a hundred, of course…

Granted, it’s blocking the phone’s connection so I won’t get any calls or SMS messages while I listen. And the real problem will come if my connection drops at all back home and the widget screws up autoresume, because I’ve got no way of resetting it. But that’s not going to happen. (Can you hear me, MacBook? I said THAT’S NOT GOING TO HAPPEN.)

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 eBay.com is no secret, but eBay.co.uk 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 Chess.app, 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…