Streaming media from Amazon S3
September 29th, 2008Business, Political, Tech, Travel, Web 9 CommentsThanks 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 ![]()
It’s an eternal truth that no matter how much hard drive space you have, you always manage to fill it with something.
For some reason I was suddenly curious as to how much money I’d spent since last December on digital content for the 360, such as XBox Live Arcade titles and more recently Rock Band DLC. Of course you buy things in Microsoft Points on the 360, which like Wii Points and Disney Dollars are designed precisely to disguise how much money you’re actually spending. The PSN has my respect in this regard for taking the brave step of actually pricing things in units of real money. Quite why Microsoft and Nintendo chose to go against the precendent set by every other marketplace in the developed world (except Disneyland, but that’s intentionally ‘wacky’) I’m not sure - I doubt we’d take most high street retailers very seriously if they required us to buy things in ‘Starbucks Bucks’ or ‘HMV Quatloos’.
I don’t know if they’re actually airing 