• March 28, 2024, 09:16:48 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 49107 times)

neiltimms

  • Level 1 Member
  • *
  • Posts: 12

Hi All,

title says it all really. I have searched everywhere but cannot find any reference to embedding the stream from my 3410 camera on my own webpage.

Any assistance appreciated.

Neil
Logged

ECF

  • Administrator
  • Level 11 Member
  • *
  • Posts: 2692
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #1 on: September 16, 2009, 02:57:05 PM »

Use the below example code to view the streaming video from your DCS-3410 on your webpage. If the camera is behind a NAT device such as a router, the IP must be edited to reflect the public address of the router. In this example the public IP address of the router is 67.130.140.129 and the port used to access the camera publicly is 80. You will also need to edit the username and password for the remote connection by editing in the fields UserName and Password. In this example the UserName is username and the Password is password


<HTML>
<HEAD>
<TITLE>IPCamera ActiveX Control Sample</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(0);
}
</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,2125\" ");
    document.write(" style=\"WIDTH: 640; HEIGHT:480;\">");   
    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="username";
    dcs.Password="password";
      
    //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
Never forget that only dead fish swim with the stream

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 #2 on: September 16, 2009, 03:59:18 PM »

Thank you for the reply.

I saved your code in notepad to a html file and changed the IP address etc. When i launch it i just get a blank page.
in the bottom left of ie there is a yellow triangle next to the "Done" word
I double clicked to see what the problem was and it says "Invalid Argument" and points to line 43 char 23 which seems to be the  ' in front of Startstreaming.

Ok, so just for the heck of it i removed both of the ' from that line.

Now i see a box outline with a red x in the top left. Same yellow caution in bottom left.

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..."

Any ideas what i am doing wrong?

Many thanks

Neil

Logged

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 #3 on: September 17, 2009, 05:38:51 AM »

Ok, i just tried this on the local lan where the camera is, using xp pro ie 7 i do not see the error, but the page is still completely blank.

Should have said that previous post is using Vista Home Pro, ie 8

Thanks for any advise you have
« Last Edit: September 17, 2009, 05:42:07 AM by neiltimms »
Logged

kandm00

  • Level 1 Member
  • *
  • Posts: 16
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #4 on: September 17, 2009, 11:50:31 AM »

If you copied and pasted from the post you might've gotten the fancy single quotes instead of regular single quotes.  Either delete the single quotes and add them back in or use double quotes.

Code: [Select]
window.setTimeout('StartStreaming()', 1000);
or
window.setTimeout("StartStreaming()", 1000);
Logged

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 #5 on: September 17, 2009, 12:22:09 PM »

Ok i removed the ' and replaced them with " using notepad.

I no longer get a blank screen but still get no picture or sound. I just see a box (the size as specified in the code) with the little red x in the top left.
I have tried both locally and using the public IP to no avail. Also when connecting remotely (via public IP) i added the site to my trusted domains but get the same result.

I have obviously missed something.

Please help.

Thanks
Logged

kandm00

  • Level 1 Member
  • *
  • Posts: 16
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #6 on: September 17, 2009, 01:14:15 PM »

I'm just guessing here (I only have DCS-920s) but I believe the cab file is not being found or loaded.  The <object> tag is referencing the cab file locally but I'm pretty sure it should be loading it from the camera instead (unless it is part of an sdk that you install on your own server).

Try changing:

Code: [Select]
document.write(" codebase=\"/dcsclictrl.cab #Version=1,0,0,2125\" ");to
Code: [Select]
document.write(" codebase=\"http://[CameraIP]/dcsclictrl.cab #Version=1,0,0,2125\" ");
replacing [CameraIP] with the ip address of your camera.
Logged

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 #7 on: September 17, 2009, 01:30:42 PM »

No, still the same result. I tried it with just the IP - http://192.168.0.2 and also adding the port - http://192.168.0.2:84

Both gave the same result.

is there a way to install the cab file locally? how can i download it?

