Contents

Overview

In this tutorial we will cover how to stream media files from Cloud Files to a Web Site. This tutorial assumes you have a Video file uploaded to Cloud Files and the container it is in is public. We will be using FlowPlayer; it is an open source Flash Video Player registered under the GPL.

Streaming

Cloud Files containers published and marked public are delivered over Akamai Technologies, Inc.'s global Content Delivery Network (CDN). For streaming flash files from your Cloud Files, Akamai provides pseudo streaming. You can find additionl information online, but a great explanation (in Flash) is provided at: http://www.longtailvideo.com/support/jw-player/28855/pseudo-streaming-in-flash/. "Pseudo-streaming works as follows: When the video is initially loaded, the player reads and stores a list of seek points as part of the video's metadata. These seek points are offsets in the video (both in seconds and in bytes) at which a new keyframe starts)."

There is a difference in the pseudo streaming and what Akamai offers with their iOS streaming. iOS Streaming is a form of adaptive streaming.

"The encoder (or a separate segmented process) will produce H.264/AAC content in a sequent of small content segments, in MPEG-2 TS format (.ts). There is also a m3u8 index file that references these segments; in the case of live content the M3U8 is continuously updated to reflect the latest content.

FlowPlayer

The Files we need are as follows. (this was written using FlowPlayer 3.5)

flowplayer-(version).swf

flowplayer-(version).min.js

flowplayer.controls-(version).swf

Go Ahead and upload these to Cloud Files using the control panel.

The Cross Domain XML file

The Cross domain XML file allows you to specify what domains are allowed to Grab Data from the CDN. This is so people cannot hotlink your content unless you let them. Here is an example of a simple cross domain XML file that allows ALL domains to call these flash files

On line 3 please replace http://c022320192.cdn.cloudfiles.rackspacecloud.com/flowplayer-3.5.min.js with your version of this file.

On line 7 please replace http://c022320192.cdn.cloudfiles.rackspacecloud.com/video.flv to the location of your video file.

Finally on line 12 replace http://c022320192.cdn.cloudfiles.rackspacecloud.com/flowplayer-3.5.swf with your version of this file.

Go grab a party hat its time to celebrate we are almost done =)

Let's test it out

Go ahead and save this xhtml file and run it from your local machine. If all is well you should see the flash video load up quickly and stream away. If not double check your code. If you are still having problems after that give our support a call or submit a ticket via the Cloud Control Panel. We would love to help!