Live Video Broadcast: Ubuntu + Red5 + Adobe FME + JW FLV Player October 13th, 2009

help_balloon
All that we need:
Ubuntu (Server) | Red5 | Adobe Flash Media Encoder | JW FLW Player

Server

1. Install Ubuntu.
I have installed it on virtual machine (Sun VirtualBox).  Installations manual is on Ubuntu website available.

2. Install Red5 Server
At first install red5_0.7.0_all.deb.
wget http://www.nielsenaa.com/red5-installers/red5_0.7.0_all.deb
sudo dpkg -i red5_0.7.0_all.deb
sudo apt-get install -f

Download  red5-0.8.0-java5.tar.gz (red5 v0.8.0 has no .deb file at this time. v 0.7.0 don’t support FME)
Remove all items in /usr/lib/red5/
unpack copy all from red5-0.8.0-java5.tar.gz    to   /usr/lib/red5/

Restart Red5:
/etc/init.d/red5 stop
/etc/init.d/red5 start

Test it:
telnet localhost 5080

Streaming Source Client

1. Download and install Adobe Flash Media Encoder (Its Free)

2. Config FME:

Format: VP6
FMS URL: rtmp://Ubuntu_Server_IP/oflaDemo/live
Stream: live

Other configs at your choice.

 

 

Viewer Client

1. Download JW FLW Player

2. Create index.htm whith this code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

<head>

<title>Video Client</title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>

<script type="text/javascript">
var flashvars =
{
’streamer’:                     ‘rtmp://Ubuntu_Server_IP/oflaDemo/live’,
‘file’:                          encodeURIComponent(‘live?videoKeyframeFrequency=5&totalDatarate=248′),
‘type’:                         ‘rtmp’,
‘controlbar’:                   ‘over’,
’stretching’:                   ‘fill’,
‘frontcolor’:                   ‘ffffff’,
‘backcolor’:                    ‘cccccc’,
‘lightcolor’:                   ‘ffffff’,
’screencolor’:                  ‘ffffff’,
‘id’:                           ‘playerID’,
‘autostart’:                    ‘true’
};

var params =
{
‘allowfullscreen’:              ‘true’,
‘allowscriptaccess’:            ‘always’,
‘bgcolor’:                      ‘#FFFFFF’
};

var attributes =
{
‘id’:                           ‘playerID’,
‘name’:                         ‘playerID’
};

swfobject.embedSWF(‘/swf/player.swf’, ‘player’, ‘720′, ‘500′, ‘9.0.124′, false, flashvars, params, attributes);
</script>

</head><body>
<center>
<div id="playercontainer" style="margin-top:30px; width: 720px; height:500px; background-color: #fff; -moz-border-radius: 3px; -webkit-border-radius: 3px; border: 3px solid #aaa; overflow:hidden;"><a id="player" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a></div>
</center>

</body></html>

<

3. You have to change this settings:

'streamer':                     'rtmp://Ubuntu_Server_IP/oflaDemo/live',
'file':                          encodeURIComponent('live?videoKeyframeFrequency=5&totalDatarate=248'),

’streamer’: FMS URL in FME + Stream name in FME
encodeURIComponent(‘ ?videoKeyframeFrequency=5&totalDatarate=248′)
totalDatarate – Total Bandwidth required to stream in FME
videoKeyframeFrequency – Format > Advanced Encoder Settings > Keyframe Frequency in FME

 

 

Start Live Broadcast

1. Press Start button in FME. When no errors – stream success.
2. Open index.htm in Browser.

EOF :)

Category: Broadcasting, Internet, Video Tags: , , , , , , , , ,