How To Install the latest FFmpeg, Mplayer, Mencoder, FFmpeg-PHP on 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 5.4

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.

RTMP and video streaming

January 15th, 2010

RTMP path is not a link for streaming videos, it is a path to a a folder on red5 which will allow your red5 application to connect to red5 on our servers. Did I make it a bit clear?

for example lets take this application:
http://red5stream.com/videoconference/

for this application to work we uploaded a folder called videowhisper to red5/webapps folder inside the server then on this script http://red5stream.com/videoconference/ there is a file called settings.php and we entered this rtmp path which was:
rtmp://216.67.244.116/videowhisper

now do you see how it works?

red5 hosting or Real Time Messaging Protocol (RTMP) hosting

January 8th, 2010

Real Time Messaging Protocol (RTMP) is a protocol for streaming audio, video and data over the Internet, between a Flash player and a server. A special software is required to run on server side for accepting and serving the rtmp connections from flash clients. We provide managed RTMP hosting based on RED5.

Red5 is shared on our shared hosting plans that means although you can use red5 to stream your videos you will not have access to the red5 folder. Most scripts based on red5 need to upload a folder inside red5/webapps.

This folder is important because it will be on the RTMP path, ex.

rtmp://your-server-ip/folder-name

Contact us so we can upload your folder to red5/webapps and then give you the rtmp path.

RTMP Hosting