Archive for March, 2014

Install Red5 on Windows 7 (64-bit)

Install Red5 on Windows 7 (64-bit)

We will install Red5-0.9.1 on Windows 7 (64-bit). We will also install some required features for further development and use.
Those are :
Java Development Kit v.1.6
apache-ant v.1.7

1. Download and Install the 32-bit version of the JDK 6 (jdk-6u29-windows-i586.exe).
Copy the ….\Java\jdk1.6.0_29\bin\java.exe  and paste it in …..C:\Windows\SysWOW64.
We need this specific java version because Red5 version 0.9 is compatible with Java Version 1.6 & eclipse galileo is compatible with the 32-bit version of JDK.

2. Download apache-ant version 1.7( from
NOT version 1.8 because it creates some kind of problem with the javac.
So download the file and extract it on your Hard Disk. I put it in C:/Program Files (x86)/Java to keep it all together.
Rename the extracted folder to Ant.

3. Download and Install Red5-0.9.1 for windows, from .
Change the install directory to C:/Red5.
Enter IP Adress : (for local install).
Enter Port Number : 5080.

4. Download from .
Extract the folder eclipse somewhere on your Hard Disk. I put it in C:\eclipse.
No need to install, to run just double click the eclipse.exe.

5. IMPORTANT: Enviromental Variables
To set the Enviromental Variables, go to control panel -> system -> Advanced system settings -> Enviroment Variables.
Select Path->edit and add the ANT path. example : …..;C:\Program Files (x86)\Java\Ant\bin;….
Select Path->edit and add the JDK path. example : …;C:\Program Files (x86)\Java\jdk1.6.0_29\bin;..
Select New and add name: ANT_HOME . value the Ant path for example C:\Program Files (x86)\Java\Ant
Select New and add name: JAVA_HOME , value: the jdk path for example C:\Program Files (x86)\Java\jdk1.6.0_29
Select New and add name: JAVA_VERSION , value: 1.6
Select New and add name: RED5_HOME , value: C:\Red5

6. To start Red5 run red5.bat and to stop run red5-shutdown.bat. It’s better to use the red5-shutdown.bat to close it, to avoid malfunction.
On your browser type “localhost:5080” to start using Red5.
Choose “Install a ready made application”. Install everything except audiotranscoder and videotranscoder. They require to install xuggle first. (but xuggle is not compatible with windows 7 64-bit, so we won’t be able to install any application that requires xuggle).
Choose “Launch a demo to use an installed application.

What is and how to install Red5 in Windows

What is and how to install Red5 in Windows?

I started looking at Red5 these days and decided to write a post about it.

What is Red5?

Many years ago Adobe (legacy Macromedia) created a software called Flash Communication Server. This was a media server that allowed users to transfer real-time data, audio and video to create multi-user applications. Adobe changed its name to Flash Media Server or FMS. To send data it uses a protocol called RTMP (Real Time Messaging Protocol) and a data format known as AMF (ActionScript Message Format).

The license is pretty expensive. The cheapest one is about 999 USD and the most expensive one 4500 USD (or more) and not so many people and/or small companies have this amount of money for a single software.

A cheaper alternative is SmartFox Server that is very similar to Flash Media Server and manages prices between 500 a 2000 euros. This server is better for MMO games and supports connections not only from Flash but also from Unity, Silverlight, .net, Java, Android and iPhone. You can also buy an isometric game engine called OpenSpace by paying 2200 euros more. It keeps being expensive though.

A better approach is using Red5 which is a Flash Media Server clone, with the difference this is open-source and free. The only problem is its lack of documentation and that its installation is not as straightforward as FMS. I’ll explain the installation process in Windows below.

Installing Red5

This process describes how to install Red5 version 0.9.1.

Download: Lets download the installer from Select the download depending on your operating system.

Install JDK: If you do not have Java installed, download the latest version from Download the right version for your 32 or 64 bits operating system.

Set the environment variables in Windows: You have to create a JAVA_HOME environment variable so that other applications and Red5 know where to find Java.

In Windows XP you have to right-click “My Computer” and select “Computer” properties, and then click the “Advanced” tab. In Windows Vista or 7 you have to right-click on “Computer” and select “Properties”, then click Advanced System Settings and the “Advanced” tab.

Click on Environment Variables. In “System Variables”, click the “New” button and type JAVA_HOME in the “Variable Name” box and the path were JDK installed in the “Variable Value” box. Let’s say you installed it in C:Program FilesJavajre1.6.0_23, it all depends on the version and settings you chose when installing.

There is an extra step for 64-bits versions of Windows. When you install Java, some files are copied to the C:WindowsSystem32 folder, but you also need to copy them in the C:WindowsSysWow64 folder. In this case you only need to copy the C:Program FilesJavajdk1.6.0_23binjava.exe file to C:WindowsSysWow64.

Installing RED5: Execute the Red5 installer (setup-Red5-0.9.1.exe). By default you install it in C:Program FilesRed5 or C:Program Files (x86)Red5 for 64 bits systems. When you are prompted for an IP address type When prompted for a port type 5080.

Start the RED5 server: Open up the “Control Panel” and select Administrative Tools and then Services. In the list of services look for RED5. Select it and start the services by clicking the “Start service” link or by right clicking the service and selecting Start. If start is not enabled then the service is already running.

Testing RED5: To test RED5 open this URL in a browser http://localhost:5080/. The RED5 home page must open and if it does everything installed correctly. Before running the examples you must install them first. Open the following URL http://localhost:5080/installer/ select the example you want to install and press Install (install SOSample for example). Then from the Red5 home page (http://localhost:5080/) click “Launch a demo” to see the list of demos. We can now open the Shared Ball demo in many browser windows and click the connect icon on each of them to connect the samples to the server. Then if you drag the Red5 logo, you’ll see how it moves in the other browser windows as well.

And now what?

If you wish to see the source code, the server code is located inside the Red5 installation folder C:Program FilesRed5webapps or C:Program Files (x86)Red5webapps for 64 bits systems. To get the client Flash code you can use TortoiseSVN or any other subversion client to get them from (Flash samples) or (Flex samples). The Flash samples were written in ActionScript 2.0, so you’ll have to translate them to ActionScript 3.0 but this is not complicated.

If you don’t want to translate code you can write your own. To connect to Red5 you use the NetConnection class, to exchange data you use RSOs (Remote Shared Objects) and to send and receive audio/video use the NetStream class. To create en RSO just use the following line of code:

var rso:SharedObject = SharedObject.getRemote(
"NombreRSO", "rtmp://localhost/NombreApp");

You just have to play a little and see the samples to get the rest done.

%d bloggers like this: