Videoüberwachung

Supi, jetzt funktionierts! Sehr fein, dank dir!! Was gehen wir als Nächstes an :wink:

Habs mal bereinigt :slight_smile:

Das nächste mal gehen wir in den Chat.

Bei mir siehts allerdings so aus damit es funktioniert:

<!--
<!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" xml:lang="de" lang="de">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">

<style type="text/css">@import "camera.css";</style>
<style type="text/css">
html, body { margin: 0; padding: 0; }
</style>

</head><body>

<table style="width: 100%; height: 100%; border: 0;"><tbody><tr><td align="center" valign="top">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.100.9:8080/loading.jpg" class="webcam" id="webcam1" onmousedown="PTZMouseDown1(event)" width="320" height="240" alt="Live Stream" />
</div></div>
</td></tr>
</tbody></table>

</body></html>

<script type="text/javascript">
<!--
currentCamera1= 1;
errorimg1= 0;
document.images.webcam1.onload = DoIt1;
document.images.webcam1.onerror = ErrorImage1;
function LoadImage1()
{
        uniq1 = Math.random();
        document.images.webcam1.src = "http://192.168.100.9:8080/cam_" + currentCamera1 + ".jpg?uniq="+uniq1;
        document.images.webcam1.onload = DoIt1;
}
function PTZMouseDown1(e)
{
        var IE = document.all?true:false;
        var x,y;
        var myx,myy;
        var myifr = document.getElementById("_iframe-ptz");
        tp = getElPos1();
        myx = tp[0];
        myy = tp[1];
        if(IE){
        var scrollX = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft;
        var scrollY = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
        x = event.clientX - myx + scrollX;
        y = event.clientY - myy + scrollY;
        } else {
        x = e.pageX - myx;
        y = e.pageY - myy;
        }
        if (width_array[currentCamera1] > 0) x = Math.round((x * 400) / width_array[currentCamera1]);
        if (height_array[currentCamera1] > 0) y = Math.round((y * 300) / height_array[currentCamera1]);
        if (x > 400) x = 400;
        if (y > 300) y = 300;
        if (myifr != null) myifr.src = "http://192.168.100.9:8080/ptz?src=" + currentCamera1 + "&moveto_x=" + x + "&moveto_y=" + y +"";
        return true;
}
function getElPos1()
{
            el = document.images.webcam1;
            x = el.offsetLeft;
            y = el.offsetTop;
            elp = el.offsetParent;
            while(elp!=null)
              { x+=elp.offsetLeft;
                y+=elp.offsetTop;
                elp=elp.offsetParent;
              }
            return new Array(x,y);
}
function ErrorImage1()
{
        errorimg1++;
        if (errorimg1>3){
              document.images.webcam1.onload = "";
              document.images.webcam1.onerror = "";
              document.images.webcam1.src = "offline.jpg";
              }else{
                uniq1 = Math.random();
            document.images.webcam1.src = "http://192.168.100.9:8080/cam_" + currentCamera1 + ".jpg?uniq="+uniq1;
              }
}
function DoIt1()
{
        errorimg1=0;
        window.setTimeout("LoadImage1();", 40);
}
//-->
</script>

Allerdings keine Ahnung was da notwendig ist und was nicht :wink:

Ja, ist egal. Habe die PTZ rausgenommen und das Error.

Kannst ruhig so lassen.

Super, danke. Wenn ich dann meine Axis wieder zum Laufen gebracht habe kann ich auch die noch mit reinnehmen.

Kannst mir nochmal helfen RWN. Wie muß ich denn den Code nun anpassen um noch ne zweite CAM auf die Seite zu bringen? Hab mich schon ein wenig gespielt, aber scheint ne reine Glückssache zu sein bei mir :wink:

Code für die 2te Cam erstellen und einfügen, neuen Rahmen anlegen und links oder rechts platzieren. Quasi das selbe Spiel wie für die erste nur Code für die 2te.

Ich hab hier noch irgendwo einen Fehler, die Bilder sind nicht in einer Reihe und der Stream funktioniert auch nicht! Siehe Bild. Kannst du mir sagen wo ich da noch nen Fehler habe?

