Posts tagged update

Install Red5 on Debian

0

At least Debian 5 (Lenny) required.

Checkout release:
cat /proc/version
uname -a
cat /etc/issue
cat /etc/debian_version

 

If system is not in English, enable that:
dpkg-reconfigure locales
export LANG=en_US.UTF-8

Update /etc/enviroment

You may need to reboot.

 

Update:
apt-get update

Install Subversion:
apt-get -y install subversion

Install tools to build your own Debian packages:
apt-get -y install dpkg-dev debhelper dh-make devscripts fakeroot

Install Java (accept sun license if applies):
apt-get -y install java-package
apt-get -y install sun-java6-jre
apt-get -y install sun-java6-jdk
java -version

Install Apache Ant:
wget http://www.apache.org/dist/ant/binaries/apache-ant-1.8.2-bin.tar.gz
tar zxvf apache-ant-1.8.2-bin.tar.gz
mv apache-ant-1.8.2 /usr/local/ant
export ANT_HOME=/usr/local/ant
/usr/local/ant/bin/ant -version

Download the latest development version of Red5:
svn co http://red5.googlecode.com/svn/java/server/trunk red5-trunk

Run ant to build red5:
cd red5-trunk
/usr/local/ant/bin/ant

Deploy red5:
mkdir /usr/local/red5
cp -R dist/* /usr/local/red5/
cd /usr/local/red5
chmod 755 red5.sh

Deploy your custom apps in/usr/local/red5/webapps .
In example VideoWhisper Red5 RTMP application needed to run VideoWhisper solutions.

Start Red5 in background:
cd /usr/local/red5
./red5.sh >> red5.log &

Verify the correct ports are being bound to:
netstat -ant

 

You need to restart red5 each time you add webapps to /usr/local/red5/webapps or change configuration.

Close Red5:
cd /usr/local/red5
./red5-shutdown.sh

Or kill Red5 processes:
ps aux | grep red5
kill $process_id

Then start it again:
cd /usr/local/red5
./red5.sh >> red5.log &

Related Posts:

Install YUM Centos 5.5 i386

In case yum is unavailable due to various reasons (broken, uninstalled) here is a shell script that can install it.

Paste this in a yumi.sh file:

for file in \
gmp-4.1.4-10.el5.i386.rpm \
readline-5.1-3.el5.i386.rpm \
python-libs-2.4.3-43.el5.i386.rpm \
python-2.4.3-43.el5.i386.rpm \
libxml2-2.6.26-2.1.2.8.el5_5.1.i386.rpm \
libxml2-python-2.6.26-2.1.2.8.el5_5.1.i386.rpm \
expat-1.95.8-8.3.el5_5.3.i386.rpm \
python-elementtree-1.2.6-5.i386.rpm \
sqlite-3.3.6-5.i386.rpm \
python-sqlite-1.1.7-1.2.1.i386.rpm \
elfutils-libelf-0.137-3.el5.i386.rpm \
elfutils-0.137-3.el5.i386.rpm \
popt-1.10.2.3-22.el5.i386.rpm \
rpm-libs-4.4.2.3-22.el5.i386.rpm \
rpm-4.4.2.3-22.el5.i386.rpm \
rpm-python-4.4.2.3-22.el5.i386.rpm \
m2crypto-0.16-6.el5.8.i386.rpm \
python-urlgrabber-3.1.0-6.el5.noarch.rpm \
python-iniparse-0.2.3-4.el5.noarch.rpm \
yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm \
yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm \
yum-3.2.22-33.el5.centos.noarch.rpm
do rpm -Uvh –nodeps http://mirror.centos.org/centos-5/5/os/i386/CentOS/$file;
done

chmod a+x yumi.sh
./yumi.sh
yum update
Some files may have been updated, so if you get errors update these file names to latest versions from http://mirror.centos.org/centos-5/5/os/i386/CentOS/ or other mirror you may be using.

Related Posts:

Red5 0.9 Final Released

Get latest Red5 0.9 Final (27 January 2010) from http://code.google.com/p/red5/.

This final release includes important improvements and bug fixes.
http://code.google.com/p/red5/updates/list

Red5 Tutorials
Red5 Centos Linux Installation
Red5 Unbuntu Linux Installation
Run Red5 & Wowza Flash Media Servers on Same Linux Server

Red5 Services
Red5 Hosting
Red5 installation on VPS & Dedicated Servers (Linux / Windows)

(more…)

Related Posts:

Live Streaming v2 by VideoWhisper

VideoWhisper.com upgraded the Live Streaming application bringing several improvements and optimizations requested by users.

Live Broadcast

Some of the improvements:

  • advanced webcam settings (change realtime resolution, framerate, audio rate)
  • fullscreen button for video watching interface
  • fullscreen on click for embedded plain video stream interface
  • generate updated jpg snapshots for each live stream
  • timers (displayed on each interface depending on settings) can be used to control access, integrate in pay per view systems
  • multiple new options and parameters passed from script side

Also some RTMP application improvements should be mentioned like external player support and live video archiving as FLV for the Red5 application.

Upgrades are available for download on VideoWhisper.com and do not involve any costs for free or paid licenses.

First edition available with the upgrade is the PHP edition. The rest should follow shortly.

Related Posts:

Use JW Player to play VideoWhisper application streams

With the latest VideoWhisper rtmp applications versions, webmasters can enable external player support (both for FMIS and Red5).  This can be enabled from  RTMP Application Settings.

You need to have allowPlayers=true for FMIS or acceptPlayers=true for Red5 . These settings are turned on by default.

This will allow playing a stream published by a VideoWhisper flash application like Live Streaming with an external player like JW Player.

Demo:

Publish a stream from Live Streaming Demo (i.e. Studio1) and then view it on JW Player. Update channel name in link if you’re using a different one.

Important: As latest VideoWhisper solutions also support P2P streaming, these need to be configured with alwaysRTMP=1 parameter in their _login.php or equivalent script so streams are always published to RTMP. Because of this, demo above is disabled (to prevent heavy rtmp usage on public install), but you can use sample code in your own installs.

 

Here is the code to embed JW Player:

<?
include(“settings.php”);
$stream=$_GET['n'];
?>
<object id=”player” classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ name=”player” width=”328″ height=”260″>
<param name=”movie” value=”player.swf” />
<param name=”allowfullscreen” value=”true” />
<param name=”allowscriptaccess” value=”always” />
<param name=”flashvars” value=”file=<?=
urlencode($stream)?>.flv&streamer=<?=urlencode($rtmp_server)?>&autostart=true” />
<object type=”application/x-shockwave-flash” data=”player.swf” width=”328″ height=”260″>
<param name=”movie” value=”player.swf” />
<param name=”allowfullscreen” value=”true” />
<param name=”allowscriptaccess” value=”always” />
<param name=”flashvars” value=”file=<?=
urlencode($stream)?>.flv&streamer=<?=urlencode($rtmp_server)?>&autostart=true” />
<p><a href=”http://get.adobe.com/flashplayer”>Get Flash</a> to see this player.</p>
</object>
</object>

Also this code could be used for playing a Studio1 stream broadcaster with VideoWhisper Live Streaming. Make sure you have swobject.js and player-viral.swf in that folder.

<script type='text/javascript' src='swfobject.js'></script> <div id='mediaspace'>This text will be replaced</div> <script type='text/javascript'> var so = new SWFObject('player-viral.swf','mpl','320','320','9'); so.addParam('allowfullscreen','true'); so.addParam('allowscriptaccess','always'); so.addParam('wmode','opaque'); so.addVariable('file','Studio1.flv'); so.addVariable('volume','5'); so.addVariable('streamer','rtmp://your-rtmp-server/videowhisper'); so.addVariable('autostart','true'); so.addVariable('quality','false'); so.write('mediaspace'); </script>

JW Player Demo

Interesting Plugins:

  • Adtonomy Text Ads Plugin lets you run your own text ads within the JW FLV Player
  • Google Analytics plugin for the JW Player is designed to help you understand how well your video content is performing online
  • LongTail’s AdSolution allows you to run pre-roll, overlay mid-roll, and post-roll advertisements in your media player
  • LongTail Video’s Adtonomy Plugin lets you run your own FLV advertisements within the JW FLV Player
  • Viral, a video distribution plugin, supports three main functions: embed, link, and recommendations
  • The D-Related plugin allows you to load in list of the related clips in XML format

Related Posts:

Install latest Red5 on Linux Server

Updated for Red5 1.0 RC1 +
Updated for JDK 1.6.22  (32bit/64bit).
Updated for ANT 1.8.2 .

Here is how we installed latest Red5 and JDK on a server with Linux CentOS . These hints can help you install on many linux VPS or Dedicated enviroments.  We mainly do software development and work from windows, so we use WinSCP and PuTTy (free software). We browsed a lot of tutorials and web pages to get instructions that installed latest versions.

First, know your server (linux distribution and processor type ie. x86_64):

cat /etc/*release*
uname -a

Then, make sure there are all prerequisites to install the rpm:

yum install rpm-build redhat-rpm-config

Allow required ports (not necessary if already opened): 3690 (svn), 5080, 1935, 1936, 8088.  See more details at the end of this tutorial.


JAVA INSTALLATION

We installed latest JDK from http://java.sun.com/javase/downloads/index.jsp .

Use uname -a to see if you need to download a 64 bits version.

Went to root/tmp folder for downloads:
cd /root/tmp

We got Java SE Development Kit, JDK 6 Update 13. We selected linux multilanguage, right clicked > properties on the jdk-6u13-linux-i586-rpm.bin and downloaded it with wget url on the server. It downloaded with a big name with parameters (ls to see after download). We use WinSCP so we right clicked, refreshed from there and then renamed the new file that showed up in the root home directory.
You can also rename it from shell. Make sure you use mv “old_long_name” new_name for the long name as it uses special characters.

Make sure you install JDK and not JRE.

Made it executable and executed it:

chmod a+x jdk-6u13-linux-i586-rpm.bin
./
jdk-6u13-linux-i586-rpm.bin

If it’s just .rpm install it with rpm -Uhv file :
rpm -Uhv jdk-7-linux-x64.rpm

Press space or enter to scroll terms and when it asks you type yes and hit enter.
If needed confirm Java DB update, yes ENTER.

We installed it on multiple servers and had to change some shortcuts on ones that already had an older java, so it runs the new one. Usually if preinstalled it’s located in a java or jdk folder in /usr or /usr/local .

Make sure  the shortcuts in /usr/local point to the new locations (/usr/local/jdk to /usr/java/jdk1.6.0_14 and /usr/local/jre to /usr/java/jdk1.6.0_14/jre) .
ln -s /usr/java/latest /usr/local/jdk
ln -s
/usr/java/latest/jre /usr/local/jre

Also /usr/bin/java shortcut should point to /usr/java/latest (not /etc/alternatives/java):
rm /usr/bin/java
ln -s /usr/java/latest/bin/java /usr/bin/java

export JAVA_HOME=/usr/java/latest/

Make sure this is the one used if you also have older versions installed:
java –version


ANT INSTALLATION

Downloaded ant (can be done from any mirror – see http://ant.apache.org/bindownload.cgi), unpacked it, moved it to a good location and added variable, shortcut. 

Get ANT

wget http://archive.apache.org/dist/ant/binaries/apache-ant-1.8.2-bin.tar.gz
tar zxvf apache-ant-1.8.2-bin.tar.gz
mv apache-ant-1.8.2 /usr/local/ant

If older  ANT is preferred get latest from http://archive.apache.org/dist/ant/binaries/ .
i.e. ANT 1.7.1
wget http://www.apache.org/dist/ant/binaries/apache-ant-1.7.1-bin.tar.gz
tar zxvf apache-ant-1.7.1-bin.tar.gz
mv apache-ant-1.7.1 /usr/local/ant

Configure
export ANT_HOME=/usr/local/ant
ln -s /usr/local/ant/bin/ant /usr/local/bin/ant

Replace old ant
rm /usr/bin/ant
ln -s /usr/local/ant/bin/ant /usr/bin/ant

Checked ant version:
ant –version

If this can’t find java, make sure you run export JAVA_HOME=/usr/java/latest/.

Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/local/jdk/bin/java

SUBVERSION INSTALLATION

yum install subversion

If that doesn’t work because of something like Missing Dependency: perl(URI) >= 1.17 is needed by package subversion … maybe this can help:

Fix: Install perl uri:
wget http://mirror.centos.org/centos/5/os/i386/CentOS/perl-URI-1.35-3.noarch.rpm
rpm -Uvh perl-URI-1.35-3.noarch.rpm

Fix: This time got  “Error: Cannot retrieve repository metadata (repomd.xml) for repository: atrpms. Please verify its path and try again” .
Solution: yum –disablerepo=atrpms install subversion .

RED5 BUILD AND INSTALLATION

Then we downloaded Red5:
svn co http://red5.googlecode.com/svn/java/server/trunk red5

Update1: This downloads latest Red5. On this installation (update1) Red5 0.9 was downloaded.

If latest trunk has bugs or does not work fine with your required software you can download other versions from http://red5.googlecode.com/svn/java/server/tags/ .

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

Built red5 :
cd red5
ant prepare
ant dist

You could also remove sample applications if you don’t plan to use these:
rm -rf /opt/red5/dist/webapps/live
rm -rf /opt/red5/dist/webapps/installer
rm -rf /opt/red5/dist/webapps/vod
rm -rf /opt/red5/dist/webapps/installer
rm -rf /opt/red5/dist/webapps/root/demos
rm -rf /opt/red5/dist/webapps/root/WEB-INF

When upgrading, copy webapps to new build:
cp -rf /opt/red5/dist/webapps/* /root/tmp/red5/dist/webapps/

Then rename old red5 (backup).

Move Red5 from home folder:
cd ..
mv red5 /opt/red5

Start Red5:

cd /opt/red5/dist
./red5.sh > start.log &

The > start.log is to have it output the logs in the file and & is to keep it running in the background.
Verified that Red5 is running:
ps aux | grep red5
This should report a long line with java and many options and this command. Check start.log if it failed to start.
Make sure these ports are active and red5 (java) is listening:

netstat -anp | grep 1935
netstat -anp | grep 5080

If 1935 shows up and 5080 doesn’t it probably means web server is not running. On latest versions Red5 no longer includes tomcat. See Red5 JEE Container Plugins for details.
You will need to overwrite conf/jee-container.xml with one extracted from plugin jar and create a plugins/ folder with multiple jars (get this from older red5 distributions).


START RED5 ON BOOT

The nice way would be to run Red5 as a service by adding a red5 file with execution permissions to /etc/rc.d/init.d :

#!/bin/bash
#
# For RedHat and cousins:
#
# chkconfig: 2345 85 85
# description: Red5 flash streaming server
# processname: red5
#

PROG=red5
RED5_HOME=/opt/red5/dist
DAEMON=$RED5_HOME/$PROG.sh
PIDFILE=/var/run/$PROG.pid

# Source function library
. /etc/rc.d/init.d/functions

[ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5

RETVAL=0

case “$1″ in
start)
echo -n $”Starting $PROG: ”
cd $RED5_HOME
$DAEMON >/dev/null 2>/dev/null &
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo $! > $PIDFILE
touch /var/lock/subsys/$PROG
fi
[ $RETVAL -eq 0 ] && success $”$PROG startup” || failure $”$PROG startup”
echo
;;
stop)
echo -n $”Shutting down $PROG: ”
killproc -p $PIDFILE
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROG
;;
restart)
$0 stop
$0 start
;;
status)
status $PROG -p $PIDFILE
RETVAL=$?
;;
*)
echo $”Usage: $0 {start|stop|restart|status}”
RETVAL=1
esac

exit $RETVAL

Then you can use service red5 start|stop|restart  .

Or add these lines to to /etc/rc.d/rc.local so it starts on each server start:
cd /opt/red5/dist
/opt/red5/dist/red5.sh > restart.log &

Make sure your run it from the right folder. The one in /opt/red5 will not work – you must run it from /opt/red5/dist/ .

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

Restart Red5 anytime you update files in the /opt/red5/dist/webapps folder – where all applications should be installed.

Usually these should work and should be used each time you add a new application.

1. Check if red5 is running:
ps aux | grep red5

2. Go to its folder and shut red5 down:

service red5 stop

or

cd /opt/red5/dist
./red5-shutdown.sh

3. See if it’s still running or not:
ps aux | grep red5

4. Restart it, and also make it output the logs into a file of your choice:
service red5 start

or

./red5.sh > start.log &

5. Make sure it’s back online:
ps aux | grep red5

We also noticed that red-shutdown.sh sometimes does not close it down to allow restart when webapps are added or updated. This usually occurs when red5 freezes becasue it encounters errors like running out of memory. So we run ps aux | grep red5 to see process id (first number: PID) and then run kill process id if it’s still alive.

ALLOWING PORTS

On some systems root cannot bind ports above the early 1000′s so red5 must be run from another account.

Verify that Red5 is listening on port 5080 if you can’t get http://yourserver:5080/:
netstat -anp | grep 5080

If using iptables enable these ports:
iptables -A INPUT -p tcp -m tcp -—dport 3690 -j ACCEPT
iptables -A INPUT -p tcp -m tcp —-dport 5080 -j ACCEPT
iptables -A INPUT -p tcp -m tcp -—dport 1935 -j ACCEPT
iptables -A INPUT -p tcp -m tcp —-dport 1936 -j ACCEPT
iptables -A INPUT -p tcp -m tcp -—dport 8088 -j ACCEPT

Sometimes ports need to be configured in a hardware firewall. Contact server provider / administrator for more details about enabling ports.

This info provided by a host could also be helpful.

Please be advised that custom iptables rules should be placed in the directory listed below.
/etc/sysconfig/iptables-custom

The software firewall rule is listed as follows:
# cat /etc/sysconfig/iptables-custom/99Red5 *filter

-A INPUT -p tcp -m tcp –dport 1935 -j ACCEPT
-A INPUT -p tcp -m tcp –dport 1936 -j ACCEPT
-A INPUT -p tcp -m tcp –dport 5080 -j ACCEPT
-A INPUT -p tcp -m tcp –dport 8088 -j ACCEPT

COMMIT

RED5 & VIDEOWHISPER

This was done for the installation of VideoWhisper applications. To do that just download the latest videowhisper rtmp application, unzip it on your computer and copy the videowhisper folder and all its contents to/opt/red5/dist/webapps .  As verification, check that you have a /opt/red5/dist/webapps/videowhisper/WEB-INF/ folder on your server. After copying/updating this, restart the Red5 server (as explained above) and you can install the videowhisper video conferencing / live streaming scrips to use the new rtmp application.

The Red5 VideoWhisper RTMP Application has some cool settings, like enabling access with external players / archiving of all video streams as flv files / limiting access to certain domains / setting absolute paths for live streams and recordings to be able to share videos with other applications (i.e. video sharing). Edit all these in WEB-INF/red5-web.properties and restart the Red5 server.

If we forgot to mention something here, or you have any questions about this submit your inquiries on Video Whisper Contact Page or comment below.

An alternative to doing the red5 installation yourself would be to order red5 installation .

If you don’t have the time and experience to run your own server or vps, you should use managed red5 hosting .

cp -rf /opt/red5/dist/webapps/* /root/tmp/red5/dist/webapps/

Related Posts:

Pay Per View Video Chat Software Update for VideoGirls.BiZ

PPV Video Chat SoftwareJanuary 2009 Updates:
+ New dark themed template added: VideoGirls Dark;
+ Performer ID verification including photos;
+ Video recordings on profile page;
+ Updated live video streaming on profile page and live preview on chat page;
+ Targetted registration links for each user category (member, performer, operator, affiliate);
+ More demo videos showing the features.
See video and live demos…

Promotions
+ Hosted Yearly License for just $499 NEW (web & streaming hosting)
+ 1 Year license for just $299
+ Purchase License and get 4 months free startup hosting (web & streaming hosting).

Related Posts:

Go to Top