Live Camera Streaming With Flash Media Encoder & Red5

Download Adobe Flash Media Live Encoder 3.2 for live audio and video capture and encoder streams in real time.

Live video stream event for online Temple or Church

Install Red5 1.0 RC1 on CentOS Latest

We enable customers with advanced capabilities to manage, deliver and monitor audio, video, and multimedia content over the Internet using Red5 Media Streaming Server. Streaming Media Services includes Hosting’s proprietary technologies and robust online management tools, to provide customers with a level of simplicity, and features unparalleled in the Industry.

Services Offered

* Install, Configure and Secure Red5 on Cloud Servers
* Install Red5 on CentOS Latest
* VOD to iOS
* Red5 Media Server iOS Android Setup
* Record Audio from Websites
* Red5 Recorder for WordPress
* Configure VideoWhisper in Drupal
* Install OpenMeetings
* Live Camera Streaming With Flash Media Encoder & Red5

Install Red5 1.0 on CentOS Latest

1. Install Java

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

2. Install Ant

# cd /usr/local/src
# wget
# tar zxvf apache-ant-1.8.2-bin.tar.gz
# mv apache-ant-1.8.2 /usr/local/ant

3. Export path for Ant and Java

Make sure you have right paths (java, ant etc.) on your server, I have used 32-bits CentOS server … home path might be different on 64-bits or other server 😉

# 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/

Also add these lines in /etc/bashrc at last to available every-time logged in to SSH

4. Install SVN

# yum install subversion

5. Install RED5 Server

# cd /usr/local/src
# svn checkout red5
# mv red5 /usr/local/
# cd /usr/local/red5
# ant prepare
# ant dist

6. Copy Red5 files

# cp -r dist/conf /usr/local/red5

7. Test Run

# sh

ctrl + z

You need to allow port 5080 and 1935 to your server firewall.

# iptables -A INPUT -p tcp -m tcp --dport 5080 -j ACCEPT
# iptables -A INPUT -p tcp -m tcp --dport 1935 -j ACCEPT

Red5 Server Status

# netstat -anp | grep 5080
# ps aux | grep red5

If you have CentOS 64-bits server and you are getting error like

– Buildfile: build.xml does not exist!
– Cannot allocate memory

You might need to checkout modified files
# cd /usr/local/src
# svn co red5

Build Failed (Life saver)
Cannot run program “chmod”: error=12, Cannot allocate memory

# export _JAVA_OPTIONS=’-Xms32m -Xmx56m -Xss128k -XX:PermSize=32m -XX:MaxPermSize=64m’
# export ANT_OPTS=’-Xms32m -Xmx56m -Xss128k -XX:PermSize=32m -XX:MaxPermSize=64m’

Try solution here…

How to install Red5 Demos?

# cd /usr/local/red5/webapps/root
# svn checkout

Then go to

Please check all comments below for more help 😉

VLC is not supposed to be run as root. Sorry

Today I need to install VLC Media player on CentOS 5.x to capture remote live event from VLC client as HTTP stream.

So, I have installed that using # yum install vlc

But VLC can not be run as root privileged user 🙁

# vlc
VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use vlc-wrapper (make sure it is Set-UID root first and
cannot be run by non-trusted users first).

To run VLC from command line we need to edit VLC file located below
# vi /usr/bin/vlc

To edit “/usr/bin/vlc” search for geteuid and replace it with getppid using vi editor’s command

:%s/geteuid/getppid/ (here geteuid is search term and getppid is replace one)

If we still face issues with stream capture, we can use mplayer 😉

# mplayer http://stream_link -dumpstream -dumpfile outFileName

The trouble with doing something right the first time is that nobody appreciates how difficult it was.


Audio.js with Volume Control

I was working on HTML5 MP3 Player Project using audio.js and I got Audio.js with Volume Control to control the volume for the Flash alternative player?

Volume Control - audio.js

<script> {
        var as = audiojs.createAll(),
            audio = as[0],
            ids = ['vol-0', 'vol-10', 'vol-40', 'vol-70', 'vol-100'];
        for (var i = 0, ii = ids.length; i < ii; i++) {
          var elem = document.getElementById(ids[i]),
              volume = ids[i].split('-')[1];
          elem.setAttribute('data-volume', volume / 100)
          elem.onclick = function(e) {
            return false;
<audio src="audiofile.mp3"></audio>
    <p><a href="#" id="vol-0">Volume: 0%</a></p>
    <p><a href="#" id="vol-10">Volume: 10%</a></p>
    <p><a href="#" id="vol-40">Volume: 40%</a></p>
    <p><a href="#" id="vol-70">Volume: 70%</a></p>
    <p><a href="#" id="vol-100">Volume: 100%</a></p>

You can also use the same volume as in

Stream Live Event Using VLC Media Player

Windows Media Encoder is a media encoder developed by Microsoft which convert or capture or broadcast both prerecorded & live media like audio, video and computer screens to WMV formats for live and on-demand service.

But if you are on Linux you must have some questions in mind…

1. How to Stream Online Using Internet Streaming Server
2. How to connect camera to the computer and using Media Server for live stream

In Linux environment VLC Media Player is best solution to stream live stream from camera to anywhere in world 😉

Quality vs Size

The Quality and Size always matter while you broadcast streams, but VLC provide you such a facility to manage your camera in real time and send some chunks over particular time interval to publishing point for live broadcast.

If you already plugged camera to your computer then you are ready to stream media to publishing point…

Now what is publishing point?

Publishing Point is a third party server used for providing media stream to real users on internet. Each time VLC send data in blocks to publishing point and users can access that point to enjoy real camera stream live.

You can convert any web server to Publishing Point, but this web server must be connected to internet with real public IP.

We have 2 options for Publishing Point:

1. You can use Port Forwarding if you have no web server with public IP installed on PC.
2. Else use real public IP with web server 😉

Port Forwarding Configuration: Router Setting allows to create, modify and delete port forwarding rules to work on your computers if the Internet connection uses NAT.

Advanced Stream Redirector

The Advanced Stream Redirector (ASX) format is used to store playlist of Windows Media files for a multimedia presentation using HTTP, RTSP and MMS streaming protocols.

ASF (Advanced Streaming Format) is a streaming media format developed by Microsoft. ASF files contain video, audio, slide shows and synchronized events for WMV files.

* The ASF file is media file, containing video, audio, etc.
* The ASX file is a metafile contains data about another file.

<asx version="3.0">
  <title>Video Live Stream</title>
    <title>SVNLabs Main Stream</title>
    <ref href="" />
    <param name="aParameterName" value="aParameterValue" />
    <title>SVNLabs Radio</title>
    <ref href="" />


PHP Advanced Stream Redirector


header("Content-Type: video/x-ms-asf;"); 

$title = isset($_REQUEST['title'])?$_REQUEST['title']:"";
$author = isset($_REQUEST['author'])?$_REQUEST['author']:"";
$file = isset($_REQUEST['file'])?$_REQUEST['file']:"";

echo "<asx version=\"3.0\">";
  echo "<title>".$title."</title>";
  echo "<entry>";
    echo "<title>".$title."</title>";
    echo "<author>".$author."</author>";
    echo "<ref href=\"".$file."\"/>";
  echo "</entry>";
echo "</asx>";