Korrektur: Stream funktioniert doch! Firefox neustarten hat geholfen!!

<!--
<!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" xml:lang="de" lang="de">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">

<style type="text/css">@import "camera.css";</style>
<style type="text/css">
html, body { margin: 0; padding: 0; }
</style>

</head><body>

<table style="width: 100%; height: 100%; border: 0;"><tbody><tr><td align="center" valign="top">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.100.9:8080/loading.jpg" class="webcam" id="webcam1" onmousedown="PTZMouseDown1(event)" width="320" height="240" alt="Live Stream" />
</div></div>

<table style="width: 100%; height: 100%; border: 0;"><tbody><tr><td align="left" valign="top">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.100.9:8080/loading.jpg" class="webcam" id="webcam2" onmousedown="PTZMouseDown2(event)" width="320" height="240" alt="Live Stream" />
</div></div>
</td></tr>
</tbody></table>

</body></html>


<script type="text/javascript">
<!--
currentCamera1= 1;
errorimg1= 0;
document.images.webcam1.onload = DoIt1;
document.images.webcam1.onerror = ErrorImage1;
function LoadImage1()
{
        uniq1 = Math.random();
        document.images.webcam1.src = "http://192.168.100.9:8080/cam_" + currentCamera1 + ".jpg?uniq="+uniq1;
        document.images.webcam1.onload = DoIt1;
}
function PTZMouseDown1(e)
{
        var IE = document.all?true:false;
        var x,y;
        var myx,myy;
        var myifr = document.getElementById("_iframe-ptz");
        tp = getElPos1();
        myx = tp[0];
        myy = tp[1];
        if(IE){
        var scrollX = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft;
        var scrollY = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
        x = event.clientX - myx + scrollX;
        y = event.clientY - myy + scrollY;
        } else {
        x = e.pageX - myx;
        y = e.pageY - myy;
        }
        if (width_array[currentCamera1] > 0) x = Math.round((x * 400) / width_array[currentCamera1]);
        if (height_array[currentCamera1] > 0) y = Math.round((y * 300) / height_array[currentCamera1]);
        if (x > 400) x = 400;
        if (y > 300) y = 300;
        if (myifr != null) myifr.src = "http://192.168.100.9:8080/ptz?src=" + currentCamera1 + "&moveto_x=" + x + "&moveto_y=" + y +"";
        return true;
}
function getElPos1()
{
            el = document.images.webcam1;
            x = el.offsetLeft;
            y = el.offsetTop;
            elp = el.offsetParent;
            while(elp!=null)
              { x+=elp.offsetLeft;
                y+=elp.offsetTop;
                elp=elp.offsetParent;
              }
            return new Array(x,y);
}
function ErrorImage1()
{
        errorimg1++;
        if (errorimg1>3){
              document.images.webcam1.onload = "";
              document.images.webcam1.onerror = "";
              document.images.webcam1.src = "offline.jpg";
              }else{
                uniq1 = Math.random();
            document.images.webcam1.src = "http://192.168.100.9:8080/cam_" + currentCamera1 + ".jpg?uniq="+uniq1;
              }
}
function DoIt1()
{
        errorimg1=0;
        window.setTimeout("LoadImage1();", 40);
}

