views:

1491

answers:

3

Is there a way to stream MP3s stored on Amazon S3 via a Flash widget embedded in a website, or some other method?

+6  A: 

Yes it is. 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. That will allow you to access your files you upload to that S3 bucket via ‘http://media.example.com/somefile.mp3’. 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:

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

http://www.longtailvideo.com/support/tutorials/Using-Amazon-Web-Services http://www.stevestreeting.com/2008/09/29/streaming-media-from-amazon-s3/

Koistya Navin
Keep in mind though, that the media is not really streamed (like with Red5 or Flash Media Server) but progressivly downloaded - thus the media-files end up as easily identified files in the browser's cache.Depending on the license this might be a problem with content copyrighted by a third party
Argelbargel
Also pay attention to traffic, because if the crossdomain file isnt protecting against other sites linking to the MP3, I believe that anyone could use this MP3 in their Flash player = you pay the bandwidth. But I havent testet it though.
BerggreenDK
A: 

Have a look how it's done in S3fm, an online file manager for Amazon S3. It has built in media player that can stream mp3/mp4 files from Amazon S3.

http://www.s3fm.com/

Alex
A: 

I would strongly recommend Flash Media server solutions like Wowza combined with Flowplayer for flash widget.

Thanashyam