Friday, March 14, 2008

Making Red5 work, Getting started with Red5, Installing Red 5

Step 1 : I am not sure how exactly does Red5 interact with Apache Tomcat and Java SDK,
but I followed the instructions here :

So the first step is to install Java 1.6 SE and Tomcat 5.5.
Step 2 : Now, the link above talks about Red5.war, I couldn't find it.
So I downloaed setup-Red5-0.7.0.exe from and installed
it. It installed without a problem.
Step 3 : Start Red5 from the Program Menu and open,
seemingly 5080 is the default port for Red5. Then go to and play with it.

In the Red5\webapps\oflaDemo\streams folder you can put an flv file and it will be visible on the page mentioned above.

Step 4 :
I used JW FLV player with the following code to connect to a rtmp stream :
<div style="padding-left:40%" id="abc">
<a href="">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("mediaplayer.swf","mediaplayer","250","170","7");
s1.addVariable('file', 'rtmp://localhost/oflaDemo');
s1.addVariable('id', 'airtel_ad_1');

These 2 lines are important :
s1.addVariable('file', 'rtmp://localhost/oflaDemo');
s1.addVariable('id', 'airtel_ad_1');

note that the file I am trying to play is name "airtel_ad_1.flv", so ".flv"
extension is not needed. Also port number is not needed as well.
Step 5 :
Once you click on the play button in the flv player, you will recieve a warning
whether you want to allow this file to access internet. You might be taken to
where you will have to explicitly add the file you want to allow :
In my case : mediaplayer.swf

No comments:

Blog Archive