currentCamera2= 2;
errorimg2= 0;
document.images.webcam2.onload = DoIt2;
document.images.webcam2.onerror = ErrorImage2;
function LoadImage2()
{
        uniq2 = Math.random();
        document.images.webcam2.src = "http://192.168.100.9:8080/cam_" + currentCamera2 + ".jpg?uniq="+uniq2;
        document.images.webcam2.onload = DoIt2;
}
function PTZMouseDown2(e)
{
        var IE = document.all?true:false;
        var x,y;
        var myx,myy;
        var myifr = document.getElementById("_iframe-ptz");
        tp = getElPos2();
        myx = tp[0];
        myy = tp[1];
        if(IE){
        var scrollX = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft;
        var scrollY = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
        x = event.clientX - myx + scrollX;
        y = event.clientY - myy + scrollY;
        } else {
        x = e.pageX - myx;
        y = e.pageY - myy;
        }
        if (width_array[currentCamera2] > 0) x = Math.round((x * 400) / width_array[currentCamera2]);
        if (height_array[currentCamera2] > 0) y = Math.round((y * 300) / height_array[currentCamera2]);
        if (x > 400) x = 400;
        if (y > 300) y = 300;
        if (myifr != null) myifr.src = "http://192.168.100.9:8080/ptz?src=" + currentCamera2 + "&moveto_x=" + x + "&moveto_y=" + y +"";
        return true;
}
function getElPos2()
{
            el = document.images.webcam2;
            x = el.offsetLeft;
            y = el.offsetTop;
            elp = el.offsetParent;
            while(elp!=null)
              { x+=elp.offsetLeft;
                y+=elp.offsetTop;
                elp=elp.offsetParent;
              }
            return new Array(x,y);
}
function ErrorImage2()
{
        errorimg2++;
        if (errorimg2>3){
              document.images.webcam2.onload = "";
              document.images.webcam2.onerror = "";
              document.images.webcam2.src = "offline.jpg";
              }else{
                uniq2 = Math.random();
            document.images.webcam2.src = "http://192.168.100.9:8080/cam_" + currentCamera2 + ".jpg?uniq="+uniq2;
              }
}
function DoIt2()
{
        errorimg2=0;
        window.setTimeout("LoadImage2();", 40);
}
//-->
</script>
 


</head><body>

<table style="width: 100%; height: 100%; border: 0;"><tbody><tr><td align="center" valign="top">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.100.9:8080/loading.jpg" class="webcam" id="webcam1" onmousedown="PTZMouseDown1(event)" width="320" height="240" alt="Live Stream" />
</div></div>
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.100.9:8080/loading.jpg" class="webcam" id="webcam2" onmousedown="PTZMouseDown2(event)" width="320" height="240" alt="Live Stream" />
</div></div>
</td></tr>
</tbody></table>

Funktioniert! Dank dir. Denk da wär ich selbst wohl nicht draufgekommen :frowning:

Hi RWN

Das ist alles super gelungen mit den Kameras.

Ich nutze 6 Kameras. Wie bekomme ich nun alle meine Kameras inkl. zwei buttons diese lösen einen skript aus, für Tür auf und zu auf eine Seite. 1024x768 Bildschirmauflösung ich dachte mir drei oben drei unten und in der Mitte die zwei buttons.

Würdest du mir den code bitte umschreiben.

Danke und ein frohes neues Jahr…

MFG Franz

<!--
<!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" xml:lang="de"  lang="de">
<head>

<meta http-equiv="Content-Type" content="text/html;  charset=utf-8">
<meta http-equiv="Cache-Control" content="no-store, no-cache,  must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">

<style type="text/css">@import "camera.css";</style>
<style type="text/css">
html, body { margin: 0; padding: 0; }
</style>

</head><body>

<table style="width: 100%; height: 100%; border:  0;"><tbody><tr><td align="center" valign="top">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background:  black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam1" onmousedown="PTZMouseDown1(event)" width="320" height="240"  alt="Live Stream" />
</div></div>
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background:  black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam2" onmousedown="PTZMouseDown2(event)" width="320" height="240"  alt="Live Stream" />
</div></div>
</td></tr>
</tbody></table> 


