Link to home
Start Free TrialLog in
Avatar of JOE-BULLITT
JOE-BULLITT

asked on

I have a question about writing a script so that I can "stream" video from a recording made by my Linksys WVC11B camera.

Hello.

I have a question about writing a script so that I can "stream" video from a recording made by my Linksys WVC11B camera.  

Alternatively, if anyone has a different idea as to how to stream the live feed from the
Linksys WVC11B camera (other than through the camera's built-in webserver webpage), I would certainly prefer to do that.  

A very similar question was asked last year (https://www.experts-exchange.com/questions/20799705/Internet-camera-issues.html) and the answer provided was probably exactly what I need to do, but I do not know how to write the script to implement it.  I have included the highlights of the answer and I hope someone may be able to advise as how to code this script and incorporate it into a simple html web page.  

I am running 2000 Server with IIS5 and Windows Media server.

Thanks!
- Joe


Highlights of answer, provided by Insolence:
“Go download or install the LinkSys Viewer and Recorder Utility. Schedule a recording that is 5 minutes long, every 5 minutes (or something like this... maybe 1 min.?) and save it in a directory.

Write a few scripts using your favorite server-side web-based language (PHP, ASP, Java, etc) that automatically puts a link to the latest file saved to that directory.  In PHP you'd just use some file listing, find the latest date file, and put a link to that on your website.  That isn't LIVE streaming, but it's live enough...  If you need help writing these scripts for whatever language... ask  =)

You will still in this case have to write an "inbetween".  A script, PHP, CGI, Java, VB, something, that tells the streaming server to change what file it's streaming... or if you manage to find software to patch video together... then you need to write a small program to string them onto the end of the current file being streamed constantly.”
Avatar of avidya
avidya

Hi, maybe i can help, but knowing why you don't want to use the buildin webserver would help me to understand what your goal is.
I believe Windows Media Encoder 9 can do this.

It can take video from any source (live, or pre-recorded) and brodcase to any other source (web, video out, hard drive etc.).   It's free !

If you set entered the camera's live video feed url into WME9's input source, you can do whatever you want with the captured stream.

Check out : http://www.microsoft.com/windows/windowsmedia/9series/encoder/default.aspx

I have used this to broadcast live video from my TV to the net (with compression & reduced frame-rate of course)
this explains how with Windows media server :
http://home.wangjianshuo.com/archives/20020918_realtime_stream_broadcasting_cookbook.htm

this one is whitout: http://my.anywebcam.com/ (free)

and here is some sample code, you should replace "http://www.russellshaw.net:1121"with your own url.:

....Host Your Own Stream
If you would rather stream your Webcam from your own site, the more you know about coding, the more precise this set-up will be for you. If I were to perform this operation from my own site, I would need to decide whether or not I wanted to embed the streaming media player on my Web page (www.russellshaw.net) or cause it to come up when a user clicked on the link to my streaming Webcam feed.

If I were to choose the embed option and wanted to specify Windows Media Player, I would choose Port 1121 and then input the following into the source code for the page my Webcam is linked from:

<! -- - BEGIN PLAYER -- ->
<! -- webbot bot="HTMLMarkup" startspan -- -- > 
<object ID="MediaPlayer" WIDTH="320" HEIGHT="270" 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="http://www.russellshaw.net:1121">
<param NAME="ShowControls" VALUE="False">
<param NAME="ShowStatusBar" VALUE="False">
<embed TYPE="application/x-mplayer2" SRC="russellshaw.net:1121" NAME="MediaPlayer" WIDTH="320" HEIGHT="270" autostart="1" showcontrols="0"></embed></object>
<! -- webbot bot="HTMLMarkup" endspan -- -- > 
<! -- - end PLAYER -- ->

Next, I would need to indicate where on the page I would want my embedded Webcam stream image to pop up. Here is the code I would use:

<p>
<object id="Player" width="176" height="144" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="URL" value="http://www.russellshaw.net:1121">
<param name="uiMode" value="none">
</object>
</p>
<p>
<input type="BUTTON" name="BtnPlay2" value="Play" onClick="StartMeUp()">
<input type="BUTTON" name="BtnStop2" value="Stop" onClick="ShutMeDown()">
</p>
<script>
<! --
function StartMeUp ()

Player.controls.play();

function ShutMeDown ()

Player.controls.stop();

-- > 
</script>
<script language="VBScript">
<! --
On error resume next
Player.URL = "" 
if err then msgbox "You need Windows Media Player 7. Go to" & chr(13) &_
"http://www.microsoft.com/windowsmedia
err.clear
-- > 
</script>

That last bit of code is necessary for those users who do not have Windows Media Player already installed.

Avatar of JOE-BULLITT

ASKER

Thank you VERY much for the help and great information.  I will try this tonight and (hopefully) have some good news later!

The reason that I want to incorporate the video into my own page, or at least a link for it to open in a player, is because the built-in web server webpage is very busy and includes the links for the web cam configuration and setup, which I would like to keep from even being seen.  I like the built-in web server features, but would prefer if I could just have the video display by itself, either in a separate viewer or in one of my sites pages.

Thanks!
:-)  Joe
you could post youre buildin webserver code to.
I will try to rebuild it without the config stuff.
Hi avidya.

Here is a link to the "image" web page built into the Linksys web server.  I pulled the password requirement off for now.  <Removed per asker request>
Are you able to view the source code from this?  If not, I can try to get into the camera's web server and pick apart the pages to find what we need.

Thanks so much.  I really appreciate your kind assistance.

:-)  Joe
Hi Joe,

got an error while accessing:
There was an unusual problem serving the requested URL '/img/main_fs.htm/img/main_fs.htm'.
Hi.
I am sorry about that.  When I wrote the last message, I was at home for lunch and while there I needed to reset my dsl router, but my dynamic dns update runs once an hour and I forgot to manually run it so my dns is off the map probably for another half-hour.  If you don't mind too much to check again a little later that would be most cool.  :-)
Thanks!
- Joe
ok
Hello.
Please try this link, it should work better.  <Removed per asker request>
Thanks.
- Joe
Or maybe this one....
<Protected>
tied the last one, it works, im gonna look at the code, ok?
thank you
ASKER CERTIFIED SOLUTION
Avatar of avidya
avidya

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
WOW!!!  This is excellent!!!

Avidya, you are my hero!!!

Thank you very very much!!!

I wish I could grade an A+; a simple A is not high enough.  Your assistance was awesome!!!

Have an excellent weekend!

Cheers!

- Joe

p.s. the fish say hello  :-)
Hi Joe,
Thanks for the compliment and have fun making your own layout!
(i know the fish sad hello, i just waved to them from my local webpage, *grin*)