Jump to content

Recommended Posts

ok, i have to make a website that gets the info from our internal surveilance system... the cameras are set to show a video stream of what's happening and record when there's movement. i was thinking of streaming the video from the camera and display it.

 

my issues : i can't connect to the cameras, either with html / php either with vlc media player, so i might do something wrong

 

also, the camera has a website of it's own and shows the image, but i need to show more cameras in the same window, and i can't make the users open different browsers. also, the camera website gives more info than i need, so frames aren't usefull...

 

the code i was using :

 

      <center>
        <object id="MediaPlayer1"
          classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
          codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
          width="500" height="500"
          type="application/x-oleobject">
          <param name="autostart" value="false">
          <param name="filename" value="sample.avi">
          <param name="showcontrols" value="true">
          <param name="ShowStatusBar" value="true">
          <embed type="application/x-mplayer2" src="sample.avi" width="500" height="500" autostart="1" showcontrols="1" showstatusbar="1"></embed>
        </object>

        <object id="MediaPlayer2"
          classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
          codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
          width="500" height="500"
          type="application/x-oleobject">
          <param name="autostart"value="true">
          <param name="filename" value="http://194.113.165.178">
          <param name="showcontrols" value="true">
          <param name="ShowStatusBar" value="true"> 
	<EMBED src="http://194.113.165.178" width=300 height=225></EMBED>
       </object>
<hr>
        <object id="MediaPlayer2"
          classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
          codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
          width="500" height="500"
          type="application/x-oleobject">
          <param name="autostart"value="true">
          <param name="filename" value="http://194.113.165.178&StreamMode=HTTP&MimeType=video/msvideo">
          <param name="showcontrols" value="true">
          <param name="ShowStatusBar" value="true"> 
<EMBED src="http://194.113.165.178:80&StreamMode=HTTP&MimeType=video/msvideo" width=300 height=225 ></EMBED>
       </object>


<!--- BEGIN PLAYER --->
<!-- webbot bot="HTMLMarkup" startspan ---->
<object ID="MediaPlayer" WIDTH="500" HEIGHT="500" 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="sample.avi">
<param NAME="ShowControls" VALUE="true">
<param NAME="ShowStatusBar" VALUE="true">
<embed TYPE="application/x-mplayer2" SRC="194.113.165.178:80" NAME="MediaPlayer" WIDTH="500" HEIGHT="500" autostart="1" showcontrols="1"></embed></object>
<!-- webbot bot="HTMLMarkup" endspan ---->
<!--- end PLAYER --->
</object>

 

the code with "sample.avi" works, the one with the ip doesn't... i'm guessing you'll need more info than this, so tell me what you need to know

Link to comment
https://forums.phpfreaks.com/topic/119625-need-help-with-ip-cameras/
Share on other sites

Can't you just view source on the page that has the camera's pictures and use that code for each camera? If you want to stream a live video feed from the cameras you would need streaming software on their servers.

 

If the code on the camera's pages is dynamicly generated, you can use regex to get the parts you want from it.

the whole page is generated via javascript... it's not my strong-point... i'd use reg-ex but i really can't debug the code...

 

also, the pages have a software that can connect to 4+ cameras, but i can't get anything to connect to them... the cameras have 3 ports open, http, ssl and annother one i forgot...

 

since the software can connect to the cameras, i'm not sure they need a streaming server... or the software can be used as a server

 

we have 2 models , the LC-7222E and LC-7224E

the producer link is :

http://www.approtech.com/product_tree.php?cPath=42_53_81

 

i'm stunned.. i really have no idea what to do... currently i'm researching some broadcasting solutions... but can't find any that work... any help would be appreciated...

