Flash Media Server vs Red5


fmsvsred5

Everyone who’ve ever tried to build any kind of rich, multimedia web application, based on some sort of flash streaming technologies, must have heard about either Flash Media Interactive Server or Red5. Most of those people if being asked, will automatically answer, that Red5 is a great, full featured alternative for very expensive Adobe’s FMS product. But in my opinion only those, who’ve ever written some serious applications using both servers are allowed to compare laudly Red5 to FMS3.

I’m definitely not saing that I’m an expert, but for the last couple of months I’ve been developing few different real time social applications using both Flash Media Interactive Server and Red5. I’ve spent many, many nights trying to get exactly the same functionalities from those two different technologies. And in fact I must admit, that  I was able to create almost everything I wanted using both of them. So the question is: why should anyone pay for the very expensive FMS if there’s a free Red5 alternative avaliable, with exactly the same functionality? And the answer is: cause even though, you can do almost everything in Red5, there are some serious differences between them, mostly in their performances, that may give you a big headache :) .

So, if you’re just in the middle of deciding which technology you want to use as your streaming service, than maybe this post will save you some time and help you choose the one that’s going to fill all your needs.

Here’s the list of main differences between Flash Media Interactive Server 3 and Red5 server, which I’ve found out during my latest experiments. I’m not going to cover them all, cause that’s what documentations are for. I just want to mention the most important ones from the developer’s point of view, and the ones that are the most crucial in programming video-chat based appliactions.

Video streaming

Both FMS and Red5 servers are great solution for  building ‘YouTube like” video streaming services – either it’s going to be a Video on demand or live broadcasting application. You can use Flash Media Encoder with both servers to broadcast live videos, or you can write your own Action Script 3 code using Camera and Microphone classes.

The only question is about the performances of both services when there’s a lot of users connected? I know that people say that Java services are very heavy, etc. But from my experience, both servers work perfectly well on the same machine, when serving the same amount of users. So in other words, for simple video broadcasting applications Red5 should be absolutely enough.

Server side programming language

  • FMS is using an old version of Action Script, I’m pretty sure it’s an AS 1.0. It’s definitely very poor and old programming language for such a powerful application the FMS is. It supports only 10 or 12 server side classes (I can’t remember exactly from the top of my head), which are definitely not enough for modern server side programming languages.
  • Red5 in other hand has everything you could dream of for server side programming. It’s been completely written in Java, and it comes as a Tomcat installation. What does it mean in practice? It means, that you have the whole Java API for server side programming, which can be used for almost anything you want. This is a huge, and in my opinion the biggest adventage of Red5 over FMS

Streams republishing

  • FMS has this absolutely great feature, which lets you manualy handle video streams using the server side code. On of the greatest adventages of this feature is, that it lets you republish the same live stream to many different FMS servers. In practice, that means that if your primary server is overloaded, you can republish some of it’s live streams to other FMS servers, and switch users between them transparently. This is a very cool feature when thinking about video-chat based applications.
  • In Red5, …hmmmm, I’ve tried very hard and still wasn’t able to neither handle the streams manually server side, nor republish them to another Red5 server. Maybe it’s possible, and I just couldn’t find it. But I’ve read a lot of documentation on the web, I’ve studied Red5 Java source code, and still couldn’t do it. If it’s in fact not possible, than it may be the cause of some serious problems if you want to stack together many different streaming servers. And when you’re thinking about building huge social service, then one machine may not be enough to handle it.

Shared objects

Shared objects are very cool feature that let’s you very easily synchronize data between connected clients. SharedObject classes are actually avaliable in both FMS and Red5 servers, and they work very well. You can build any kind of chat related application in just a few lines of code (I’ll try to prove it soon in one of my next posts). So, in terms of SharedObjects, we have a tie between both technologies :)

Video security

  • FMS has some very useful and easy to use features for protecting it’s video .flv files, like: rtmpe steaming protocol (encrypted version of rtmp protocol), connection passwords (which can be used to authenticate clients with FMS server),webpage and .swf urls verifications (protects your server side application from unwanted connections), and last but not least, .swf files checksum verification, which practically guarantees, that only trusted Flex applications can connect to your server.
  • Red5, from what I know, doesn’t have neither of the above security features (maybe except password authentication which is very easy to implement). The only thing that you’re able to do with it, is to encapsulate it’s rtmp packages in SSL protocol, which gives you similiar functionality to FMS’s rtmpe protocol.

Bandwidth detection

  • FMS is able to automaticaly detect each client’s interenet connection speed, and perform different tasks depending on it’s findings.
  • Red5 doesn’t currently support that kind of functionality.

Dynamic quality switching

FMS 3.5 has this new, very cool feature that let’s you switch the video streams dynamically, based on the current, momentary bandwidth of the client who’s watching it. So for example, if you’re downloading to many things from the web the same moment you’re watching the video, FMS will serve you a lower quality file. But once you’ll finish the download and your current bandwidth will be higher, FMS will transparently swich you to a better quality file and you won’t even see when.

Red5 doesn’t have this feature.

Video-chat based functionality

The last, but the most important feature. Well, acutally it’s not a feature, but kind of summary of all my experiments and findings I’ve briefly written above. For the last couple of months I’ve been trying to build two video-chat based applications using both servers, and as I’ve mentioned earlier, Iwas able to do it using both technologies. The only problem lied in the performance of those two applications. Here’s what I’ve found out

  • With no doubt, Flash Media Interactive Server 3.x has been dedicated for creating live video social applications,  like for example video chats. It works great, it’s stable, the screen never freezes, you have a full control server side over all streams, you can record them into one .flv file or change their names dynamically. FMS also supports AS3 NetStream.receiveVideoFPS() method, which let’s you manage your client’s bandwidth very efectively. In other words, it has absolutely everything you need to build fully featured, proffesional, video based social applications.
  • And what about the Red5? Well, in my opinion Red5 is absolutely enough if you want to build a simple, video on demand or live broadcasting applications, like for example YouTube. It’s also enough if you want to use it for recording videos from the client webcam. In both cases, Red5 should fill all your needs. But from my experience, it’s not the best solution when talking about huge social application, which will be using many streaming servers clustered together. After a lot of experiments, I still was able to finish my video-chat based project, but there was always something unstable in Red5 performance. Live streams doesn’t switch as well as in FMS, screen freezes sometimes during the switching (even when I’m testing it on the localhost), and I still can’t find a good way to neither republish, nor secure my video streams like I can do it using FMS.

In other words, my suggestion is, that if you’re planing to build vide-chat based application, and you haven’t chosen the backend technology yet, than pick up the FMS3. If you want to sleep well and not worry about your application’s performance, you should use Flash Media Interactive Server even though it’s so expensive – I think it’s worth it’s price.

  1. #1 by aplikasi sabung Ayam s128 at August 22nd, 2019

    Ꮃonderful beat ! I woulԁ like to apprentice at the ѕamе time as you amend your
    website, how can i suЬsсгibe for a blog sіte? The аccount aided me a applicable
    deal. I had been tiny bit acquainted of this your broadcast
    provided vibrɑnt transparent concept

(will not be published)