Install rtmpdump in CentOS


Hits: 10189  

I was compiling FFmpeg with RTMP support, but it requires librtmp >= 2.2.f

[root@svnlabs ffmpeg]# ./configure –enable-gpl –enable-nonfree –enable-libmp3lame –enable-libfaac –enable-librtmp –enable-libtheora –enable-libvorbis –enable-libx264 –enable-shared –enable-postproc –disable-yasm
Package librtmp was not found in the pkg-config search path.
Perhaps you should add the directory containing `librtmp.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘librtmp’ found
ERROR: librtmp not found or RTMP_Socket() missing, librtmp version must be >= 2.2.f

If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file “config.log” produced by configure as this will help
solving the problem.
  
[root@svnlabs ffmpeg]# rtmpdump -v
RTMPDump v2.2e
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
ERROR: You must specify a hostname (–host) or url (-r “rtmp://host[:port]/playpath”) containing a hostname

Compiling latest rtmpdump-2.3.tgz

[root@svnlabs rtmpdump-2.3]# yum install openssl-devel

[root@svnlabs rtmpdump-2.3]# wget http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz

[root@svnlabs rtmpdump-2.3]# tar xvf rtmpdump-2.3.tgz

[root@svnlabs rtmpdump-2.3]# cd rtmpdump-2.3
[root@svnlabs rtmpdump-2.3]# make
[root@svnlabs rtmpdump-2.3]# make install

Latest rtmpdump successfully installed…

[root@svnlabs rtmpdump-2.3]# rtmpdump
RTMPDump v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
ERROR: You must specify a hostname (–host) or url (-r “rtmp://host[:port]/playpath”) containing a hostname
 
 
[root@svnlabs rtmpdump-2.3]# whereis librtmp
librtmp: /usr/local/lib/librtmp.a /usr/local/lib/librtmp.so

If You still have issue … you can try magic path command 😉

# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

 

How to check RTMP source stream is live or not?

 

VOD to iOS


Hits: 6439  

FFMpeg to encode and segment input video stream in the correct format for HTTP streaming protocol.

Download & Install HTTP Live Video Stream Segmenter and Distributor

# /usr/local/bin/live_segmenter <segment length> <output location> <filename prefix> <encoding profile>

 

M3U8 File:

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:10,
http://ip-address/streamingvideo/test.m3u8-00001.ts
#EXTINF:10,
http://ip-address/streamingvideo/test.m3u8-00002.ts


….

#EXTINF:10,
http://ip-address/streamingvideo/test.m3u8-00011.ts
#EXT-X-ENDLIST

Errors:

Segmenter error: Could not open input file, make sure it is an mpegts file:

ffmpeg: relocation error: /usr/local/lib/libavfilter.so.1: symbol av_expr_free, version LIBAVUTIL_50 not defined in file libavutil.so.50 with link time reference

Point FFMpeg to the proper files

# export LD_LIBRARY_PATH=/usr/local/lib

OR

# sudo ldconfig -v

We worked on RTMP (Live Red5 CAM) to iOS (iPhone or iPad). Get more help for HTTP Live Video Stream Segmenter and Distributor Contact Us

RTMP (Red5) -> FFMpeg -> Segementer -> .ts files -> iOS (m3u8)

Helpful links:
C++ RTMP Server – http://www.rtmpd.com/
mpegts-segmenter – https://github.com/ElegantCloud/mpegts-segmenter

Install ionCube Loader


Hits: 6492  

1. Download ionCube loaders

# wget http://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz

2. Extract

# tar zxvf ioncube_loaders_lin_x86.tar.gz

3. Move to /usr/local

# mv ioncube /usr/local/

4. Add reference to php.ini file

Depending on PHP version select ioncube_loader_lin_5.x.so and ioncube_loader_lin_5.x_ts.so files

# ls /usr/local/ioncube/
ioncube_loader_lin_4.1.so ioncube_loader_lin_4.4.so ioncube_loader_lin_5.1.so ioncube_loader_lin_5.3.so
ioncube_loader_lin_4.2.so ioncube_loader_lin_4.4_ts.so ioncube_loader_lin_5.1_ts.so ioncube_loader_lin_5.3_ts.so
ioncube_loader_lin_4.3.so ioncube_loader_lin_5.0.so ioncube_loader_lin_5.2.so ioncube_loader_lin_5.4.so
ioncube_loader_lin_4.3_ts.so ioncube_loader_lin_5.0_ts.so ioncube_loader_lin_5.2_ts.so ioncube_loader_lin_5.4_ts.so

# vi /etc/php.ini

zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.3.so
zend_extension_ts=/usr/local/ioncube/ioncube_loader_lin_5.3_ts.so

5. Restart apache

# /etc/init.d/apache2 restart

Kaltura Video Platform


Hits: 3665  

How to install 2 different Kaltura Video Platform on same server?

1. Community Edition v5.0.0 eagle-10-02
2. Community Edition v4.0.0

Goto kalturaCE_v5.0.0 if kalturaCE_v4.0.0 already installed

Rename old databases to prefix _4 like kaltura_4

# php install.php
Thank you for installing Kaltura Video Platform – Community Edition

A previous installation attempt has been detected, do you want to use the input you provided during you last installation? (Y/n)
> n

In order to improve Kaltura Community Edition, we would like your permission to send system data to Kaltura.
This information will be used exclusively for improving our software and our service quality. I agree (Y/n)
> Y

If you wish, please provide your email address so that we can offer you future assistance (leave empty to pass)
> sandeep@gmail.com

Please provide the following information:

The following apachectl script has been detected: /usr/sbin/apachectl. Do you want to use this script to run your Kaltura application? Leave empty to use or provide a pathname to an alternative apachectl script on your server.
>

The following PHP binary has been detected: /usr/bin/php. Do you want to use this script to run your Kaltura application? Leave empty to use or pr ovide a pathname to an alternative PHP binary on your server.
>

Full target directory path for Kaltura application (leave empty for /opt/kaltura)
> /var/www/html/kaltura

Please enter the domain name/virtual hostname that will be used for the Kaltura server (without http://)
> kaltura.svnlabs.com

Your primary system administrator email address
> sandeep@gmail.com

The password you want to set for your primary administrator
> password

Database host (leave empty for ‘localhost’)
>

Database port (leave empty for ‘3306’)
>

Database username (with create & write privileges)
> root

Database password (leave empty for no password)
> password

The URL to your xymon/hobbit monitoring location. Xymon is an optional installation. Leave empty to set manually later
Examples:
http://www.xymondomain.com/xymon/
http://www.xymondomain.com/hobbit/
>

Verifing prerequisites

Checking for leftovers from a previous installation
Target directory /var/www/html/kaltura already exists

Leftovers from a previouse Kaltura installation have been detected. In order to continue with the current installation these leftovers must be rem oved. Do you wish to remove them now? (y/N)
> Y

killing sphinx daemon if running
sh: /var/www/html/kaltura/app/plugins/sphinx_search/scripts/watch.stop.sh: No such file or directory
Stopping sphinx if running
Stopping the batch manager if running
Deleting /var/www/html/kaltura

Installation is now ready to begin. Start installation now? (Y/n)
> Y

Copying application files to /var/www/html/kaltura
current working dir is /var/www/html
Copying binaries for linux 64bit
Replacing configuration tokens in files
Changing permissions of directories and files
Creating and initializing ‘kaltura’ database
Creating and initializing ‘kaltura_sphinx_log’ database
Creating data warehouse
Creating Dynamic Enums
Configure sphinx
Populate sphinx tables
Changing permissions of directories and files
Creating system symbolic links
Deploying uiconfs in order to configure the application
Creating the uninstaller
Running the generate script
Running the batch manager
Running the sphinx search deamon
Executing sphinx dameon
Executing in background nohup /var/www/html/kaltura/app/plugins/sphinx_search/scripts/watch.daemon.onprem.sh
sh: /opt/kaltura/log/instlBkgrndRun.log: No such file or directory
Executing in background chkconfig sphinx_watch.sh on
sh: /opt/kaltura/log/instlBkgrndRun.log: No such file or directory
Changing permissions of directories and files
Post installation email cannot be sent

Installation Completed Successfully.
Your Kaltura Admin Console credentials:
System Admin user: sandeep@gmail.com
System Admin password: password

Please keep this information for future use.

To start using Kaltura, please complete the following steps:
1. Add the following line to your /etc/hosts file:
127.0.0.1 kaltura.svnlabs.com
2. Add the following line to your Apache configurations file (Usually called httpd.conf or apache2.conf):
Include /var/www/html/kaltura/app/configurations/apache/my_kaltura.conf
3. Restart apache
4. Browse to your Kaltura start page at: http://kaltura.svnlabs.com/start

Full installation will create new database …

1. kaltura
2. kalturadw
3. kalturalog
4. kaltura_stats
5. kalturadw_ds
6. kalturadw_bisources

Now you need to manage which database is for v4.0.0 and other for v5.0.0

You can edit database config files here “(/var/www/html/kaltura/app/alpha/config)”

1. kConfLocal.php
2. databases.yml

Use the Preview & Embed feature within KMC to embed Kaltura Media Players on your website.

Find Kaltura Extensions here http://exchange.kaltura.com/category/application-category/extensions

MySQL open files limit


Hits: 5506  

Upgrade Migration – Kaltura CE 4.0 to 5.0

I was migrating Kaltura from CE 4.0 to 5.0 but following MySQL error made me unhappy 🙁

One or more prerequisites required to install Kaltura failed:
Please set ‘open_files_limit >= 20000’ in my.cnf and restart MySQL (current value is 1024)

# ulimit -a | grep “open files”

# ulimit -n (get and set user limit on resources)

mysql> show variables like ‘open_file%’;

The open file limit is an important variable for performance when MySQL server has to open several files at once. If open_files_limit is set to a lower value then MySQL query might fail causing other problems or might take too long to execute.

Then I have changed /etc/my.cnf

I had put the open_files_limit line in the [mysqld_safe] section, but it seems that section is no longer used. So, I have Moved all config options to [mysqld]

Even Lion Takes few Step Back Before It Jumps forward… So whenever Life Pulls u Back, Don’t Worry, It’s Going To Lead you forward To A Great Victory!

Upgrade PHP & MySQL on Plesk 10


Hits: 3212  

1. Stop Running Apache & MySQL Server
# /etc/init.d/mysqld stop
# /etc/init.d/httpd stop

2. Set up the atomic channel
# wget -q -O – http://www.atomicorp.com/installers/atomic | sh

3. Upgrade to PHP 5.3.x on plesk 10
# yum upgrade

Now I can install “uploadprogress” extension easily

pecl/uploadprogress requires PHP (version >= 5.2.0), installed version is 5.1.3
No valid packages found
install failed

# pecl install uploadprogress

Then add in /etc/php.ini

extension=uploadprogress.so

CentOS Latest RPM for PHP MySQL


Hits: 6815  

[root@svnlabs ~]# yum install php php-soap php-xmlrpc php-imap php-mcrypt php-mhash php-mbstring php-mysql php-xml php-gd php-cli php-common php-api
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.mirrors.tds.net
* extras: mirror.sanctuaryhost.com
* updates: mirror.fdcservers.net
Setting up Install Process
Package matching php-5.1.6-32.el5.i386 already installed. Checking for update.
Package matching php-mcrypt-5.1.6-15.el5.centos.1.i386 already installed. Checking for update.
Package matching php-mysql-5.1.6-32.el5.i386 already installed. Checking for update.
Package matching php-cli-5.1.6-32.el5.i386 already installed. Checking for update.
Package matching php-common-5.1.6-32.el5.i386 already installed. Checking for update.
Resolving Dependencies
–> Running transaction check
—> Package php-gd.i386 0:5.1.6-32.el5 set to be updated
–> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-gd
—> Package php-imap.i386 0:5.1.6-32.el5 set to be updated
–> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-imap
–> Processing Dependency: libc-client.so.1 for package: php-imap
—> Package php-mbstring.i386 0:5.1.6-32.el5 set to be updated
–> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-mbstring
—> Package php-mhash.i386 0:5.1.6-15.el5.centos.1 set to be updated
–> Processing Dependency: php-api = 20041225 for package: php-mhash
—> Package php-soap.i386 0:5.1.6-32.el5 set to be updated
–> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-soap
—> Package php-xml.i386 0:5.1.6-32.el5 set to be updated
–> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-xml
—> Package php-xmlrpc.i386 0:5.1.6-32.el5 set to be updated
–> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-xmlrpc
—> Package php53-common.i386 0:5.3.3-5.el5 set to be updated
–> Running transaction check
—> Package libc-client.i386 0:2004g-2.2.1 set to be updated
—> Package php-gd.i386 0:5.1.6-32.el5 set to be updated
–> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-gd
—> Package php-imap.i386 0:5.1.6-32.el5 set to be updated
–> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-imap
—> Package php-mbstring.i386 0:5.1.6-32.el5 set to be updated
–> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-mbstring
—> Package php-mhash.i386 0:5.1.6-15.el5.centos.1 set to be updated
–> Processing Dependency: php-api = 20041225 for package: php-mhash
—> Package php-soap.i386 0:5.1.6-32.el5 set to be updated
–> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-soap
—> Package php-xml.i386 0:5.1.6-32.el5 set to be updated
–> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-xml
—> Package php-xmlrpc.i386 0:5.1.6-32.el5 set to be updated
–> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-xmlrpc
–> Processing Conflict: php53-common conflicts php-common
–> Finished Dependency Resolution
php53-common-5.3.3-5.el5.i386 from base has depsolving problems
–> php53-common conflicts with php-common
php-soap-5.1.6-32.el5.i386 from base has depsolving problems
–> Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-soap-5.1.6-32.el5.i386 (base)
php-xml-5.1.6-32.el5.i386 from base has depsolving problems
–> Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-xml-5.1.6-32.el5.i386 (base)
php-mbstring-5.1.6-32.el5.i386 from base has depsolving problems
–> Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-mbstring-5.1.6-32.el5.i386 (base)
php-gd-5.1.6-32.el5.i386 from base has depsolving problems
–> Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-gd-5.1.6-32.el5.i386 (base)
php-imap-5.1.6-32.el5.i386 from base has depsolving problems
–> Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-imap-5.1.6-32.el5.i386 (base)
php-mhash-5.1.6-15.el5.centos.1.i386 from extras has depsolving problems
–> Missing Dependency: php-api = 20041225 is needed by package php-mhash-5.1.6-15.el5.centos.1.i386 (extras)
php-xmlrpc-5.1.6-32.el5.i386 from base has depsolving problems
–> Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-xmlrpc-5.1.6-32.el5.i386 (base)
Error: Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-xml-5.1.6-32.el5.i386 (base)
Error: Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-gd-5.1.6-32.el5.i386 (base)
Error: Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-xmlrpc-5.1.6-32.el5.i386 (base)
Error: php53-common conflicts with php-common
Error: Missing Dependency: php-api = 20041225 is needed by package php-mhash-5.1.6-15.el5.centos.1.i386 (extras)
Error: Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-mbstring-5.1.6-32.el5.i386 (base)
Error: Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-imap-5.1.6-32.el5.i386 (base)
Error: Missing Dependency: php-common = 5.1.6-32.el5 is needed by package php-soap-5.1.6-32.el5.i386 (base)
You could try using –skip-broken to work around the problem
You could try running: package-cleanup –problems
package-cleanup –dupes
rpm -Va –nofiles –nodigest
The program package-cleanup is found in the yum-utils package.

…….

# rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
# yum –enablerepo=webtatic install php php-mysql

OR

# yum –enablerepo=webtatic update php php-mysql
# php -v

PHP 5.3.11 (cli) (built: Apr 27 2012 22:00:56)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

# service httpd restart

Now try with PHP 5.4.1 (Current stable)

Get Remote Host Client IP Behind Load Balancers (ELB)


Hits: 20725  

I was working on “Private AWS Cloudfront Distribution” for AWS Elastic Load Balancer (ELB), allowing our application servers private access to our AWS cloudfront.

But PHP Server Environment Variable $_SERVER[“REMOTE_ADDR”] is displaying suspicious results, it really tedious to get remote host client IP behind ELB 🙁

Now we have 2 options…

1. mod_rpaf and Amazon ELB
http://tech.superhappykittymeow.com/?p=281
http://giantdorks.org/alain/easily-get-the-correct-client-ip-with-mod_rpaf/

if ($_SERVER[“HTTP_X_FORWARDED_FOR”]) {
$realclientip = $_SERVER[“HTTP_X_FORWARDED_FOR”];
} else {
$realclientip = $_SERVER[“REMOTE_ADDR”];
}

2. %{X-Forwarded-For}i from Apache Log (Time Consuming)
http://blog.kenweiner.com/2009/09/amazon-elb-capturing-client-ip-address.html
https://forums.aws.amazon.com/message.jspa?messageID=216977

You Apache log format would then look something like this:
LogFormat “\”%{X-Forwarded-For}i\” %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-agent}i\”” combined-elb
CustomLog log/acces_log combined-elb

Apache Module mod_remoteip

PHP: $_SERVER[“HTTP_X_FORWARDED_FOR”]
PHP: $_SERVER[“HTTP_X_CLUSTER_CLIENT_IP”]

$_SERVER[‘REMOTE_ADDR’]; Apache Enviromental Variable is not working on your server 🙂
http://php.net/manual/en/function.getenv.php
http://www.zytrax.com/tech/web/env_var.htm

Install Wowza Examples


Hits: 8559  

Wowza Media Server 3 have 2 option to install
* Developer Edition (up to 10 Connections) license and all free premium AddOns.
* Paid

Wowza Server Install
# yum install sun-java6-jre sun-java6-plugin
# wget http://www.wowza.com/downloads/WowzaMediaServer-3-0-4/WowzaMediaServer-3.0.4.rpm.bin
# chmod +x WowzaMediaServer-3.0.4.rpm.bin
# ./WowzaMediaServer-3.0.4.rpm.bin

Wowza Location
/usr/local/WowzaMediaServer-3.0.4

Enter License
# cd /usr/local/WowzaMediaServer-3.0.4/bin
# chmod +x startup.sh
# ./startup.sh

Install SimpleVideoStreaming

# cd /usr/local/WowzaMediaServer-3.0.4/examples/SimpleVideoStreaming
# chmod +x install.sh
# ./install.sh

Install TextChat
# cd /usr/local/WowzaMediaServer-3.0.4/examples/TextChat
# chmod +x install.sh
# ./install.sh

Install the Wowza Examples
# cd /usr/local/WowzaMediaServer-3.0.4/examples
# chmod +x installall.sh
# ./installall.sh

Wowza Server Commands
# service WowzaMediaServer status
# service WowzaMediaServer start
# service WowzaMediaServer restart
# service WowzaMediaServer stop

Upload Client to Web Server

Uninstall Wowza
# rpm –e WowzaMediaServer-3.0.4

Plesk Security Vulnerability


Hits: 2678  

Install “Parallels Plesk Panel Upgrade to v.10.4.4” to protect your dedicated server from potential security breaches. If you’re already running 10.4, you’re already protected from this vulnerability.

Step1:

Step2:

Step3:

Parallels offers free upgrade support. Click here [https://www.parallels.com/support/plesk/free10assistance/] for more information.

Update will patch security holes outdated versions have opened…

 

# /usr/local/bin/perl /usr/local/cpanel/3rdparty/quickinstall/scripts/checkupdates.pl