<script type="text/javascript">
<!--
currentCamera1= 1;
errorimg1= 0;
document.images.webcam1.onload = DoIt1;
document.images.webcam1.onerror = ErrorImage1;
function LoadImage1()
{
        uniq1 = Math.random();
        document.images.webcam1.src = "http://192.168.0.243:6060/cam_" +  currentCamera1 + ".jpg?uniq="+uniq1;
        document.images.webcam1.onload = DoIt1;
}
function PTZMouseDown1(e)
{
        var IE = document.all?true:false;
        var x,y;
        var myx,myy;
        var myifr = document.getElementById("_iframe-ptz");
        tp = getElPos1();
        myx = tp[0];
        myy = tp[1];
        if(IE){
        var scrollX = document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft;
        var scrollY = document.documentElement.scrollTop ?  document.documentElement.scrollTop : document.body.scrollTop;
        x = event.clientX - myx + scrollX;
        y = event.clientY - myy + scrollY;
        } else {
        x = e.pageX - myx;
        y = e.pageY - myy;
        }
        if (width_array[currentCamera1] > 0) x = Math.round((x * 400)  / width_array[currentCamera1]);
        if (height_array[currentCamera1] > 0) y = Math.round((y *  300) / height_array[currentCamera1]);
        if (x > 400) x = 400;
        if (y > 300) y = 300;
        if (myifr != null) myifr.src =  "http://192.168.0.243:6060/ptz?src=" + currentCamera1 + "&moveto_x="  + x + "&moveto_y=" + y +"";
        return true;
}
function getElPos1()
{
            el = document.images.webcam1;
            x = el.offsetLeft;
            y = el.offsetTop;
            elp = el.offsetParent;
            while(elp!=null)
              { x+=elp.offsetLeft;
                y+=elp.offsetTop;
                elp=elp.offsetParent;
              }
            return new Array(x,y);
}
function ErrorImage1()
{
        errorimg1++;
        if (errorimg1>3){
              document.images.webcam1.onload = "";
              document.images.webcam1.onerror = "";
              document.images.webcam1.src = "offline.jpg";
              }else{
                uniq1 = Math.random();
            document.images.webcam1.src =  "http://192.168.0.243:6060/cam_" + currentCamera1 + ".jpg?uniq="+uniq1;
              }
}
function DoIt1()
{
        errorimg1=0;
        window.setTimeout("LoadImage1();", 40);
}

currentCamera2= 2;
errorimg2= 0;
document.images.webcam2.onload = DoIt2;
document.images.webcam2.onerror = ErrorImage2;
function LoadImage2()
{
        uniq2 = Math.random();
        document.images.webcam2.src = "http://192.168.0.243:6060/cam_" +  currentCamera2 + ".jpg?uniq="+uniq2;
        document.images.webcam2.onload = DoIt2;
}
function PTZMouseDown2(e)
{
        var IE = document.all?true:false;
        var x,y;
        var myx,myy;
        var myifr = document.getElementById("_iframe-ptz");
        tp = getElPos2();
        myx = tp[0];
        myy = tp[1];
        if(IE){
        var scrollX = document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft;
        var scrollY = document.documentElement.scrollTop ?  document.documentElement.scrollTop : document.body.scrollTop;
        x = event.clientX - myx + scrollX;
        y = event.clientY - myy + scrollY;
        } else {
        x = e.pageX - myx;
        y = e.pageY - myy;
        }
        if (width_array[currentCamera2] > 0) x = Math.round((x * 400)  / width_array[currentCamera2]);
        if (height_array[currentCamera2] > 0) y = Math.round((y *  300) / height_array[currentCamera2]);
        if (x > 400) x = 400;
        if (y > 300) y = 300;
        if (myifr != null) myifr.src =  "http://192.168.0.243:6060/ptz?src=" + currentCamera2 + "&moveto_x="  + x + "&moveto_y=" + y +"";
        return true;
}
function getElPos2()
{
            el = document.images.webcam2;
            x = el.offsetLeft;
            y = el.offsetTop;
            elp = el.offsetParent;
            while(elp!=null)
              { x+=elp.offsetLeft;
                y+=elp.offsetTop;
                elp=elp.offsetParent;
              }
            return new Array(x,y);
}
function ErrorImage2()
{
        errorimg2++;
        if (errorimg2>3){
              document.images.webcam2.onload = "";
              document.images.webcam2.onerror = "";
              document.images.webcam2.src = "offline.jpg";
              }else{
                uniq2 = Math.random();
            document.images.webcam2.src =  "http://192.168.0.243:6060/cam_" + currentCamera2 + ".jpg?uniq="+uniq2;
              }
}
function DoIt2()
{
        errorimg2=0;
        window.setTimeout("LoadImage2();", 40);
}
//-->
</script>]

