Red5 Webapps Online Application Generator

August 29th, 2010

The Red5 Webapps Online Application Generator is a very simple but effective utility to generate Red5 application online. This application gives you the power to create red5 applications without having any knowledge of programming. You can generate streamer applications, with live broadcasting, streaming, recording and shared-Object capabilities in a single click. No compiling/editing needed.

The application takes configuration inputs using a simple flash based front end, and generated red5 application for you by injecting those information’s into a application template at runtime.

The generator is located here Red5/Webapps Application Generator.

How to use:

1. Select a Red5 application from the drop down list of available applications. You can read the description of the application in the description box, once you have selected a application.

2. Then enter the name of your rtmp application in the text input box provided below the application list drop down. (no spaces). This will be the context name that you will connect to : rtmp://server/appname

3. Below the description box, you will find the “Stream Directory Path” option. Use this to select between absolute/relative path schemes. This will set the location for recording/playing streams using the application.  In many cases where you may want the streams directory to be on a location other than the default streams folder under red5, you can use absolute path scheme to specify the path to your custom streams directory.

To select a path scheme select one of the radio buttons .

4. Enter appropriate relative/absolute paths in the text input boxes.

For absolute path scheme on linux file systems , use :      /home/……

For absolute path scheme  on windows use :                   c:/…..

* Relative path schemes remain same for linux and windows , though you wont use “../” to traverse backwards in either.

5. Press “Generate & Download” button to generate the specific application from its application template.

6. Press “ok” when your are prompted to download your application.

7. You may also want to read the description text to kn ow more about the selected application before generating your own copy.

Keep checking back for newly added Red5 applications at:

http://flashvisions.com/

red5 and ffmpeg

August 26th, 2010

One of our customers asked if he could stream through the ffmpeg folder.

FFmpeg is a software which converts video files in different formats to video files in flv format this videos are then streamed through a swf player just like the streaming of red5 videos, which are also on flv format. so ffmpeg is not to stream is to convert the file to a a format in which the video can then be streamed.
let me give you an example of the use of ffmpeg, if you go to http://movieback.com/  (login visio passw. 123456) you can upload a video what ever format, for example in wmv which can only be played on windows media player or similar and then this video in wmv is converted to flv and you can then stream it.

but there is also a difference on the stream, with red5 you have the advantage of:

The advantages of a streaming red5 server are:

    1. Users can seek to any place in the video timeline without waiting for the whole video to buffer
    2. No physical data is saved on the users PC cache, so your media files are better protected
    3. It uses less bandwidth than progressive*
    4. Streams can be combined into a single gapless stream

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

Progressive streaming is the normal one, like on our demo site http://movieback.com/

How To Install FFmpeg, Mplayer, Mencoder, FFmpeg-PHP on a CentOS server

February 13th, 2010

I tried first to use the installer of Script Mantra but for some reason there were errors sometimes the Liba52, sometimes the Mplayer were not installed, so I just gave up and used the autoinstaller just to remove all traces of ffmpeg on the server, then I used the yum to install it, it was quicker and everything was installed, lets go step by step then.

Install ffmpeg, mplayer, mencoder with all supported modules.

# yum -y install ffmpeg ffmpeg-devel mplayer mencoder flvtool2

it will download everything to your server and install it, depending on your server connection to the internet, but on my server it was very quick perhaps 10 minutes.

Install FFMPEG-PHP

ffmpeg-php is an extension for PHP that adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files. ffmpeg-devel and php-devel is needed to compile ffmpeg-php from source code. Use following steps to install ffmpeg-php

# cd /usr/src
# wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2?use_mirror=ignum
# tar jxvf ffmpeg-php-0.6.0.tbz2
# cd ffmpeg-php-0.6.0
# phpize
# ./configure
# make
# make install

It will copy the ffmpeg.so module in php default module location. Now you have to edit php.ini file to enable ffmpeg-php support in it by using ffmpeg.so module.

Go to your server php.ini normally it should be on /usr/local/lib  and add the following line at the bottom:

extension=ffmpeg.so

Restart Apache, you can use the WHM  or enter the command in shell

# /etc/init.d/httpd restart

Now run following command to ffmpeg module listing in php.

#php -m | grep ffmpeg

Thats it! Easy no?

What is teamspeak? Well, Teamspeak is a program that allows people to speak with each other.

January 26th, 2010

How does it works? Simple, a server host run a teamspeak server, and the user on its computer has the teamspeak client. This client connect to the server, and can create channels to speak with the people. The client only can connect via a teamspeak server, not directly to another user.

When can I use that? Every moment, if you playing a game,  working, or you want to speak with a friend.

Ok, I have a server (with a web of World of Warcraft, and many players would like play and speak at the same time), and I’m interesting to install the teamspeak server. How will I go about?

1º – Download the teamspeak server
http://www.teamspeak.com/?page=downloads&archive=1
NOTE : Download the server 2.0.23.19 and the  updated binary 2.0.24.1

2º – Create (via shell) a path to your teamspeak,
like /home/teamspeak

3º – Unzip the ts2_server_xxx.tar.bz2 in the /home/teamspeak (with the command : tar -xjf  ts2_server_xxx.tar.bz2 )

4º – Shell:
cd tss2_rc2
./teamspeak-server_startscript start

And the screen show that the teamspeak server is now on.

