Red5 Linux Server Optimizations and Tools

March 1st, 2010

Some java optimizations to add in red5.sh :

export JAVA_OPTS=”-Xrs -Xms128M -Xmx256M -Dsun.rmi.dgc.client.gcInterval=300000 -Dsun.rmi.dgc.server.gcInterval=360000 -Djava.net.preferIPv4Stack=true -XX:+ExplicitGCInvokesConcurrent -XX:+UseConcMarkSweepGC -Xverify:none”

Assuming red5 was installed in /opt/red5/dist admin will often need to restart it or check if it’s running.

Make sure Red5 restarts: restart.sh

#!/bin/bash
#Restart the process
#First see if running
PID=`ps -eo ‘tty pid args’ | grep ‘red5′ | grep -v grep | grep -v restart | tr -s ‘ ‘ | cut -f2 -d ‘ ‘`
cd /opt/red5/dist
if [ -z "$PID" ]
then
#not running
echo “Red5 was not running at `date`” >> /opt/red5/dist/run-restart.log
else
echo “Red5: $PID”
#shutdown
/opt/red5/dist/red5-shutdown.sh
sleep 6
#make sure
kill $PID >> null
sleep 2
fi
#start
/opt/red5/dist/red5.sh >> /opt/red5/dist/red5.log &
echo “On request restarted Red5 at `date`” >> /opt/red5/dist/run-restart.log

Mare sure Red5 process is running, if not start it: running.sh

#!/bin/bash
#set environment
PID=`ps -eo ‘tty pid args’ | grep ‘red5′ | grep -v grep | grep -v running | tr -s ‘ ‘ | cut -f2 -d ‘ ‘`
if [ -z "$PID" ]
then
#Restart the process
cd /opt/red5/dist
/opt/red5/dist/red5.sh >> /opt/red5/dist/red5.log &
echo “Restarted Red5 at `date`” >> /opt/red5/dist/run-restart.log
else
#do nothing
echo “Red5 is already running with PID=$PID at `date`” >> /opt/red5/dist/run-checked.log
fi

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

Bookmark and Share

VideoChat Scripts Servers, Video Streaming , , , , , , , , , , , , , , ,

Install GeoIP PHP Extension

February 10th, 2010

Install GeoIP C API
Change 1.4.6 to downloaded version.

wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
tar zxvf GeoIP.tar.gz
cd GeoIP-1.4.6
./configure
make
make check
make install

Install PHP PECL extension

wget http://pecl.php.net/get/geoip
tar zxvf geoip
cd geoip-1.0.7
phpize
./configure
make
make check
make install

Find php.ini

php –ini

Enable extension to load in php.ini:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension=geoip.so

You may need to restart HTTP server (apache) to apply changes.

Download Geo Lite City database

wget -N -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
mv GeoLiteCity.dat /usr/local/share/GeoIP/GeoIPCity.dat

For more accurate detection and production projects, buy the full GeoCity database from MaxMind.

Bookmark and Share

VideoChat Scripts Servers , , , , , , , , , , , , , , , , , , ,

Red5 0.9 Final Released

February 1st, 2010

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)

Read more…

Bookmark and Share

VideoChat Scripts Servers, Video Streaming , , , , , , ,

Run Red5 & Wowza Flash Media Servers on Same Linux Server

January 13th, 2010
Comments Off

This post shows how to install Wowza on a server where there is another RTMP server, already installed, i.e. Red5. Run 2 rtmp servers at same time and allow applications to connect on both simultaneously.

Read more…

Bookmark and Share

VideoChat Scripts Servers, Video Streaming , , , , , , , , , , , , , , , , , ,

Install ffmpeg mplayer flvtool2 yamdi x264 theora mp3lame vorbis ogg faac

January 5th, 2010
Comments Off

This is a tutorial to enable video sharing support on Centos servers.

This should install ffmpeg, mplayer, mencoder, flvtool2, yamdi, x264, theora, mp3lame, vorbis, ogg, faac, faad2, xvid . These tools will enable on your server:

  • video conversion
  • thumbnail generation
  • FLV meta injection (flvtool2, yamdi)
  • extra codecs (x264, theora, mp3lame, vorbis, ogg, faac, faad2, xvid)

This is functional and we update it each time we configure a new server.
Installation is done using the “root” account.

Read more…

Bookmark and Share

VideoChat Scripts Servers, Video Streaming , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

VideoWhisper Video Recorder

October 31st, 2009
Comments Off

The video recorder allows site users to record webcam videos easily from website pages. This can be use on various sites to implement online features like:
+ video sharing, on demand video content
+ video messaging, video email
+ video content on member profiles, video teasers, video questionnaires
+ video comments for online posts and items, video discussions, video forums

Videos are recorded as flv files on the rtmp server and can be played trough the rtmp protocol or by http players as on youtube (if published to a web accessible location).

Web Video Recording Software

  • Live Webcam Preview
  • Select webcam/microphone, configure recording resolution, framerate, sound rate
  • Record Video
  • Timer, Maximum recording time limit
  • Accept / Discard recording
  • Instant recording preview, Replay preview

For more details check the home page of VideoWhisper web based Video Recorder.

Bookmark and Share

VideoChat Scripts Scripts, Video Streaming , , , , , , , , , , , , , , , , ,

Install Red5 0.9 on Linux Ubuntu

October 7th, 2009
Comments Off

This post shows how to install latest Red5 from trunk on Linux Ubuntu.

For other linux flavors (i.e. Centos) see this comprehensive tutorial Install Red5 and JDK on Centos.

Read more…

Bookmark and Share

VideoChat Scripts Servers , , , , , , , , , , , , , , , , , , , , , , , ,

Live Streaming v2 by VideoWhisper

September 11th, 2009
Comments Off

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.

Bookmark and Share

VideoChat Scripts Scripts, Video Chat, Video Streaming , , , , , , , , , , , , , , , , , , , , , , , , , ,

Use JW Player to play VideoWhisper application streams

August 28th, 2009
Comments Off

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.

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
Bookmark and Share

VideoChat Scripts Scripts, Servers, Video Streaming , , , , , , , , , , , , , , , , , , , , ,

Online Video Consultation Solution by VideoWhisper

August 26th, 2009
Comments Off

VideoWhisper Video Consultation is a premium high definition video communication software designed for online video consultations, trainings, webinars, coaching and online collaboration.

It was designed for few to many 2 way moderated video communication. Moderators control what participant is displayed on main screen (speaker) and can also add an additional participant (inquirer) to ask questions or assist. Participants can change their public status (i.e. request to speak), upload and download room files, text and video chat.

Online Video Consultation Software

Bookmark and Share

VideoChat Scripts Scripts, Video Chat, Video Streaming , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,