Hallo Franz,

welchen Code, sehe keinen. :wink:

Aber jetzt:D

Hallo Franz,

hier der Code. Daten für die Cams anpassen und dein Button noch in der Mitte einfügen.

<!--
<!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" xml:lang="de"  lang="de">
<head>

<meta http-equiv="Content-Type" content="text/html;  charset=utf-8">
<meta http-equiv="Cache-Control" content="no-store, no-cache,  must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">

<style type="text/css">@import "camera.css";</style>
<style type="text/css">
html, body { margin: 0; padding: 0; }
</style>

</head><body>

<table style="width: 100%; height: 50%; border: 0;">
<tr>
<td align="center" valign="top">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam1" onmousedown="PTZMouseDown1(event)" width="320" height="240"  alt="Live Stream" />
</div></div></td>

<td align="center" valign="top">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam2" onmousedown="PTZMouseDown2(event)" width="320" height="240"  alt="Live Stream" />
</div></div></td>

<td align="center" valign="top">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background:  black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam1" onmousedown="PTZMouseDown1(event)" width="320" height="240"  alt="Live Stream" />
</div></div></td>
</tr>
</table> 

<table style="width: 100%; height: 50%; border: 0;">
<tr>
<td align="center" valign="bottom">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam1" onmousedown="PTZMouseDown1(event)" width="320" height="240"  alt="Live Stream" />
</div></div></td>

<td align="center" valign="bottom">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam2" onmousedown="PTZMouseDown2(event)" width="320" height="240"  alt="Live Stream" />
</div></div></td>

<td align="center" valign="bottom">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background:  black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam1" onmousedown="PTZMouseDown1(event)" width="320" height="240"  alt="Live Stream" />
</div></div></td>
</tr>
</table> 

<script type="text/javascript">

currentCamera1= 1;
errorimg1= 0;
document.images.webcam1.onload = DoIt1;
document.images.webcam1.onerror = ErrorImage1;
function LoadImage1()
{
        uniq1 = Math.random();
        document.images.webcam1.src = "http://192.168.0.243:6060/cam_" +  currentCamera1 + ".jpg?uniq="+uniq1;
        document.images.webcam1.onload = DoIt1;
}
function PTZMouseDown1(e)
{
        var IE = document.all?true:false;
        var x,y;
        var myx,myy;
        var myifr = document.getElementById("_iframe-ptz");
        tp = getElPos1();
        myx = tp[0];
        myy = tp[1];
        if(IE){
        var scrollX = document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft;
        var scrollY = document.documentElement.scrollTop ?  document.documentElement.scrollTop : document.body.scrollTop;
        x = event.clientX - myx + scrollX;
        y = event.clientY - myy + scrollY;
        } else {
        x = e.pageX - myx;
        y = e.pageY - myy;
        }
        if (width_array[currentCamera1] > 0) x = Math.round((x * 400)  / width_array[currentCamera1]);
        if (height_array[currentCamera1] > 0) y = Math.round((y *  300) / height_array[currentCamera1]);
        if (x > 400) x = 400;
        if (y > 300) y = 300;
        if (myifr != null) myifr.src =  "http://192.168.0.243:6060/ptz?src=" + currentCamera1 + "&moveto_x="  + x + "&moveto_y=" + y +"";
        return true;
}
function getElPos1()
{
            el = document.images.webcam1;
            x = el.offsetLeft;
            y = el.offsetTop;
            elp = el.offsetParent;
            while(elp!=null)
              { x+=elp.offsetLeft;
                y+=elp.offsetTop;
                elp=elp.offsetParent;
              }
            return new Array(x,y);
}
function ErrorImage1()
{
        errorimg1++;
        if (errorimg1>3){
              document.images.webcam1.onload = "";
              document.images.webcam1.onerror = "";
              document.images.webcam1.src = "offline.jpg";
              }else{
                uniq1 = Math.random();
            document.images.webcam1.src =  "http://192.168.0.243:6060/cam_" + currentCamera1 + ".jpg?uniq="+uniq1;
              }
}
function DoIt1()
{
        errorimg1=0;
        window.setTimeout("LoadImage1();", 40);
}