this is the source of the homepage :

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv=Content-Type content="text/html; charset=UTF-8"> <script language=javascript src=var.js></script> <script language=javascript src=common.js></script> <script>CONTENT_PAGE="main.htm";InitLoad();</script> <script>WriteHtmlHead(null,null,null,"CallOnUnload","CallOnResize");</script><OBJECT CLASSID="CLSID:F47E687B-551F-4043-89B3-F6E3F5DAD01E" CODEBASE="/VDControl.CAB#version=1,0,2,8" width=0 height=0></OBJECT> <script>var tick=0;var xhttp=null;var daylight="1";var audioSupport="1";var useActiveX="0";var timerID=null;var timeFormat=parseInt("0");var camDate;var imagesource="1";var timerID2=null;var mySize=new SIZE(g_viewXSize,g_viewYSize);var DCL_1={zoom:"1",width:"<%jpegxsize.1%>",height:"<%jpegysize.1%>"};var DCL_2={zoom:"1",width:"<%jpegxsize.2%>",height:"<%jpegysize.2%>"};var DCL_3={zoom:"1",width:"<%jpegxsize.3%>",height:"<%jpegysize.3%>"};var DCL_4={zoom:"1",width:"<%jpegxsize.4%>",height:"<%jpegysize.4%>"};if(Is2114()){DCL_1.height*=2;DCL_2.height*=2;DCL_3.height*=2;DCL_4.height*=2;}
if(IsMpeg4()){AddLightBtn("audioBtn",-100,-100,15,18,"on.gif","off.gif",AudioProcess,GL("audio_switch"));AddLightBtn("recBtn",-100,-100,15,18,"onRec.gif","offRec.gif",RecProcess,GL("record_switch"));AddLightBtn("speedBtn",-100,-100,15,18,"lowSpeed.gif","highSpeed.gif",SpeedProcess,GL("speed_switch"));}
function SIZE(w,h){this.w=parseInt(w);this.h=parseInt(h);}
function AudioProcess(){StartActiveXEx(GetLight("speedBtn"),GetLight("audioBtn"));}
function RecProcess(){if(IsMpeg4()){var ctrl=GE(AxID);if(ctrl!=null){if(GetLight("recBtn")==1){var y,M,d,h,m,s;y=FixNum(camDate.getYear(),2);M=FixNum(camDate.getMonth()+1,2)=FixNum(camDate.getDate(),2);h=FixNum(camDate.getHours(),2);m=FixNum(camDate.getMinutes(),2);s=FixNum(camDate.getSeconds(),2);var filename="Clip_D4_"+y+M+d+h+m+s+".avi";ctrl.RecordStart(filename);}
else{ctrl.RecordStop();}}}}
function SpeedProcess(){StartActiveXEx(GetLight("speedBtn"),GetLight("audioBtn"));}
function ChangeDateFormat(){timeFormat++;if(timeFormat>2)
timeFormat=0;}
function GetCHSize(){var w=myDCL.width;var h=myDCL.height;if((w>700||w==640)&&(h==240||h==288))h*=2;return new SIZE(w,h);}
function MY_CH_CHANGE(){myDCL=eval("DCL_"+g_CHID);mySize=GetCHSize();FixZoomPos();SetValue("zoomSel",myDCL.zoom);CtrlSizeChange(0,0,mySize.w*myDCL.zoom,mySize.h*myDCL.zoom);}
function MY_ONLOAD(){var obj=GE("viewCHSel");if(obj!=null){obj.options[0].text="ALL";}
LoadClock();CallOnResize();SetLight("audioBtn",0);SetLight("recBtn",0);SetLight("speedBtn",0);if(useActiveX==1||IsMpeg4()){if(IsVS()){if(g_CHID==0){for(var i=1;i<=g_maxCH;i++){StartActiveXEx(0,0,i,i);}}
else{MY_CH_CHANGE();}}
else{StartActiveXEx(GetLight("speedBtn"),GetLight("audioBtn"));}}
else{imgFetcher.RunDms();}
g_lockLink=false;}
function MY_ONUNLOAD(){clearTimeout(timerID);clearTimeout(timerID2);StopActiveX();var obj=GE("viewCHSel");if(obj!=null){obj.options[0].text="---";}}
function MY_ONRESIZE(){FixButtonPos();}
function GetZoomHtml(){var o='';o+='<div id="zoomLayer" class="cssViewChLayer">';o+='</div>';return o;}
function GetZoomCtx(){var o='';o+=GL('zoom')+': ';o+="<select onChange='ZoomChange(this.value)' id='zoomSel' class='m1'>";o+="<option value='1' selected >1X</option>";if(mySize.w<600)o+="<option value='2' >2X</option>";if(mySize.w<300)o+="<option value='4' >4X</option>";o+="</select>";return o;}
function ZoomChange(z){z=parseInt(z);if(IsVS()){myDCL.zoom=z;CtrlSizeChange(0,0,mySize.w*z,mySize.h*z);}
else{CtrlSizeChange(GetLight("speedBtn"),GetLight("audioBtn"),mySize.w*z,mySize.h*z);}}
function CtrlSizeChange(iframe,audio,w,h){var exID=(IsVS()?"1":"");var ax=(IsMpeg4()||useActiveX==1);try{GE(AxID+exID).ForceStop();GE(AxID+exID).width=w;GE(AxID+exID).height=h;}catch(e){};if(ax){timerID2=setTimeout("StartActiveXEx("+iframe+","+audio+(IsVS()?",g_CHID,1":"")+")",500);}}
function FixZoomPos(){var halfWidth=document.body.offsetWidth/2;var obj=GE("zoomLayer");if(obj!=null){if((IsVS()&&g_CHID==0)||(mySize.w>=600)){obj.style.left=-600;}
else{obj.style.left=halfWidth+70;obj.style.top=40;obj.innerHTML=GetZoomCtx();}}}
function FixButtonPos(){var halfWidth=document.body.offsetWidth/2;SetLightPos("audioBtn",halfWidth+280,10);SetLightPos("recBtn",halfWidth+340,10);SetLightPos("speedBtn",halfWidth+310,10);var obj=GE("timeLayer");if(obj!=null){obj.style.left=halfWidth-140;}
FixZoomPos();}
function LoadClock(){xhttp=InitXHttp();xhttp.onreadystatechange=OnReadyClockProcess;try{xhttp.open("GET","datetime.htm",true);xhttp.send(null);}catch(e){};}
function OnReadyClockProcess(){if(xhttp.readyState==4&&xhttp.status==200){camDate=new Date(xhttp.responseText);RunClock();}}
function RunClock(){if(tick>150){tick=0;LoadClock();}
else{ShowClock();timerID=setTimeout("RunClock()",1000);camDate.setTime(camDate.getTime()+1000);}
tick++;}
function ShowClock(){var o=GiveMeDateTimeString(camDate,timeFormat,daylight);if(daylight!=1){o="    "+o;}
GE("currentCameraTime").value=o;}
DW(GetZoomHtml());</script> <div id=timeLayer class=cssTimerLayer align=right> <a href="javascript:ChangeDateFormat()" onMouseMove="WS(GL('click_to_change_mode'));" onMouseLeave="WS();"> <input id=currentCameraTime class=watch alt='{$click_to_change_mode}' disabled size=24> </a></div> <center> <script>var o="";if(IsVS()){useActiveX=1;}
if(IsMpeg4()||useActiveX==1){if(IsVS()){if(g_CHID==0){o+="<table><tr><td>";o+=GetTagAX1AndFixSize(1);o+="</td><td>";o+=GetTagAX1AndFixSize(2);o+="</td></tr><tr><td>";o+=GetTagAX1AndFixSize(3);o+="</td><td>";o+=GetTagAX1AndFixSize(4);o+="</td></tr></table>";}
else{o+="<table ><tr><td height='480' valign='middle'>";o+=GetTagAX1AndFixSize(1);o+="</td><td></table>";}}
else{o+="<table ><tr><td height='480' valign='middle'>";o+=GetTagAX1AndFixSize();o+="</td><td></table>";}}
else{DW('<table ><tr><td height="480" valign="middle" ><table bordercolor="#99CCFF" border="3"><tr><td>');DW(imgFetcher.GetDmsImgStr("<%jpegxsize%>","<%jpegysize%>"));DW("</td></tr></table></td></tr></table>");}
DW(o);</script> <script>ALC();</script> <script>WriteBottom();</script></html>

 

found out how to connect to the cameras with vlc : http://user:pass@ip/appro-cgi/mpeg4.cgi

 

does anyone know how to connect to this link or use vlc as a server and stream from there ?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.