Stream Simple Flash Files from Cloud Files
Streaming with Cloud Files was Decommissioned on July 31, 2022.
Disclaimer: As of January 12, 2021, excluding the China variant of Flash, the Flash executable has a built-in kill switch that prevents it from playing Flash files. As of February 2021, all major browsers block Flash and cannot play it. Only IE11, niche browser forks, and some browsers built for China plan to continue support.
This article describes how to stream media files from Cloud Files to a website. It assumes that you have a video file uploaded to Cloud Files in a public container. It also uses Flowplayer, which is an open-source Flash video player registered under the GPL.
Streaming
Rackspace delivers Cloud Files containers published and marked as public over the Akamai Technologies® global content delivery network (CDN). For streaming flash files from your Cloud Files, Akamai provides pseudostreaming.
Pseudostreaming works as follows: When a video initially loads, the player reads and stores a list of seek points as part video metadata. These seek points are offsets in the video (both in seconds and in bytes) at which a new keyframe starts. To accomplish this, Akamai's streaming supports the HTTP Range header
to identify those seek points. It does not support Real-Time Messaging Protocol (RTMP) streaming.
Pseudostreaming differs from what Akamai offers with their iOS streaming. iOS streaming is a form of adaptive streaming. The encoder (or a separate segmented process) produces H.264/AAC content in a sequence of small content segments in MPEG-2 TS format (.ts). There is also an m3u8 index file that references these segments. In the case of live content, the M3U8 continuously updates to reflect the latest content.
For more information about pseudostreaming, see JW6: Pseudo Streaming in Flash.
For more information about iOS streaming, see Technical Note TN2224 on the Apple Developer site.
Supported Streaming Formats and Codecs
Akamai streaming supports the following formats:
Container | Video codec | Audio codec | Comments |
---|---|---|---|
FLV | H.263 H.264 VP6 | MP4 AAC PCM Nellymoser | Video-only works as well. For Nellymoser, Akamai supports only the 8 kHz and 16 kHz mono sound formats. |
F4V | H.264 | AAC | None |
MP4 | H.264 | AAC MP3 | Can be audio-only (AAC) or video-only. |
F4F/F4M | H.264 VP6 | AAC MP3 | None |
Prerequisites
Ensure that you have the following prerequisites:
- A .flv video
- A text editor
FlowPlayer Steps
-
Go to Akamai FlowPlayer and download FlowPlayer.
-
Save the zip file to your desktop.
-
Extract the zip file to your desktop.
-
Upload the following files to Cloud Files by using the Cloud Control Panel:
- flowplayer-version.swf
- flowplayer-version.min.js
- flowplayer.controls-version.swf
Create an XHTML File
Create a simple XHTML file that calls Flowplayer and embeds it onto the page. Use the following code, making the following substitutions:
<html>
<head>
<script type="text/javascript" src="https://c022320192.cdn.cloudfiles.rackspacecloud.com/flowplayer-3.5.min.js"></script>
</head>
<body>
<a
href="https://c022320192.cdn.cloudfiles.rackspacecloud.com/video.flv"
style="display:block;width:520px;height:330px"
id="player">
</a>
<script>
flowplayer("player","https://c022320192.cdn.cloudfiles.rackspacecloud.com/flowplayer-3.5.swf");
</script>
</body>
</html>
- On line 3, replace
https://c022320192.cdn.cloudfiles.rackspacecloud.com/flowplayer-3.5.min.js
with your version of this file. - On line 7, replace
https://c022320192.cdn.cloudfiles.rackspacecloud.com/video.flv
with the location of your video file. - On line 12, replace
https://c022320192.cdn.cloudfiles.rackspacecloud.com/flowplayer-3.5.swf
with your version of this file.
Save this XHTML file and run it from your local machine. The Flash video should load quickly and stream.
Updated 9 days ago