currentCamera2= 2;
errorimg2= 0;
document.images.webcam2.onload = DoIt2;
document.images.webcam2.onerror = ErrorImage2;
function LoadImage2()
{
        uniq2 = Math.random();
        document.images.webcam2.src = "http://192.168.0.243:6060/cam_" +  currentCamera2 + ".jpg?uniq="+uniq2;
        document.images.webcam2.onload = DoIt2;
}
function PTZMouseDown2(e)
{
        var IE = document.all?true:false;
        var x,y;
        var myx,myy;
        var myifr = document.getElementById("_iframe-ptz");
        tp = getElPos2();
        myx = tp[0];
        myy = tp[1];
        if(IE){
        var scrollX = document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft;
        var scrollY = document.documentElement.scrollTop ?  document.documentElement.scrollTop : document.body.scrollTop;
        x = event.clientX - myx + scrollX;
        y = event.clientY - myy + scrollY;
        } else {
        x = e.pageX - myx;
        y = e.pageY - myy;
        }
        if (width_array[currentCamera2] > 0) x = Math.round((x * 400)  / width_array[currentCamera2]);
        if (height_array[currentCamera2] > 0) y = Math.round((y *  300) / height_array[currentCamera2]);
        if (x > 400) x = 400;
        if (y > 300) y = 300;
        if (myifr != null) myifr.src =  "http://192.168.0.243:6060/ptz?src=" + currentCamera2 + "&moveto_x="  + x + "&moveto_y=" + y +"";
        return true;
}
function getElPos2()
{
            el = document.images.webcam2;
            x = el.offsetLeft;
            y = el.offsetTop;
            elp = el.offsetParent;
            while(elp!=null)
              { x+=elp.offsetLeft;
                y+=elp.offsetTop;
                elp=elp.offsetParent;
              }
            return new Array(x,y);
}
function ErrorImage2()
{
        errorimg2++;
        if (errorimg2>3){
              document.images.webcam2.onload = "";
              document.images.webcam2.onerror = "";
              document.images.webcam2.src = "offline.jpg";
              }else{
                uniq2 = Math.random();
            document.images.webcam2.src =  "http://192.168.0.243:6060/cam_" + currentCamera2 + ".jpg?uniq="+uniq2;
              }
}
function DoIt2()
{
        errorimg2=0;
        window.setTimeout("LoadImage2();", 40);
}

</script>

</body></html>

Super Danke für die Blitz hilfe.

aber er zeigt z.b. das 3. Bild nicht an wo ist der Fehler?

Danke

<!--
<!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" xml:lang="de"  lang="de">
<head>

<meta http-equiv="Content-Type" content="text/html;  charset=utf-8">
<meta http-equiv="Cache-Control" content="no-store, no-cache,  must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">

<style type="text/css">@import "camera.css";</style>
<style type="text/css">
html, body { margin: 0; padding: 0; }
</style>

</head><body>

<table style="width: 100%; height: 50%; border: 0;">
<tr>
<td align="center" valign="top">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam1" onmousedown="PTZMouseDown1(event)" width="320" height="240"  alt="Live Stream" />
</div></div>

<td align="center" valign="top">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam2" onmousedown="PTZMouseDown2(event)" width="320" height="240"  alt="Live Stream" />
</div></div>

<td align="center" valign="top">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background:  black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam3" onmousedown="PTZMouseDown3(event)" width="320" height="240"  alt="Live Stream" />
</div></div>
</td></td></td>
</tr>
</table> 

<table style="width: 100%; height: 50%; border: 0;">
<tr>
<td align="center" valign="bottom">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam4" onmousedown="PTZMouseDown4(event)" width="320" height="240"  alt="Live Stream" />
</div></div>

<td align="center" valign="bottom">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background: black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam5" onmousedown="PTZMouseDown5(event)" width="320" height="240"  alt="Live Stream" />
</div></div>

