Go big, or go home!
5I’m currently working on setting up Wowza on an EC2 “Cluster Compute Quadruple Extra Large” instance (or as I’ve heard it called, the “super-duper-quadruple”, which sounds like something I’d get at Five Guys). There’s no pre-built AMI for this one, so you have to use a stock Linux image (I use the standard Amazon one) and install Wowza with a subscription license, and do the tuning yourself. But the payoff is this: for $1.30 an hour, you get a streaming server capable of delivering 10Gbps of data. On a 750Kbps stream, that’s over 13,000 concurrent clients. This for about the same cost as nine or ten m1.small instances which can deliver an aggregate of about 1.5Gbps. On a reserved instance, you can get this down to just under 75 cents an hour.
In addition to Ludicrous Speed on the network I/O, this instance comes with 8 multithreaded Xeon 5570 cores (at 2.97GHz), 23 GB of RAM, and 1.7TB of local storage. (a quick speed test downloaded a half-gigabyte file in about four seconds, limited by the gigabit interface at the remote server). This is roughly equivalent to a moderately configured Dell R710. There’s also a GPU-enabled version of this that adds a pair of nVidia Tesla GPU cores.
If that’s not enough, you can go bigger, with 16 cores, 60GB of memory, and 3.5TB, Recently, someone clustered just over a thousand of these instances into the 42nd largest supercomputer in the world.
As of right now, these monster instances are only available in the us-east-1 zone.
PHP Direct Upload to S3
0Here’s an easy way to upload directly to S3 from an HTML form. No Java, no Flash. Thanks to @RaamDev for his handy little bit of code for doing HMAC signatures. Based on the documentation from Amazon. Makes use of the AWS SDK for PHP to list the buckets.
Screen shots:

Choosing a bucket

File Selection

After selecting the file

Upload Confirmation
New Wowza 3 Startup Packages
0Wowza has just updated its repository of startup packages to include pacakges specific to version 3. Get them here:
http://wowzamediasystems.s3.amazonaws.com/packagelist.html
Wowza Stats – Single Server
0Here’s the code for gathering Wowza Stats from a single server. This assumes that you’ve enabled the stats on Wowza (serverinfo, connectioncounts in VHost.xml HTTPProviders), with authentication turned off). You’ll also get better detailed stats if you use Andrew Kennedy’s CasterStats module for the serverinfo.
Switching Live Streams
1Continuing on the rack theme mentioned yesterday, I got to wondering about a stream monitor that could be switched to any of a number of live streams, without reloading the page. Fortunately, JW Player makes this easy. I threw together a player embedded inside some CSS and then added a button panel. Each button is a DIV with an onclick() action that calls jwplayer().load(). While it’s well known that you can use this to switch files simply by passing the filename to the file flashvar, we need to also pass the streamer value. Fortunately, the load() method has the ability to pass on not only files as a string value, but also objects, which are nothing more than an array of flashvars (it can also take playlist items, but that’s beyond the scope of this post). So, all you need to do in order to switch streams with JW Player is call the following JavaScript method:
jwplayer().load({file: 'streamname', streamer: 'rtmp://w.streampunk.tv/live'})
The result I got was this:
Clicking on each of the buttons in the bar below the screen will switch the stream. A live example can be found here. If you want to see what else the JWPlayer API can do, head on over to the API docs. FlowPlayer appears to have something similar in the clip.update() method (flowplayer API documentation), but I haven’t tested it.
Page code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JW Player Switching</title>
<style type="text/css">
body { background-color: #fff; padding: 0 20px; color:#000; font: 13px/18px Arial, sans-serif; }
a { color: #360; }
h3 { padding-top: 20px; }
ol { margin:5px 0 15px 16px; padding:0; list-style-type:square; }
</style>
</head>
<body>
<!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE -->
<div class="rack" style="width: 600px;">
<div class="rackmonitor" style="width: 600px; height: 323px; background-image: url('rackmonitor.png'); position: relative">
<div class="screen" style="width: 455px; height: 275px; position: absolute; left: 60px; top: 28px;">
<div id="mediaplayer">Player...</div>
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
<script type="text/javascript">
jwplayer("mediaplayer").setup({
flashplayer: "/jwplayer/player.swf",
height: "275",
width: "455",
file: "commons.stream",
streamer: "rtmp://w.streampunk.tv/live",
autostart: true,
controlbar: 'none',
mute: true
});
</script>
</div>
</div>
</div>
<div class="panel"
style="width: 600px;
height: 57px;
background-image: url('blankPanel.png');
position: relative
">
<div class="button1"
style="width: 75px;
height: 20px;
position: absolute;
left: 50px;
top: 20px;
border-radius: 10px;
background-color: #009900;
color: #cccccc;
border: 1px solid black;
text-align: center;"
onclick="jwplayer().load({file: 'playlist-high', streamer: 'rtmp://wms.rezonline.org/redirect'})
">
RezOnline
</div>
<div class="button2"
style="width: 75px;
height: 20px;
position: absolute;
left: 150px;
top: 20px; border-radius: 10px;
background-color: #009900;
color: #cccccc;
border: 1px solid black;text-align: center;"
onclick="jwplayer().load({file: 'commons.stream', streamer: 'rtmp://w.streampunk.tv/live'})
">
Commons
</div>
<div class="button3"
style="width: 75px;
height: 20px;
position: absolute;
left: 250px;
top: 20px; border-radius: 10px;
background-color: #990000;
color: #cccccc;
border: 1px solid black;text-align: center;"
onclick="jwplayer().load({file: 'streamclass', streamer: 'rtmp://w.streampunk.tv/live'})
">
StreamClass
</div>
<div class="button4"
style="width: 75px;
height: 20px;
position: absolute;
left: 350px;
top: 20px; border-radius: 10px;
background-color: #990000;
color: #cccccc;
border: 1px solid black;text-align: center;"
onclick="jwplayer().load({file: 'aircam.stream', streamer: 'rtmp://w.streampunk.tv/live'})
">
AirCam
</div>
</div>
</body>
</html>
Stupid CSS Tricks: Wowza Load Graphs
0I’ve been experimenting with ways to generate load graphs for Wowza. The best way for doing bar graphs on a webpage is to go all crazy with CSS. It’s really well suited to doing this. Here’s a PHP script that will query a Wowza origin server for its repeaters, and then polls the repeaters for their load stats. This also provides buttons for launching/terminating repeaters, and visually representing them as a rack full of servers:
Wowza Architecture Diagrams
0I’ve posted a couple of diagrams of Wowza’s architecture relating to repeaters and load balancing.
There’s also some additional information in the Wowza Media Server 3 Overview.
Site Migration Complete
0Got all the pages moved over and the images all fixed, and took care of a number of broken links. If you see any problems, let me know.
Site Migration
4In the process of moving the site to a new hosting provider – bear with me. Still working on moving the images, they’ll start cropping up over the next few days.
Wowza Media Server V3 for Amazon EC2
0Wowza V3 pre-built AMIs are now available – The devpay licensing remains, as does the pricing. The new AMI listing can be found at the Wowza V3 for EC2 page. Wowza has also added pre-built AMIs for subscription licenses, which are priced at standard instance rates. The caveat is that on devpay, the premium add-on modules won’t be available – if all you’re doing is what you were doing on V2, that won’t change anything for you.
The license key instances can also be used as a basis for your own custom images. License key can either be manually changed or included in your startup packages.

