This is a message.

Amazon cloudfront

Using Flowplayer with Amazon Cloudfront

standalone demo

This shows how to do RTMP streaming from the Amazon CloudFront CDN. To configure Flowplayer for CloudFront you need to do two things:

  1. Set the clip URL to point to your video file in your Amazon S3 bucket.
  2. Configure the RTMP plugin's netConnectionUrl to point to your CloudFront domain.

Amazon has a great tutorial on how to set up Flowplayer streaming with Cloudfront.

HTML

The clip URL is defined in the href below. This corresponds to the video file name and location in the Amazon S3 bucket. In this example the file is located in a directory called examples. If the file was located in the bucket's root the href value would simply be flowplayer-700.

<!--
href points to the video file in our CloudFront bucket.
We have a folder called 'examples' in the bucket and the file
is contained there. Amazon CloudFront uses the Adobe's RTMP server and
therefore we remove the file extension .flv from the url
-->
<a href="flowplayer-700"
class="player"
style="display:block;width:425px;height:300px;"
id="rtmpPlayer">
 
<!-- splash image inside the container -->
<img src="/media/img/home/flow_eye.jpg"
alt="Search engine friendly content" />
 
</a>

HTML

CloudFront uses the Adobe's FMS server (Flash Media Server) and FMS does not like the file extension in the clip's URL so you should not include it in the clip URL value. So we have 'flowplayer-700' even when the file is actually named 'flowplayer-700.flv' in our bucket.

Configuration

We use the RTMP plugin to stream from the RTMP servers running in the Amazon cloud. The netConnectionUrl value contains your CloudFront domain name followed by characters cfx/st.

flowplayer("rtmpPlayer", "http://releases.flowplayer.org/swf/flowplayer-3.2.18.swf", {
 
// configure the required plugins
plugins: {
 
// the RTMP plugin
rtmp: {
url: "flowplayer.rtmp-3.2.13.swf",
 
// netConnectionUrl has our CloudFront domain name + 'cfx/st'
netConnectionUrl: 'rtmp://s3b78u0kbtx79q.cloudfront.net/cfx/st'
}
},
 
clip: {
// use the RTMP plugin
provider: 'rtmp'
}
 
});

JavaScript