Flash Streaming With Amazon Cloudfront

By Larry B, February 18, 2010

This page accompanies the tutorial article How to Get Started with Amazon Cloudfront Streaming at streamingmedia.com.

Amazon Web Services (AWS), through its Simple Storage Service(S3) and Cloudfront content delivery service, is now offering RTMP Flash media streaming.

The example below references an MP4 video file that lives in an Amazon S3 storage bucket. A Cloudfront Distribution has been set up to stream content from the S3 bucket via rtmp:// using a CNAME on this domain.

[Media file: 460kbps, H.264/AAC]

Using the JW FLV Player 5.x, the EMBED code looks like this. Note the type, streamer, and file parameters set in the flashvars.  streaming.learningapi.com is the CNAME I created for my Cloudfront distribution, /cfx/st/
is the standard path to Cloudfront Flash Media Servers.


You can read a complete tutorial on setting up AWS, S3, and Cloudfront streaming in How to Get Started with Amazon Cloudfront Streaming at streamingmedia.com. Full Cloudfront Documentation is available in the AWS Cloudfront Developer Guide


19 Responses to “Flash Streaming With Amazon Cloudfront”

  1. [...] Flash Streaming With Amazon Cloudfront [...]

  2. Great job! Thanks

    Todd Carter, BDM
    AWS CloudFront CDN service

  3. Please check out CloudBerry Explorer freeware Amazon S3 and CloudFront client. It helps configuring CloudFront streaming and even generates an html code for popular players.

  4. [...] an rtmp stream using the JW FLV Player can be found on the Cloudfront Streaming example page at [...]

  5. Mario says:

    Hi: Very interesting your post, that’s exactly what I want to do. However, I was checking streamingmedia and cloudfront sites and I couldn’t find an answer to my question which is, where do I have to host or upload the client file for jw player? I uploaded my video to a bucket on Amazon S3 and created an streaming distribution for it with cloudfront, so what do I have to do with the jw player client so it can be embedded in my website like yours? Maybe you can help me with that. Thanks

    • Larry B says:

      The player.swf can live on your website server. The SRC attribute to your EMBED tag and the SRC PARAM to your OBJECT tag point to the player.swf, using a relative URL or an absolute URL.

  6. Mario says:

    Thanks Larry for your response. The problem is that I can’t upload the player.swf to my blog server because I am using Blogger and they don’t allow to do that. So I was trying the option I found here: http://blog.cloudberrylab.com/2009/12/how-to-configure-cloudfront-streaming.html

    They mentioned about hosting the player.swf on the same amazon S3, but I don’t understand very well setup. The same with that crossdomain.xml they are talking about.

    I thought maybe you were using that option with CloudFront and CloudBerry.

  7. Marcus says:

    Great tutorial, got me setup in less than 15 minutes.
    One thing to note is that your video took about 15 seconds to start playing. I’m in Australia and it makes me wonder of the effectiveness of S3 and Cloudfront as a global delivery service.

  8. Awesome post, hey I came across this post while googling the web for free downloads. Thanks for sharing I’ll post this to my facebook about this too.

  9. Howdy there,Terrific blog post dude! i’m Fed up with using RSS feeds and do you use twitter?so i can follow you there:D.
    PS:Have you thought about putting video to this blog to keep the visitors more entertained?I think it works.Best regards, Wilburn Keeth

  10. Mariana says:

    Hey, great blog, but I don’t understand how to add your site in my rss reader. Can you Help me please?

  11. Brian says:

    Great tutorial. I have uploaded 3 videos and only 2 of them will play. the player looks like it loads the video that won’t play and then just stops.
    The only difference I can see is that the video that won’t play is longer than the ones that play. Do you know of any time restrictions on a video streaming from cloudfront? Since they charge on bandwidth it would be crazy to limit it.


    • Larry B says:

      The only thing I’d double-check is the permissions on the file in S3. If Coudfront’s FMS servers can’t get to the individual file, you might see what you’re describing.

  12. John Marcen says:

    Compared with other FLV players, Any FLV Player has another important function – Create web videos with an embedded player which is often played directly online. It integrates web video component which lets you post video files to your website or BLOG such as posting videos to MySpace with just a few clicks. You need to use the “Publish for Web” feature to easily integrate any video to your website. http://playerflv.net

  13. I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success.

  14. This is just the sort of info I was looking for! Thanks :)

  15. Jack says:


    How do you create a playlist using amazon’s cloudfront and JW Player?


  16. RudolfB says:

    You may also want to check out a plugin for Wordpress to stream and private stream video and audio, namely S3Media Stream : http://www.wp21century.com
    It empowers you to embed video and audio without using any code. It also has fantastic options to monetize the media and it is excellent for membership sites or Video on Demand thanks tpo the expiring URL functionality combined with streaming.