|
To set up a live 'streaming' cam on your
web page you need the following:
 |
a broadband connection |
 |
a domain name |
 |
Web Server |
 |
a suitable encoder |
 |
a web page to take the feed |
 |
and, of course, a web cam ! |
Encoder
 |
The quality of the feed will depend on your
encoding settings. If you're too ambitious the CPU load may be
unacceptably high. When you've found the right balance, click
the 'Start Encoding' button and minimise the application.
|
Putting the live feed on a web page
 |
The following is the HTML listing which you
should place in the web page where you want the web cam output to appear. This code will detect if Media Player is installed. If not it will ask the
user to install Media Player and provide a link to the download.
|
<!--- BEGIN PLAYER --->
<!-- webbot bot="HTMLMarkup" startspan ---->
<object ID="MediaPlayer" WIDTH="320"
HEIGHT="240"
CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..."
TYPE="application/x-oleobject" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab
#Version=6,4,7,1112">
<param name="autoStart" value="True">
<param name="filename" value="your_domain_name:nnnn">
<param NAME="ShowControls" VALUE="False">
<param NAME="ShowStatusBar" VALUE="True">
<embed TYPE="application/x-mplayer2" SRC="your_domain_name:nnnn"
NAME="MediaPlayer" WIDTH="320" HEIGHT="240"
autostart="1" showcontrols="0"></embed></object>
<!-- webbot bot="HTMLMarkup" endspan ---->
<!--- end PLAYER --->
 |
Ensure that the width and height of the output match the output dimensions
of your Windows Media Encoder session or the image may appear distorted
|
 |
Change the domain name to your own and the port number (nnnn) to the one
set in Windows Media Encoder (you'll also need to open the port in your
hardware or software firewall)
|
 |
Note that you can enable/disable the controls of the Media Player
session which
appear in the IE Browser
|
 |
You can also offer the user the opportunity
to open the web cam output in Windows Media Player. Simply add the
following HTML:
|
<p>You can also view this live feed directly
in Windows Media Player by
<a href="webcam.asx"
target="_blank">clicking here</a>.</p>
 |
You'll need to create the webcam.asx file
located in the same folder as your webcam page.
Here is the content:
<ASX version="3.0">
<Entry>
<ref HREF="http://your_domain_name:nnnn"/>
</Entry>
</ASX> |
Can't promise this stream will be
available at all times but try
clicking here
Return
to Projects
|