5º- Now, you teamspeak server is working. It is necessary to open default ports in your host : 14534, 51234 and 8767

6º – in the shell:
./teamspeak-server_startscript stop
Stop the teamspeak, open the file server.log, and find the admin and superadmin passwords. Start again the teamspeak
./teamspeak-server_startscript start

7º – Paste on your web browser : www.yourdomain.com:14534 and login as superadmin, (click on the link at the bottom of the page)

8º- Configure de superadmin settings and then login as admin to configure some more settings: name server, max clients, private clan…

9º – Install your teamspeak client: http://www.teamspeak.com/?page=downloads&archive=1 (if your computer is running on windows use the windows option.)

10º – Execute the teamspeak client and quick connect to your site (yourdomain.com:8767)
NOTE: If you have problems to connect with yourdomain.com:8767, prove with the IP of your server XXX.XXX.XXX.XXX:8767

11º – Now, you can speak with other people in the same channel.

12º – Review all configurations : micro, sounds, channel, pass. , create new channels, add registered users,…

- Works fine !!!. And now, can I show the teamspeak server information? You can download the ‘teamspeak viewer’:
http://www.kitnetwork.de/wbb/contents/downloads-sonstiges/p1007-teamspeak-viewer/
Edit the TSV_Config.php with the details of your server, and to view the status of your teamspeak server use the TS_Viewer.php (like this: http://www.quintelosky.com/ts/TS_Viewer.php )

This article was written by the webmaster of http://www.quintelosky.com/

How To Install RED5 version 0.8 or 0.9 on CENTOS

January 17th, 2010

RED5 is open source flash server written in java supports streaming audio/video, recording client streams, shared objects, live stream publishing etc. In this short steps you can install red5 server on your virtual server or dedicated.

Download and Install Java

RED5 server depends on Java, so lets install it first using yum:

# yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel

Download and Install Ant (Apache Project)

Ant will need to compile RED5 server code. Ant comes in binary form, so just download and install it in /usr/local directory. This step may cause problems because they all always updating the apache ant and changing the name of it, so sometimes the binary is called apache-ant-1.8.0RC1-bin.tar.gz sometimes apache-ant-1.8.0-bin.tar.gz so you will have to get the correct link, go to http://opensource.become.com/apache/ant/binaries/ and find what they have, get the one which ends on tar.gz, should be about 9-10 mega file, so edit the link down to the correct one;

# cd /usr/src
# wget http://opensource.become.com/apache/ant/binaries/apache-ant-xxxxx-bin.tar.gz    (replace apache-ant-xxxxx-bin.tar.gz with the correct file)
# tar zxvf apache-ant-xxxxx-bin.tar.gz   (replace apache-ant-xxxxx-bin.tar.gz witht he correct file)
# mv apache-ant-xxxxx/ /usr/local/ant     (pay attention, replace xxxxx with the correct version)

Export Variables for Ant and Java

# export ANT_HOME=/usr/local/ant
# export JAVA_HOME=/usr/lib/jvm/java
# export PATH=$PATH:/usr/local/ant/bin
# export CLASSPATH=.:$JAVA_HOME/lib/classes.zip

Also export these variables in /etc/bashrc to become available for every user login or for any terminal opens.

# echo ‘export ANT_HOME=/usr/local/ant’ >> /etc/bashrc
# echo ‘export JAVA_HOME=/usr/lib/jvm/java’ >> /etc/bashrc
# echo ‘export PATH=$PATH:/usr/local/ant/bin’ >> /etc/bashrc
# echo ‘export CLASSPATH=.:$JAVA_HOME/lib/classes.zip’ >> /etc/bashrc

Download and Install RED5 Server

Now we come to the main part, which one you want? 0.8, 0.9, 0.7??

you can find the various versions available at:

http://red5.googlecode.com/svn/java/server/tags/

if for example you want version 0.8, then the command would be:

svn co http://red5.googlecode.com/svn/java/server/tags/0_8_0/ red5

if you want the 0.9, then:

svn co http://red5.googlecode.com/svn/java/server/tags/0_9rc1/ red5

so lets say we take 0.8 version:

# cd /usr/src
# svn co http://red5.googlecode.com/svn/java/server/tags/0_8_0/ red5
# mv red5 /usr/local/
# cd /usr/local/red5
# ant prepare
# ant dist

you will see lots and lots of lines, but you should get at last

BUILD SUCCESSFUL

that’s mean its install and now copy the conf directory from dist/ and test the red5 installation.

# cp -r dist/conf .
# ./red5.sh

If it shows Installer service created in the last then everything is fine here, press ctrl+c

Now go to the red5 folder:

# cd /usr/local/red5/dist

command to stop red5:

# sh red5-shutdown.sh
sometimes it is better to use:
# killall -9 java

Command to start red5:

# cd /usr/local/red5/dist

# sh red5.sh &

When Red5 is running you should be able to access http://your-server-domain-or-ip:5080/ .

If it works first thing go to http://your-server:5080/installer/and install admin. Then to http://your-server:5080/admin/register.html and register an username and password. Then you can check application statistics anytime from http://your-server:5080/admin/ with server ip and the registered username, password.

RED 5 RESTART

You need to restart every time you add or update files in the /usr/local/red5/dist/webapps folder – where all applications should be installed.