Streaming media from Amazon S3

Business, Political, Tech, Travel, Web 9 Comments

Thanks John for the reminder to investigate S3 as a business media hosting service, it works like a charm!

Now that I have far fewer bandwidth worries (max $0.17 per GB), the Torus Knot site includes a nifty dynamic selector so you can pick low, medium or high quality - the latter is at a higher resolution too, clocking in at about 100Mb. I may well use S3 for future public commercial downloads in the future too. It’s altogether more convenient than the block bandwidth allocations you get with regular hosting packages, since it scales dynamically at a very fine level of detail depending on demand. And don’t be fooled by ‘unlimited’ bandwidth offers, all hosting companies have to pay for bandwidth and there’s no such thing as ‘unlimited’ resources; you’ll actually find your bandwidth being throttled or cut off via a ‘reasonable use’ clause in the small-print; ‘unlimited’ is simply a marketing lure. If you want truly scalable guaranteed bandwidth, you have to pay for it.

Getting S3 media hosting working wasn’t that hard, but did require a few discrete steps. Firstly, you need to create a bucket in your S3 account which is all in lower case, is globally unique and is DNS-compatible; so for example I created a bucket called ‘media.torusknot.com’.

Then to make it all look nice you need to create a DNS CNAME entry to map a sub-domain of your site to that S3 bucket; in my case I mapped ‘media.torusknot.com’ to ‘media.torusknot.com.s3.amazonaws.com’. That allows me to access any files I upload to that S3 bucket via ‘http://media.torusknot.com/somefile.jpg’. You do just need to set the ACLs on the files & the bucket to make sure public access is allowed.

Finally, if you want to stream video files via a Flash player from S3 to another domain, you also have to tell Flash that it’s ok for the content to be pulled in from a different domain. Create a file called ‘crossdomain.xml’ in the bucket, with these contents:

<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
</cross>

That allows the media to be accessed from anywhere - you can be more specific if you want but this is the simplest approach.

Once again I’m using the excellent FlowPlayer; my only issue with it is that the ‘buffering’ animation seems to not work all the time (so be patient if you’re viewing the high quality version).

Gotta love this cloud computing business :)

Flash-powered mini-Guitar Hero

Games, Music 9 Comments

This is a week old now but I only just spotted it - Activision have taken the unusual step of releasing an official Guitar Hero Flash game , which is embedded below.

It doesn’t play particularly well (but then neither did Guitar Hero 3 - zing!) but I guess when you consider the limitations of the medium what’s there is an achievement, and even so it’s fun that they did it. I’m trying to figure out who it’s aimed at though; anyone who digs Guitar Hero probably has it by now - hopefully they experienced GH1 & 2 rather than just the inferior GH3 - and I don’t think this effort is going to convince anyone who hasn’t tried the real thing by now, given that it feels rather imprecise, and the keyboard is unnatural. Anyone who’s played GH will know that even though it’s just a bit of plastic, the guitar controller makes all the difference - if it didn’t, we’d all be playing Frets on Fire instead.

Maybe it’s just a gimmick to get the GH brand a little extra publicity in advance of the European release of Rock Band. To be honest I find it hard to determine which direction the GH franchise is going in now, given that they’re now planning on ‘doing a Rock Band’ and releasing other instruments. This seems like an empty ‘me too’ gesture - really GH3’s only saving grace was that it appealed to hardcore guitar specialists who have evolved an extra knuckle on each finger, most other people felt it was an inferior experience to GH2, particularly if you’re into co-op / party play. So if they’re stepping away from that specialism, they’d better get their act together because I’m betting Harmonix will hang them out to dry on a level playing field.

In any case, Rock Band is finally out over here in just over 2 weeks so I probably won’t care what Activision does with GH for a while. Everyone in the press refers to GTAIV as ‘the‘ game of 2008, but not in my house :) The price still hurts, and I see some people are taking that frustration out on the Amazon review system, but damn, given the amount of pleasure co-op GH2 has given us in the last year and that Rock Band looks even better, I’m confident it’s going to be worth it.