• July 15, 2020, 11:32:04 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Pages: 1 [2]

Author Topic: Is there a way to embed the stream from a DCS-3410 on my own web page  (Read 44630 times)

neiltimms

  • Level 1 Member
  • *
  • Posts: 12
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #15 on: October 01, 2009, 07:51:40 AM »

Thank you for your response.

I have downloaded the new firmware but i am unable to install it. It gets to about 8 or 9% and then gives the error "the upload is failed"

There is nothing else on this network except my laptop and the camera (connected via a netgear router)

Any ideas?

Thanks
Logged

jensaltb

  • Level 1 Member
  • *
  • Posts: 1
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #16 on: October 17, 2009, 06:18:57 AM »

Hello

I have the same question as these subject are related to. I have purchased a DCS-2121. I tried to embed the code above in a web page to stream from the camera and it works fine. However there are no control for the user to zoom, switch the audio off, and so on, like the controlbar which are there when you directly surf on the camera. On the directly surf site for the camera i am able to zoom the video, if i left/right-click with the mouse.

Are there any more properties for the activex control (dcsclictrl.cab) to implement, to be able to add the suggested control for zoom? Maybe there are a SDK or any other helpfile from D-Link to read?

Regards
Jens
« Last Edit: October 17, 2009, 06:21:59 AM by jensaltb »
Logged

elainevdw

  • Level 1 Member
  • *
  • Posts: 2
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #17 on: April 13, 2010, 04:29:22 PM »

This time it says: Object doesn't support this property or method, line 9 char 5
which would appear to be the line "dcs.LiveStream..."

I'm getting the same issue in Internet Explorer. What's the fix for this? It doesn't look like Neil's problem was ever truly resolved.

Also, does this script work on Firefox? Firebug tells me that "dcs.GetIEProxy is not a function" ... which would make sense, since it's not "GetFirefoxProxy" or something. :)
Logged

elainevdw

  • Level 1 Member
  • *
  • Posts: 2
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #18 on: April 19, 2010, 04:05:55 PM »

Ok, the way I got it working in IE was by removing the version altogether.

Code: [Select]
        <script language="javascript">
            document.write("<object id=\"dcs\" CLASSID=\"CLSID:721700FE-7F0E-49C5-BDED-CA92B7CB1245\" ");
            document.write(" codebase=\"http://67.130.140.129/dcsclictrl.cab\" ");
            document.write(" style=\"width: 320; height:240;\">");   
            document.write(" </object>");
           
            //set URL
            dcs.RemoteHost="67.130.140.129";
            dcs.RemotePort=80;
                 
            //set proxy to follow IE Proxy setting.
            dcs.Proxy=dcs.GetIEProxy();
            dcs.ProxyPort=dcs.GetIEProxyPort();
            dcs.SpecifiedBypass=dcs.GetIESpecifiedBypass();
            dcs.UseBypass(dcs.GetIEBypassEnable());   
            dcs.UseProxy(dcs.GetIEProxyEnable());
           
            //set username and password
            dcs.Username="admin";
            dcs.Password="admin";
             
            //Specify which profile of video acquired by the object. Typically, there are 4 profiles in a multi-profile camera.
            dcs.ProfileID="1";
       
            //Specify the stream type of the assigned profile. Possible value are: 0:MPEG4, 1:MJPG, 2:H.264.
            //User should check the stream type of each profile before connect it.   
            dcs.SetStreamType(1);       
             
            // Start video stream
            window.setTimeout('StartStreaming()', 1000);
        </script>

This requires an IE-only Active-X control, so it will NOT work on any browser except for IE (confirmed with DLink phone support). The codebase does apparently need http://ipaddress/ in front for the browser to find the cab file in the right place.

My workaround for non-IE browsers was to set the camera to take a snapshot every 5 minutes, then use PHP to grab the most recent image in the images/webcam directory. And of course, set up a crontab entry to clear the images/webcam directory once a day so that we don't exceed our web hosting storage limit.