<td align="center" valign="bottom">
<div style="border: 10px solid #3A3D40; width: 340; height: 260;">
<div style="border: 1px solid white; padding: 10px; background:  black; width: 320; height: 240;">
<img src="http://192.168.0.243:6060/loading.jpg" class="webcam"  id="webcam6" onmousedown="PTZMouseDown6(event)" width="320" height="240"  alt="Live Stream" />
</div></div>
</td></td></td>
</tr>
</table> 



<script type="text/javascript">

currentCamera1= 1;
errorimg1= 0;
document.images.webcam1.onload = DoIt1;
document.images.webcam1.onerror = ErrorImage1;
function LoadImage1()
{
        uniq1 = Math.random();
        document.images.webcam1.src = "http://192.168.0.243:6060/cam_" +  currentCamera1 + ".jpg?uniq="+uniq1;
        document.images.webcam1.onload = DoIt1;
}
function PTZMouseDown1(e)
{
        var IE = document.all?true:false;
        var x,y;
        var myx,myy;
        var myifr = document.getElementById("_iframe-ptz");
        tp = getElPos1();
        myx = tp[0];
        myy = tp[1];
        if(IE){
        var scrollX = document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft;
        var scrollY = document.documentElement.scrollTop ?  document.documentElement.scrollTop : document.body.scrollTop;
        x = event.clientX - myx + scrollX;
        y = event.clientY - myy + scrollY;
        } else {
        x = e.pageX - myx;
        y = e.pageY - myy;
        }
        if (width_array[currentCamera1] > 0) x = Math.round((x * 400)  / width_array[currentCamera1]);
        if (height_array[currentCamera1] > 0) y = Math.round((y *  300) / height_array[currentCamera1]);
        if (x > 400) x = 400;
        if (y > 300) y = 300;
        if (myifr != null) myifr.src =  "http://192.168.0.243:6060/ptz?src=" + currentCamera1 + "&moveto_x="  + x + "&moveto_y=" + y +"";
        return true;
}
function getElPos1()
{
            el = document.images.webcam1;
            x = el.offsetLeft;
            y = el.offsetTop;
            elp = el.offsetParent;
            while(elp!=null)
              { x+=elp.offsetLeft;
                y+=elp.offsetTop;
                elp=elp.offsetParent;
              }
            return new Array(x,y);
}
function ErrorImage1()
{
        errorimg1++;
        if (errorimg1>3){
              document.images.webcam1.onload = "";
              document.images.webcam1.onerror = "";
              document.images.webcam1.src = "offline.jpg";
              }else{
                uniq1 = Math.random();
            document.images.webcam1.src =  "http://192.168.0.243:6060/cam_" + currentCamera1 + ".jpg?uniq="+uniq1;
              }
}
function DoIt1()
{
        errorimg1=0;
        window.setTimeout("LoadImage1();", 40);
}

currentCamera2= 2;
errorimg2= 0;
document.images.webcam2.onload = DoIt2;
document.images.webcam2.onerror = ErrorImage2;
function LoadImage2()
{
        uniq2 = Math.random();
        document.images.webcam2.src = "http://192.168.0.243:6060/cam_" +  currentCamera2 + ".jpg?uniq="+uniq2;
        document.images.webcam2.onload = DoIt2;
}
function PTZMouseDown2(e)
{
        var IE = document.all?true:false;
        var x,y;
        var myx,myy;
        var myifr = document.getElementById("_iframe-ptz");
        tp = getElPos2();
        myx = tp[0];
        myy = tp[1];
        if(IE){
        var scrollX = document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft;
        var scrollY = document.documentElement.scrollTop ?  document.documentElement.scrollTop : document.body.scrollTop;
        x = event.clientX - myx + scrollX;
        y = event.clientY - myy + scrollY;
        } else {
        x = e.pageX - myx;
        y = e.pageY - myy;
        }
        if (width_array[currentCamera2] > 0) x = Math.round((x * 400)  / width_array[currentCamera2]);
        if (height_array[currentCamera2] > 0) y = Math.round((y *  300) / height_array[currentCamera2]);
        if (x > 400) x = 400;
        if (y > 300) y = 300;
        if (myifr != null) myifr.src =  "http://192.168.0.243:6060/ptz?src=" + currentCamera2 + "&moveto_x="  + x + "&moveto_y=" + y +"";
        return true;
}
function getElPos2()
{
            el = document.images.webcam2;
            x = el.offsetLeft;
            y = el.offsetTop;
            elp = el.offsetParent;
            while(elp!=null)
              { x+=elp.offsetLeft;
                y+=elp.offsetTop;
                elp=elp.offsetParent;
              }
            return new Array(x,y);
}
function ErrorImage2()
{
        errorimg2++;
        if (errorimg2>3){
              document.images.webcam2.onload = "";
              document.images.webcam2.onerror = "";
              document.images.webcam2.src = "offline.jpg";
              }else{
                uniq2 = Math.random();
            document.images.webcam2.src =  "http://192.168.0.243:6060/cam_" + currentCamera2 + ".jpg?uniq="+uniq2;
              }
}
function DoIt2()

