Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8669797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:33:46+00:00 2026-06-12T18:33:46+00:00

I have 2 IP Cameras that have a internal server page (i.e. http:\192.168.1.10\video.html). This

  • 0

I have 2 IP Cameras that have a internal server page (i.e. http:\192.168.1.10\video.html). This page receives jpeg images from the camera and auto-refreshes (loads) using javascript.

Source code from the video.html

<html>
<head>
    <title>ipCam - JPEG Video</title>
    <style type='text/css'>
        html,body
        {
            background-color:white;
            color:black;
            font-family:arial;
            font-size:12pt;
        }
        a,a:visited,a:active
        {
            color:grey;
            text-decoration:none;
        }
        a:hover
        {
            text-decoration: underline;
        }
        h1
        {
            background-color:black;
            color:white;
            padding:5px;
        }
        h2
        {
            background-color:lightgrey;
            padding:5px;
        }
    </style>
    <script type='text/javascript'>
        function loadImage()
        {
            var now=new Date();
            document.getElementById('the_img').src='image.jpg?'+now.getTime();
        }
    </script>
</head>
<body>
    <img id='the_img' src='image.jpg' onload='loadImage()' onerror='loadImage()'>
    <br><br>
    <a href='.'>Home</a>



</body>

What I would like to do is build a custom site that has both live feeds in it. I would prefer not to use <iframe>. I would rather use Javascript or something of the sort.

I have a basic understanding of HTML but very little Javascript experience. I can obviously look at the code a get a good idea of what is going on, but this has stumped me!

Any help would be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:33:48+00:00Added an answer on June 12, 2026 at 6:33 pm

    I would guess that you could create a new HTML page (just copy the video.html from one of the cameras) on a local webserver and modify the script to include the ID of the img element you are updating and the IP address of the camera you are grabbing the feed from…something like this (which is set to automatically update the images every 4 seconds) — (disclaimer: air code, not tested)

    Thanks @A.M.K. for fixing some stupid mistakes in my code:

    <script type='text/javascript'>         
        function loadImage(imgID, address)         
        {             
            var now=new Date();
            document.getElementById(imgID).src='http://' + address + '/image.jpg?'+now.getTime();
        }          
    
        setInterval(function() {
            loadImage("the_img_1", "192.168.0.1");
            loadImage("the_img_2", "192.168.0.2");
        }, 4000); //Interval to refresh at, in milliseconds
    </script>
    

    Then just setup another img tag to receive the image:

    <body>
        <img id='the_img_1' src='http://192.168.0.1/image.jpg'>     
        <br><br>     
        <img id='the_img_2' src='http://192.168.0.2/image.jpg'>
    
        <a href='.'>Home</a>    
    </body>
    

    Note that you have two img elements now, each with a unique id which is fed to the function along with the IP address of the camera.

    That may not work exactly in your situation, but that should give you an idea of how to accomplish it…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that looks like this: <form name=armdisarmform action=/cameras method=POST> <input type='hidden'
I have a couple of Panasonic cameras that I use for shooting video, and
I have a custom library that can pick mulitple images from the camera roll,
I have CameraList class that provides Cameras list like SONY,VIVOTEK,VIVOTEK 7XXX,PIXORD,TOSHIBA,JVC E-CON... And I
I have an application that controls cameras. Currently I am adding support for HD
I have a table that prints out all available cameras. It uses a form
I am working on a system that will analyze video frames from multiple cameras.
I have a piece of code that sets some network IP cameras parameters by
I have stereo cameras systems. In my program I catch the images from each
I have a html table that is generated by looping through DB entries. On

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.