Or any other ideas?

Thanks
Logged

kandm00

  • Level 1 Member
  • *
  • Posts: 16
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #8 on: September 17, 2009, 02:09:03 PM »

Does the DCS-3410 have an administration page with an Active-X viewer?  If so you can view the source of it and see what it is doing.  I looked at the Active-X viewer page for the DCS-920 and it uses a different cab file.

Code: [Select]
<OBJECT ID="cvcs" WIDTH=640 HEIGHT=480
CLASSID="CLSID:CCA0B877-CB5E-4adc-AD30-457C379512DD"
CODEBASE="xplugLiteDL.cab#version=2,3,2,0"></OBJECT>

I can download the cab file using: http://192.168.2.111/xplugLiteDL.cab

So http://[CameraIP]/dcsclictrl.cab should work for you if the cab file is on the camera.  If it is password protected you might need to use http://username:password@[CameraIP]/dcsclictrl.cab instead.

Did you change the username and password fields in the javascript code to match your camera login?  There are also two commented out lines below the username and password.  Maybe they need to be uncommented.

Code: [Select]
    //dcs.ProfileID="1";
    //dcs.SetStreamType(0);
Logged

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 #9 on: September 17, 2009, 02:37:41 PM »

OK Some progress, well a little anyway.

I downloaded the .cab file and had a look inside. I noticed that in the activex.inf it was referencing #Version=1,0,0,1805

In the script it was calling version=1,0,0,2125

So i changed that and now when it launches i get a black box. Still no picture or audio but at least it's something different!  :)

(btw i did enable the two lines commented out with regards to the profile to use)

So is my firmware out of date? is there something else that needs to be changed based on this version difference? I checked but couldn't find a firmware update available.

Thanks for your continued help.
Logged

kandm00

  • Level 1 Member
  • *
  • Posts: 16
Re: Is there a way to embed the stream from a DCS-3410 on my own web page
« Reply #10 on: September 17, 2009, 03:35:27 PM »

I don't see any firmware updates for the DCS-3410 on the support site or the ftp site.  I'm guessing the code sample is either from an unreleased firmware update or from a similar camera and it's possible it only works with the newer cab file.  ECF would need to clarify.  I'm out of ideas other than trying different values for dcs.ProfileID and dcs.SetStreamType(), but I'll post if I think of anything else.
Logged

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 #11 on: September 17, 2009, 03:45:39 PM »

Well, thanks anyway.

Ok, ECF what do you think?

Thanks
Logged

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 #12 on: September 21, 2009, 05:41:34 AM »

ECF?
Logged

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 #13 on: September 30, 2009, 12:40:31 PM »

Is the lack of reponse here because no-one at d-link has an answer. I sent a mail to customer service as well and never heard back.

Great service >:(
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 #14 on: September 30, 2009, 04:02:04 PM »

Is the lack of reponse here because no-one at d-link has an answer. I sent a mail to customer service as well and never heard back.

Great service >:(

Download the 1.01 firmware from http://tsd.dlink.com.tw/

Its the same firmware that will be released here this week. That code was intended for the newer firmware.

Also just to verify that the code is correct here it is again inside of code brackets. The only 4 lines that should be changed are the following,

Code: [Select]
dcs.RemoteHost="172.19.150.96";
dcs.RemotePort=80;
dcs.Username="admin";
dcs.Password="admin";

Code: [Select]
<HTML>
<HEAD>
<TITLE>IPCamera ActiveX Control Sample</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(0);
}
</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,2125\" ");
    document.write(" style=\"WIDTH: 640; HEIGHT:480;\">");
    document.write(" </OBJECT>");

    //set URL
    dcs.RemoteHost="172.19.150.96";
    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(0);
   

    // Start video stream
    window.setTimeout('StartStreaming()', 1000);
</script>
</BODY>
</HTML>
« Last Edit: September 30, 2009, 04:04:34 PM by D-Link Multimedia »
Logged
Pages: [1] 2