Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1382
  • Last Modified:

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 (http://www.experts-exchange.com/Web/Q_20799705.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.”
0
JOE-BULLITT
Asked:
JOE-BULLITT
  • 8
  • 7
1 Solution
 
avidyaCommented:
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.
0
 
GitchoCommented:
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)
0
 
avidyaCommented:
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.

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
JOE-BULLITTAuthor Commented:
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
0
 
avidyaCommented:
you could post youre buildin webserver code to.
I will try to rebuild it without the config stuff.
0
 
JOE-BULLITTAuthor Commented:
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
0
 
avidyaCommented:
Hi Joe,

got an error while accessing:
There was an unusual problem serving the requested URL '/img/main_fs.htm/img/main_fs.htm'.
0
 
JOE-BULLITTAuthor Commented:
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
0
 
avidyaCommented:
ok
0
 
JOE-BULLITTAuthor Commented:
Hello.
Please try this link, it should work better.  <Removed per asker request>
Thanks.
- Joe
0
 
JOE-BULLITTAuthor Commented:
Or maybe this one....
<Protected>
0
 
avidyaCommented:
tied the last one, it works, im gonna look at the code, ok?
0
 
JOE-BULLITTAuthor Commented:
thank you
0
 
avidyaCommented:
Hi Joe,

Nice fish!

try this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
 <head><title>Linksys Web Camera</title>
 <LINK REL="stylesheet" TYPE="text/css" HREF="http:<Protected>:1024/std.css">
 <meta name="description" content="LCS 3042">
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <META http-equiv="Pragma" CONTENT="no-cache">
 <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
 <meta HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT">
 <script language="JavaScript" type="text/javascript" src="http:<Protected>:1024/stdlib.js"></script>
 <script language="JavaScript" type="text/javascript" src="http:<Protected>:1024/message.js"></script>
 <script language="JavaScript" type="text/javascript">
 <!-- Start Script
 // =================================  Player ===========================
 function isIE()
  {
   if(navigator.appName.indexOf("Microsoft") != -1)
    return true;
   else return false;
   // test navigator.platform for Win32
   // if(navigator.platform.indexOf("Win32") != -1)
  }
  var run_flag = false;
  var intervalID = null;
 function doPlay()
  {
  //var serverAddress = "http://"  +   self.location.host  + "/img/video.asf";
  var serverAddress = "http:<Protected>";
  var itimer = 1000 ;  // msecs
  if(isIE() && document.all)
  {
   if(document.all('NetCamPlayerWeb1'))
   {
    document.all('NetCamPlayerWeb1').SetSource(serverAddress, "", "");
    document.all('NetCamPlayerWeb1').StartPlay(0,'');  
    //intervalID = setInterval("document.all('NetCamPlayerWeb1').StartPlay(0,'')",itimer);
    run_flag = true;
   }
  }
 }
 function doStop()
  {
  if(isIE() && document.all)
   if(document.all('NetCamPlayerWeb1'))
    {
     //clearInterval(intervalID);
     document.all('NetCamPlayerWeb1').StopPlay();
    }
   }
 function showHelp()
  {
   var cf = document.forms[0];
   if (cf.adminlogin.value == "true")
    window.open("http:<Protected>:1024/adm/file.cgi?next_file=help.htm","help_win");
   else
    window.open("http:<Protected>:1024/hlp_client.htm","help_win");
   }
   // End Script -->
 </script>
</head>
<body bgcolor="" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" onLoad="doPlay();" onUnload="doStop();">
 <form name="dummy" method="get" action="" onSubmit="return false;">
  <div align="center">
    <table bgcolor="" border="0" cellspacing="0" cellpadding="0" width="100%">
    <tr>
     <td align="right"><a href="javascript:parent.close()">Exit</a></td>
    </tr>
    <tr>
     <td bgcolor="">
      <object classid="clsid:1D9EFA3B-4E85-41A8-9092-14012CD447C9" CODEBASE="http:<Protected>:1024/img/NetCamPlayerWeb.ocx" id="NetCamPlayerWeb1" WIDTH="320" HEIGHT="240">
       <param name="_Version" value="65536">
       <param name="_ExtentX" value="11774">
       <param name="_ExtentY" value="6562">
       <param name="_StockProps" value="0">
      </object>
     </td>
    </tr>
    </table>
  </div>
  <input type="hidden" name="message" value="">
  <input type="hidden" name="adminlogin" value="">
  <input type="hidden" name="todo" value="connect">
 </form>
</body>
</html>
0
 
JOE-BULLITTAuthor Commented:
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  :-)
0
 
avidyaCommented:
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*)
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 8
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now