{
        errorimg2=0;
        window.setTimeout("LoadImage2();", 40);
}

currentCamera3= 3;
errorimg1= 0;
document.images.webcam3.onload = DoIt3;
document.images.webcam3.onerror = ErrorImage3;
function LoadImage3()
{
        uniq1 = Math.random();
        document.images.webcam3.src = "http://192.168.0.243:6060/cam_" +  currentCamera3 + ".jpg?uniq="+uniq3;
        document.images.webcam3.onload = DoIt3;
}
function PTZMouseDown1(e)
{
        var IE = document.all?true:false;
        var x,y;
        var myx,myy;
        var myifr = document.getElementById("_iframe-ptz");
        tp = getElPos3();
        myx = tp[0];
        myy = tp[1];
        if(IE){
        var scrollX = document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft;
        var scrollY = document.documentElement.scrollTop ?  document.documentElement.scrollTop : document.body.scrollTop;
        x = event.clientX - myx + scrollX;
        y = event.clientY - myy + scrollY;
        } else {
        x = e.pageX - myx;
        y = e.pageY - myy;
        }
        if (width_array[currentCamera3] > 0) x = Math.round((x * 400)  / width_array[currentCamera3]);
        if (height_array[currentCamera3] > 0) y = Math.round((y *  300) / height_array[currentCamera3]);
        if (x > 400) x = 400;
        if (y > 300) y = 300;
        if (myifr != null) myifr.src =  "http://192.168.0.243:6060/ptz?src=" + currentCamera3 + "&moveto_x="  + x + "&moveto_y=" + y +"";
        return true;
}
function getElPos3()
{
            el = document.images.webcam3;
            x = el.offsetLeft;
            y = el.offsetTop;
            elp = el.offsetParent;
            while(elp!=null)
              { x+=elp.offsetLeft;
                y+=elp.offsetTop;
                elp=elp.offsetParent;
              }
            return new Array(x,y);
}
function ErrorImage3()
{
        errorimg1++;
        if (errorimg3>3){
              document.images.webcam3.onload = "";
              document.images.webcam3.onerror = "";
              document.images.webcam3.src = "offline.jpg";
              }else{
                uniq3 = Math.random();
            document.images.webcam3.src =  "http://192.168.0.243:6060/cam_" + currentCamera3 + ".jpg?uniq="+uniq3;
              }
}
function DoIt3()
{
        errorimg3=0;
        window.setTimeout("LoadImage3();", 40);
}



</script>

</body></html> 

Was siehst Du denn mach doch mal einen Shot. Ist die Cam im Programm vorhanden. Seite mal neu laden…

HI

Seite neu geladen, Cam vorhanden und streamt auch über den Webserver, aber es kommt kein bild im Webfront.

Bild!!!

Rechner zu schwach…Setz mal die

window.setTimeout("LoadImage1();", 40); 

höher.

Ich habe Sie höher gesetzt aber ohne Erfolg.
http://www.pic-upload.de/view-4104919/bild.jpg.html

Hallo Rainer,

hast Du mit go1984 was raus bekommen?