Posts Tagged ‘video’

RTMP Streaming Video from Cloudfront

Written by craighicks13 on . Posted in Sandbox

So I’ve recently been looking into streaming videos from cloudfront. For some reason I was surprised to found out that cloudfront uses Flash Media Server 3.5 for streaming videos and now need to try it out. I’m a fan of OSMF and have been using Strobe Media Playback for my videos for it’s dead simple implementation. I also noticed that JW Player is widely used for this implementation as well. This post is for me to reference how to implement both players using cloudfront streaming.

Here are the basic properties that need to passed to each player:

// JW Player Properties

flashvars.file = “mp4:halloweenParty.mp4”;
flashvars.streamer = “rtmp://s68qjfvdm9dbn.cloudfront.net/cfx/st”;
flashvars.provider = “rtmp”;
flashvars.image = “http://media.developdigital.com/halloweenPartyPoster.jpg”;

// Strobe Properties

flashvars.src = “rtmp://s68qjfvdm9dbn.cloudfront.net/cfx/st/mp4:halloweenParty.mp4”;
flashvars.poster = “http://media.developdigital.com/halloweenPartyPoster.jpg”;
flashvars.urlIncludesFMSApplicationInstance = true;

Here is the JW Player in action:


And the Strobe player:

While I’m at it, here is the code that I use to embed videos.

<script type="text/javascript">// <![CDATA[
  var flashvars = {};
  flashvars.src = "rtmp://s68qjfvdm9dbn.cloudfront.net/cfx/st/mp4:halloweenParty.mp4";
  flashvars.poster = "http://media.developdigital.com/halloweenPartyPoster.jpg";
  flashvars.urlIncludesFMSApplicationInstance = true;
  var params = {}; 
  params.allowfullscreen = "true";
  params.allowscriptaccess = "always";
  var attributes = {};
  swfobject.embedSWF("http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf", "video_div", "512", "288", "10.1.0", "http://media.developdigital.com/expressInstall.swf", flashvars, params, attributes);
// ]]></script>

Built with HTML5 and CSS3
Copyright © 2015 Develop Digital