Tuesday, June 1, 2010

Installing Red5 on windows

Installing Red5 is easy as explained below.
  1. Before installing Red5 we need to make sure java is installed on the target machine. Because Red5 needs to java.
  2. If java is not installed then download the latest version of java and install it.
  3. Make sure the JAVA_HOME environment variable is set to the java installed root directory.
  4. To set the environment variable, right click "My Computer" in start menu/desktop and go to properties. Go to "Advanced" tab and there you will see a button named "environment variables" at bottom. Clicking it will open a dialog which will let you add your own variable. Click "New" button in the top section i.e., User variables and int the popup eneter JAVA_HOME for variable name and root directory of the java for variabl value as shown below
  5. Now you are ready to install the Red5. Download the latest version of Red5 from http://code.google.com/p/red5/ and install it.
  6. During the installation you may be asked to enter your ip address and port number (for version Red5 0.9.0 Final) to run the http protocol for Red5. You can enter your ip address or the dns name. But you must remember this as this is the one you need to use always. If you enter ip address during installation and use dns name in application then it will not work. You should use the one what you entered during installation. I don't know the reason but I experienced this. But if you are not asked to enter IP address (for version Red5 0.8.0 Final) then there will be no issues with the dns name to access the server. In this case the default port number is 8080.
  7. After Red5 installation is complete then you need to start the service.
  8. You can verify whether the Red5 is running and working fine by browsing to http://ip_address:port_number in any browser. The ip_address and port_numbers should be same as the ones entered during installation. Or the dns name and default port number 8080 will work work in the second case explained in the above step. If the server is working fine then you will be able to the server's home page which will talk about some demos, etc.

Audio recorder in website

One of our clients had a requirement having an audio recorder to be integrated with his website. He wanted record and playback features. This was challenging job to me and I did lot of research in this and finaly found one third party tool which serves exactly. The tool was FLV Audio Recorder developed by AVChat Software. You can get more details in it's website http://flvar.com/.

But this needs one the below media servers. Media servers are same as conventional web servers but they only deal with storing and streaming of videos, audios and images. Media servers use a different protocal called RTMP to accept the video/audio requests same as HTTP is used to accept various kinds of requests.

  1. Red5
  2. FMIS
  3. Wowza

The 1st media server listed above, Red5 is available for free and rest are expensive. I was interested to use Red5 as it was freely available.

To integrate the audio recorder in website I did the following:

  1. I got the 30-day trial version of FLV audio recorder. We need to request for trial version by filling a small form and they will email us with the download details of trial product. This will include a license key which needs to be entered in the product.
  2. I unzipped the archive and placed in some folder. And I created a virtual directory in IIS pointing to this folder. So I have verified all the files in audio recorder are accessed by webserver.
  3. I installed the Red5 media server as explained in the post http://cherupally.blogspot.com/2010/06/installing-red5-on-windows.html.
  4. I followed the installation instructions provided in http://flvar.com/documentation.
  5. I entered my license key in audiorecorder.properties file as instructed.
  6. I changed the avc_settings.php file to point to my red5 server.
  7. That's it. I am done with the integrating stuff. When I opened the audiorecorder-api.html file in browser I have noticed the audio recorder rendered in flash and functioning well.
  8. After completing all steps you may not get the audio recorder working until you reboot the machine. I had to reboot my machine to see the recorder working.

kick it on DotNetKicks.com