Code: [Select]
<?php
function detectIE(){
    if (isset(
$_SERVER['HTTP_USER_AGENT']) && 
    (
strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
        return 
true;
    else
        return 
false;
}
function 
latestWebCap($path){
$path $path.'*';
foreach (glob($path) as $filename){
if (filemtime($filename) >= $recentDate){
$recentDate filemtime($filename);
$recentFile $filename.'/*';
foreach (glob($recentFile) as $filename){
if (filemtime($filename) >= $recentDate){
$recentDate filemtime($filename);
$recentFile $filename.'/*';
foreach (glob($recentFile) as $filename){
if (filemtime($filename) >= $recentDate){
$recentDate filemtime($filename);
$recentFile $filename;
}//if filemtime
}//foreach
}//if filemtime
}//foreach
}//if filemtime
}//foreach
$recentDate date(" F d, Y",$recentDate);
if(empty($recentFile)){
return 'images/webcam_maintenance.gif';
}else{
return $recentFile;
}
}
?>


<?php if (detectIE()) {  ?>
<img src="<?php echo latestWebCap('images/webcam/'); ?>" width="360" height="245" alt="Webcam Screen Capture" />
<?php ?>

So altogether, this is what the page looks like:

Code: [Select]
<?php
function detectIE(){
    if (isset(
$_SERVER['HTTP_USER_AGENT']) && 
    (
strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
        return 
true;
    else
        return 
false;
}
function 
latestWebCap($path){
$path $path.'*';
foreach (glob($path) as $filename){
if (filemtime($filename) >= $recentDate){
$recentDate filemtime($filename);
$recentFile $filename.'/*';
foreach (glob($recentFile) as $filename){
if (filemtime($filename) >= $recentDate){
$recentDate filemtime($filename);
$recentFile $filename.'/*';
foreach (glob($recentFile) as $filename){
if (filemtime($filename) >= $recentDate){
$recentDate filemtime($filename);
$recentFile $filename;
}//if filemtime
}//foreach
}//if filemtime
}//foreach
}//if filemtime
}//foreach
$recentDate date(" F d, Y",$recentDate);
if(empty($recentFile)){
return 'images/webcam_maintenance.gif';
}else{
return $recentFile;
}
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php if (!detectIE()) {  ?>
<!-- Refresh page to show new screenshot every 300 seconds (5 minutes). -->
<meta http-equiv="refresh" content="300">
<?php ?>
<title>Webcam Test</title>
<?php if (detectIE()) {  ?>
<script language="javascript">
function StartStreaming(){
    //Connect to the camera.
    //The value 0:both audio and video streaming, 1:only video streaming, 2:only audio streaming.
    dcs.LiveStreamIn(1);
}
</script>
<?php ?>
</head>
<body>
    <h1>Webcam Test</h1>   
    <?php if (detectIE()) {  ?>
        <script language="javascript">
            document.write("<object id=\"dcs\" CLASSID=\"CLSID:721700FE-7F0E-49C5-BDED-CA92B7CB1245\" ");
            document.write(" codebase=\"http://67.130.140.129/dcsclictrl.cab\" ");
            document.write(" style=\"width: 320; height:240;\">");   
            document.write(" </object>");
           
            //set URL
            dcs.RemoteHost="67.130.140.129";
            dcs.RemotePort=80;
                 
            //set proxy to follow IE Proxy setting.
            dcs.Proxy=dcs.GetIEProxy();
            dcs.ProxyPort=dcs.GetIEProxyPort();
            dcs.SpecifiedBypass=dcs.GetIESpecifiedBypass();
            dcs.UseBypass(dcs.GetIEBypassEnable());   
            dcs.UseProxy(dcs.GetIEProxyEnable());
           
            //set username and password
            dcs.Username="admin";
            dcs.Password="admin";
             
            //Specify which profile of video acquired by the object. Typically, there are 4 profiles in a multi-profile camera.
            dcs.ProfileID="1";
       
            //Specify the stream type of the assigned profile. Possible value are: 0:MPEG4, 1:MJPG, 2:H.264.
            //User should check the stream type of each profile before connect it.   
            dcs.SetStreamType(1);       
             
            // Start video stream
            window.setTimeout('StartStreaming()', 1000);
        </script>
    <?php }else{  ?>
        <img src="<?php echo latestWebCap('images/webcam/'); ?>" width="360" height="245" alt="Webcam Screen Capture" />
    <?php ?>   
</body>
</html>

My only gripe is this:

The admin panel very obviously streams the live feed in Firefox and Safari just fine. I wish DLink would supply a way to let you do the same on your own website, rather than restricting you to IE. I have a feeling that if I knew more about webcams and streaming video I could do it myself, but unfortunately I think I need a little help with that!

Anyway, hope that the above helps somebody out there.
« Last Edit: April 20, 2010, 10:03:14 AM by elainevdw »
Logged

ECF

  • Technical Engineer
  • Level 11 Member
  • *
  • Posts: 2692
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #19 on: April 20, 2010, 10:22:42 AM »

The live video stream is viewed using ActiveX. IE is the only browser that supports ActiveX.

Please try firmware 1.01 located at http://tsd.dlink.com.tw if you are having issues with streaming to your webpage.
Logged
Never forget that only dead fish swim with the stream

evilate

  • Level 1 Member
  • *
  • Posts: 1
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #20 on: April 22, 2010, 12:28:00 AM »

The live video stream is viewed using ActiveX. IE is the only browser that supports ActiveX.

Please try firmware 1.01 located at http://tsd.dlink.com.tw if you are having issues with streaming to your webpage.

The strem works both in Firefox and Internet explorer via the interface, using an Java applet... Hov do I use this applet on another webpage? Should be easy to create. Attach source and let us give it a try? :)
Logged

ECF

  • Technical Engineer
  • Level 11 Member
  • *
  • Posts: 2692
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #21 on: April 23, 2010, 02:20:29 PM »

I don't have one for using the Java applet.
Logged
Never forget that only dead fish swim with the stream

peofofo

  • Level 1 Member
  • *
  • Posts: 2
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #22 on: April 30, 2010, 03:02:48 AM »

Hi all,

i am interest by this topic and i have one question.

How many people can see the live video stream is viewed using ActiveX ?

Thanks all.
Logged

D-Link Multimedia

  • Level 7 Member
  • **
  • Posts: 1066
    • D-link Systems, Inc.
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #23 on: April 30, 2010, 03:37:58 PM »

Hi all,

i am interest by this topic and i have one question.

How many people can see the live video stream is viewed using ActiveX ?

Thanks all.


I believe the cap is 10 concurrent users.
Logged

peofofo

  • Level 1 Member
  • *
  • Posts: 2
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #24 on: April 30, 2010, 11:33:25 PM »

How to broadcast the camera has several hundred people?
I have a server that has the potential to increase the number of simultaneous connections. Would there be a solution to use?
« Last Edit: May 02, 2010, 03:09:33 AM by peofofo »
Logged

rpiboy

  • Level 1 Member
  • *
  • Posts: 1
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #25 on: September 13, 2010, 08:06:07 AM »

Should I be able to substitute a URL for the remote host line:

Code: [Select]
dcs.RemoteHost="192.168.1.102";

When I try to plug in a valid http URL the html page does not work. It works fine with the IP. I would have expected a URL to resolve to the correct IP without a problem? Or could I have port forwarding issues on my router?

Thanks,
-R
Logged

ryanjennings

  • Level 1 Member
  • *
  • Posts: 1
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #26 on: October 09, 2010, 10:28:21 AM »

Along the same lines as the video stream.  Is there a way to link directly to a jpg snapshot?
Logged

panchoparis

  • Level 1 Member
  • *
  • Posts: 1
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #27 on: April 14, 2011, 07:55:03 AM »

Thanks a Lot!!! ECF, your answer save me. ;D
gracias compadre!!

Is a old theme, but worked for me now
Saddly work only in IE (WTF) >:(, by activex . If useful for any person I give you the Know How...
(To Chrome I tried other code)

To IE...

Code to dowload an install .cab

<OBJECT classid="CLSID:721700FE-7F0E-49C5-BDED-CA92B7CB1245" codebase="../cab/dcsclictrl.cab#VERSION=1,0,0,2609" width="24" height="15">
</OBJECT>

The cab is downloaded from same camera dlink  http://xxx.xxx.xxx.xxx/dcsclictrl.cab and put in my web site

Check the classid and version from properties of dscclictrl.dll or view activex.inf file, replace in the code if necessary

My code htm...
<HTML>
<HEAD>
<TITLE>Camara id:27</TITLE>
<script language="javascript">
function StartStreaming()
{
    //Connect to the camera.
    //The value 0:both audio and video streaming, 1:only video streaming, 2:only audio streaming.
    dcs.LiveStreamIn(1);
}
</script>
</HEAD>
<BODY>
<script language="javascript">
    document.write("<OBJECT ID=\"dcs\" CLASSID=\"CLSID:721700FE-7F0E-49C5-BDED-CA92B7CB1245\" ");
    document.write(" codebase=\"/dcsclictrl.cab #Version=1,0,0,2609\" ");
    document.write(" style=\"WIDTH: 250; HEIGHT:200;\">");   
    document.write(" </OBJECT>");
   
    //set URL
    dcs.RemoteHost="192.100.110.26";
    dcs.RemotePort=8090;
         
    //set proxy to follow IE Proxy setting.
    dcs.Proxy=dcs.GetIEProxy();
    dcs.ProxyPort=dcs.GetIEProxyPort();
    dcs.SpecifiedBypass=dcs.GetIESpecifiedBypass();
    dcs.UseBypass(dcs.GetIEBypassEnable());   
    dcs.UseProxy(dcs.GetIEProxyEnable());
   
    //set username and password
    dcs.Username="p";
    dcs.Password="p";
     
    //Specify which profile of video acquired by the object. Typically, there are 4 profiles in a multi-profile camera.
    dcs.ProfileID="1";

    //Specify the stream type of the assigned profile. Possible value are: 0:MPEG4, 1:MJPG, 2:H.264.
    //User should check the stream type of each profile before connect it.   
    dcs.SetStreamType(0);
   
     
    // Start video stream
    window.setTimeout('StartStreaming()', 1000);
</script>
</BODY>
</HTML>

Logged
Pages: 1 [2]