Streaming Live Video without Ads for Pennies
I've been in search of a decent low cost video streaming solution for a long time now. It doesn't take long playing with Ustream and Livestream to realize that while the software running those systems is extremely user friendly and convenient, the ads they run are obnoxious and intrusive. The premium subscription for both of those services also totals over $10,000 a year, so I'm not their target market by a long shot. I blogged a bit about this when I was setting up DS106TV and we eventually settled on Justin.TV, forgoing the attractive offline rotation of Livestream because Justin was the only service that had just one single ad at the beginning of the stream and no interruptions thereafter. Unfortunately Justin.TV is not perfect or even close. Unlike other services they offer no premium plan to remove the ads for a channel, opting instead to require individual users to pay $10/month to see no ads on Justin.TV channels. Their iOS app costs $5 but then had the audacity to show ads in streams there as well. And in general the service feels like it's struggling to find a foothold in this market. Beneficial features like direct upload of recorded video to Youtube were pulled from all but channels except those designated as "Gaming". Justin.TV works and it's still the best user-friendly way to stream online for free. But I've finally found a way to stream live video with no ads at all for literally pennies and while it's not easy to setup, it's worth blogging about. Let's dive in. Earlier this week I sat in on a meeting with Andy Rush and an engineer from UMW's IT group to talk about the current media server they have running and UMW's presence on iTunes U. The current server is mainly a web host with storage and FTP access for faculty. Upload a video, get a link to that video, insert link in blog. Straight-forward but definitely not user-friendly. Getting content into iTunes U requires creation of feeds (which apparently can require third party tools as well) and in general the server was just not being used. Whether we double-down on iTunes U and improve the system for feeding into it or look towards building a more open web presence where UMW hosts their own videos and becomes its own syndicate for educational content being created here is another blog post entirely. Yet clearly this was a good opportunity to start looking at alternatives to complement a new media server in the process of being purchased. Although I didn't know much about it, I've heard a lot about Wowza which gets thrown around a lot when you talk about streaming or encoding videos on the fly. Once I started researching it a bit more I realized that this software is actually extremely powerful! Here is a short list of what it can do: - Live Video Streaming using Flash
- Live Video Streaming to iOS devices via Quicktime
- Restreaming from an Icecast/Shoutcast Server
- Remote Recording of Streams
- Dynamic Streaming and Bandwidth Detection
- On-Demand Video Streams
The site has a ton more information and to be honest there are more acronyms and formats than even I can comprehend, but I knew it was powerful and I wanted to start playing with. One of the nice features Wowza offers is the ability to run an instance of their software in the cloud using Amazon EC2. Basically you sign up for access to these Wowza instances which costs $5 a month and then you only pay $0.15/hour that the instance is in use. For a 24/7 production unit it probably wouldn't be cost effective unless you were really concerned about not using your own bandwidth, but for a situation like ours where we only stream 5-6 hours per week at most, this was a chance to use enterprise-level software and end up paying just a few dollars a month! You can learn more about how they price things on Wowza's EC2 page. Here's a basic overview for how I got DTLT Today up and running using Wowza on EC2 and Wirecast to stream (although the free Adobe Flash Media Encoder will work as well). First you have to subscribe to gain access to the Wowza instances on EC2 here. You'll need to setup an Amazon account if you don't already have one. From the outset you're only billed a prorated amount for the $5/month charge for access to the Wowza instances. And I say instances because they have several different versions of the software on different architectures available to run. You can get a full list of them here. We've been running the latest version on a small 32-bit architecture (ami-5a649833) and had no issues so far. Once you've gotten setup to access the Wowza instances login to the AWS Management Console and go to the EC2 tab. Choose to start an instance. It will allow you to choose what you'd like to run and you can search for the wowza instances or copy and paste the ami-XXXXXXXX number for the instance you want to run under the Community tab. Make sure you don't inadvertently choose the wrong instance since the larger and high-cpu instances cost much more per hour to run (and you likely don't need that kind of horsepower). For the instance details you can choose the defaults and give it any name. For the "Key Pair" generate one the first time you run it and from then on you can select that same key pair. For the security group create a new one and setup the ports following the Wowza EC2 Ports Guide. This is another one-time thing and you'll be able to select that same security group in later instances. Click finish and you're good to go. After a few moments the instance will boot up and be running. At this point you have Wowza running online and you can stream to it. A good guide on how to do that using JWPlayer is located here. Basically you can grab the public dns of your stream and add "rtmp://" to the beginning of it and "/live" to the end of it and that's the url you send a stream to. The Quick Start Guide to Wowza on EC2 is chock full of information and URLs for streaming using this service. Here are a few things to keep in mind when going this route 1. Make absolutely sure once you're done streaming that you terminate the instance. Just because you're not streaming doesn't mean you're not being charged. As long as the instance is running you're being billed.
2. If you are planning on streaming regularly to a location you're going to want to add an Elastic IP address, which is basically a static IP that can be assigned to any instance that you start. After you start an instance go to your Elastic IP and associate it with that instance. That way your flash player and streaming software can all keep the same settings. There is a cost associated with this but it's only $0.01/hr when the IP address is not in use (when it's associated with an active instance it doesn't cost anything).
3. No settings, data, or videos are stored when an instance is terminated. Because of this if you need to configure a Wowza server to do a lot of things that are not setup by default, you would likely be better served by running it on your own server hardware. There are tricks to making data persist in an instance, but you'd be looking at setting up storage blocks to keep the instance active and that storage would cost you as well.
This is complex stuff and I didn't go into a ton of detail here because honestly I'm not an expert at this. I've been playing with it for two days now and I'm happy enough that I was able to get it to work and now know that options like this exist. I'm excited about the possibility of UMW having their own Wowza server so that we could really test the limits of what this could do. Amazon is currently offering a free year of testing out EC2 instances for new Amazon AWS users and while Wowza is not eligible for the free tier, if you're just wanting to see what it means to have an instance of a Linux server running Wordpress "in the cloud" you could run one 24/7 for a year for free. It's all the benefits of a virtual private server without maintenance and strong uptime. If you're a tech-savvy user and you're looking for a challenge why not check it out?