You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Flowplayer Tutorial An Introduction To Streaming Servers

Intendent audience

This tutorial assumes the following:

What Is A Streaming Server

Ok so simply put, a streaming server refers to a dedicated web server, or application installed on a server, that is designed purely for delivering video or audio files. What this means in very simple terms is that your video files will be coming from a different place to your html/php/asp pages.

If you're still not really sure what I'm talking about, check out:

Streaming servers can use a variety of protocols. For example, Adobe Flash Media Server (FMS hereafter) uses RTMP, RTMPS, RTMPe. Apple Darwin Streaming Server (DSS hereafter) uses RTP, RTSP etc. Different protocols have different advantages and disadvantages, but for the duration of this tutorial we'll assume that we care more about the whole thing working than how it organises it's bits and bytes.

Why Use A Streaming Server

In general, the advantages of a streaming server are:

* This is because on average a user will not watch the entire video, but with progressive download they will still download the entire file.

What Are The Main Options Available

Ok so if you decide to deliver your media via a streaming server, you have a few options available to you.

Install Your Own Media Server Software

Your main options are:

OSFlash Red5

As of writing it's very buggy, has very little documentation, is extremely temperamental to different server setups and is prone to being a pain in the a**. On the flip side, it's free and if you can get it working, it should work great. Facebook seem to think so anyway, as they built their video streaming services on Red5.

I personally wasted so much time playing with different setups that I simply gave up on Red5. In theory it does work 'straight out of the box' with a pre-built application called 'oflaDemo'. Throw your video files in the streams folder inside this application and you should be good to go. In theory.

Adobe FMS

Possibly the most well known streaming server, and probably the best. You can download their free 10 user development license, which is still the fully featured product, and give it a test. Within 20 minutes I had this working on a VPS. The documentation literally holds your hand through the install and guides you line by line. And as with Red5, it comes with a pre-built application for streaming vod. Look for the 'vod' folder inside applications. Again, Adobe's Getting Started documentation guides you through this anyway and gets you up and running within about 5 minutes.

Wowza

I have no personal experience yet of wowza however, with Adobe FMS3 costing exactly the same I don't see why you wouldn't just stick with the big company. I hope others can have more input on Wowza.

Apple DSS

Apple's open source streaming server which is basically built on their commercial Quicktime Streaming Server (QTSS). DSS is great if you have no intentions of streaming flv and wish to purely stream H.264 MP4 or 3GP files. Youtube use DSS for their Mobile website. Again I have no personal experience with actually using the player, but with the RTP/RTSP protocol not yet supported by Flowplayer, it wont be discussed here any further.

Lighttpd

* needs checking

Lighttpd (pronounce it "Lighty") is actually a webserver for linux systems (just like Apache). Lighttpd has a very small footprint and specalises in delivering static content. It has a flv streaming plugin which works somewhat as a cross between a streaming server and progressive download. The video is still cached to the user, but they are now able to seek forward into the video. This is known as pseudo streaming.

This is the method that Youtube, along with many other video providers, use to stream their video files (as well as static content such as thumbnails). This is mainly because once you get to the server farm size of youtube, you need the smallest CPU usage possible.

Advantages Of Setting Up Your Own Media Server

Disadvantages Of Setting Up Your Own Media Server

Usage

Simply save all your video files in the video on demand application folder. For example, on Adobe FMS:

/adobeFMS/applications/vod/media

As mentioned before, one of the best things you get with FMS is the support and documentation. Here's all you should need: Adobe: Beginner VOD

Then request the file from the address of the server (example IP 222.22.44.222) :

rtmp://222.22.44.222:1935/vod/flv:name_of_video

FMS comes with a pretty good admin console straight out of the package. Red5 has one, but for me it was always buggy. Wowza has an admin interface too. These are mainly for monitoring bandwidth, connections, usage etc.

Rent A Shared Media Server Account

This basically involves getting a separate hosting account from a provider who provisions shared accounts or VPS accounts on their own FMS/Wowza/Lighty dedicated servers. This means they incur the setup costs and you just pay for the bandwidth, storage and then a little extra on top.

Main providers:

Advantages Of Using A FMS Provider

Disadvantages Of Using A FMS Provider

Usage

Using the hosting account is basically identical to if you had set it up yourself. Your account has a dedicated IP, the host will give you any specific details as to the folder structure of your account, and then you just access the files over RTMP on port 1935.

Use A CDN

Main providers:

Content Distribution Networks are basically a global network of media servers, all mirroring each other. Upon requesting a file from a CDN, their network determines their closest server to the user and delivers the file from that location. Because of this design, they are the fastest and most reliable solution available. They are also (usually) the most expensive.

