Creating an on demand version of your Wowza recording for iOS and browser viewing

After recording a live stream with Wowza, it was not as simple as I thought to make the recording available for on demand viewing in a way that works for browsers and iOS devices.  I moved the recording to my S3 bucket and was trying to make it available via CloudFront.

After much trial and error, the solution had two parts:

1. Convert the file from flv to mp4.  I used AVS Video Editor with custom file settings to get an H.264 file with “mp4 iso v.2”

2. Serve up the file with a jwplayer playlist that contains two sources: an rtmp source from a CloudFront streaming distribution for browsers, and an http source from a CloudFront download distribution for iOS devices.  Here is some example code:

<div id='player_9465'></div>
<script type='text/javascript'>
  jwplayer('player_9465').setup({
	playlist: [{
	        image: "images/screenshot.jpg",
	        sources: [{ 
	            file: "rtmp://s1234567890123.cloudfront.net/cfx/st/filename.mp4"
	        },{
	            file: "http://d1234567890123.cloudfront.net/filename.mp4"
	        }]
	    }],				    
	width: "480",
    height: "360"
  });
</script>

Leave a Reply

Your email address will not be published.