From personal experience, Simpl CDN are very upfront and honest on their prices. They offer instant account activation, and $15.00 of credit to use on their 'pay as you go' payment structure, which is the opposite of what Influxis do! The other CDN providers all require a more personal sales approach, i.e. giving them a call. While this is often frustrating, and a business practice that I personally hate for a service such as this where a simple Rate card would work fine, I have at some point spoke to most of the providers in the list above and they all work in about the same way. Traffic goes up, cost per GB goes down.

Advantages Of Using A CDN

Disadvantages Of Using A CDN

Usage

Using your CDN is ideally simple and straightforward. All providers offer the service to 'mirror' an origin server that you specify. Basically, you place all your files in a publically accessible folder, and then limit access by IP to just your CDN. As soon as files are added to that folder, the CDN copies it into their network.

You are provided all necessary access info, but it again usually comes down to something like:

rtmp://your.account.samplecdn.com/your.account/your_video_file.mp4

Most CDN's also offer the choice of manually uploading video files via ftp. Erm... no.

What's The Cost Comparison

Okay so this may seem tricky, so I'll try and do 2 comparisons. One for a small video website, one for a pretty large video website. These estimates will be updated as they're looked into more, prices change etc. So let's assume:

Site A
Provider Storage Bandwidth Setup Additional Total
Akamai 0 $468* 0 0 $468
Limelight 0 $380* 0 0 $380
Influxis 0 $223*** 0 0 $223
Own FMS - $50**** $1000 0 $1050
Own Red5 - $50**** - 0 $50

* Limelight and Akamai do not have published rate cards. A quick survey of current customers resulted in average pricing of $0.96 for Akamai, and $0.78 for Limelight at this traffic level.
** Advanced II was the closest match for this scenario, although there is a lot of unused storage with this plan.
*** Influxis plan with the the Custom Plan Builder **** Suitable Hosting = Virtual III Rapid VPS here

Site B
Provider Storage Bandwidth Setup Additional Total
Akamai 0 $224,215 0 0 $224,215
Limelight 0 $112,108 0 0 $112,108
Influxis 0 $35,400** 0 0 $35,400**
Own FMIS - $22,242*** $3500 $1040 $24,282
Own Red5 - $22,242*** $0 $1040 $23,282

* Limelight and Akamai do not have published rate cards. A quick survey of current customers resulted in average pricing of $0.46 for Akamai, and $0.23 for Limelight at this traffic level.
** 2 servers, $21 per Mbps, Prices may vary based on a case by case basis depending on usage and need. For more information, contact Director of Enterprise Solutions, Robert Parker at 661-775-3936 x206 or email: robert [at] influxis [dot] com
*** Suitable Hosting = $15 per Mbps, 4 x Dedicated III Rapid VPS here

Price Summary

Firstly, let me stress again this are estimates. However, it's pretty obvious that some options excel at different requirement levels. For site A, it seems the tempting option would be to setup Red5 server. However, again I must stress how buggy the software is, still in it's beta and constantly changing. Check the performance comparison further down to decide.

for site B, Influxis has the most attractive pricing. The Influx's plan includes your choice of USA (Los Angeles, San Jose, Seattle, Chicago, Dallas, Atlanta, Ashburn, New York) and/or European (London, Frankfurt, Amsterdam) servers. Influxis seems to be in another level altogether than their competitors, yet once you have a large site setting up your own server farm using Flash Media Interactive seems the better value option. However, this is where the value of a CDN will really come into play. And thats the reason why the price difference between Influxis and Limelight/Akamai is a little worrying. You can't help but think how much extra service/product are you getting for that money. Is it money well spent? Is Influxis simply taking a lower cut? I'd love to answer, but my hosting is not past the $20,000 a month. If your site pulls that much traffic, setup a meeting with them and find out face to face.

Whats The Performance Comparison

This part of the tutorial is possibly the simplest part.

If the numbers add up, choose the CDN every time. If your site is still at the very early stages, using a development server for a while might actually work. Just don't get more than 10 users at a time! (From experience, 10 users online at once usually means around 15,000 uniques a month).

Which Solution Is Best For Me

How To Setup Flowplayer For Streaming

Ok, this is possible the reason a lot of you started reading this tutorial. And I've saved it until the end to tell you that the demos/documentation already cover this in great detail! Try these links out:

Author

Author: Liam Gooding
Website: Goodings Media UK Web Development

I hope you find this useful. This tutorial is intended to be a work in progress, and I'd very much like users to pick it apart on the forums so that we can improve it and make it as informative as possible.




This tutorial is the work of the author only, and does not represent Flowplayers opinion in any way. If you have something interesting to say about web videos please contact us on support@flowplayer.org and we are happy to publish it.