locked
Live video IIS Asp based http upload server*Help needed*‏ RRS feed

  • Question

  • User293583905 posted

    Hi there I have 5 axis video encoder servers as well as one axis 207. I did a search of the axis troubleshooting q&a and found this link which solved my problems or so I thought.

    http://www.axis.com/techsup/cam_servers/tech_notes/live_video_iis_httpupload.htm

    In my event configuration I send all of the live views to this script but it only shows one quad size cam view. Then if I add multiple cams to the same script the cam views then are constantly rotating fast. Its quite annoying. All I really wanted to do was have a page where I could put the quad view of every camera on the page. I don't understand the scripting language or even how to do something as simple as add a few more cams, which is sad.


    I've tried to add other folders with other names but it still doesn't work and just does the same thing it always does which is rotate quickly.  I would be ever so grateful if someone could point me in the right direction or assist me in this endeavor.  There would be a donation to a paypal account as well upon success.

    Right now as this asp script is designed it only lets you see one camera view on the whole page and I would like to see every camera view on the page, instead of just the one.  So my question is how would I make it so that it would show more than one camera view being directed at it?  Each video server is sending video to the http_upload.asp so now all that happens is you see constant images coming in like as if you set the images of all of the cameras to rotate like a slide show very very quickly.  I've tried to make separate folders and copy these files into them and just rename them and send each video server to its own unique one, but that also failed, it just keeps doing what its doing now for some reason.  So now I am here looking for help or a point in the right direction, as I said befor ei would be more than happy to donate some funds to someones paypal account for helping me, thank you very much.  I'm thinking I might have to change the view.htm file in some way to say it show should allow some more views of other cameras on the same page, but what would that look like?

    Ok well here is what each file from the link says:

    Filesize.asp:




    <html>
    <body>

        

    <%  dim a
       ' a = 0
        a = Application("CurrentImage")
    %>

    <%= a %>

    </body>
    </html>



    The next is Global.asa:

    <SCRIPT LANGUAGE=VBScript RUNAT=Server>
    Option Explicit

     Dim imageSize
     Dim  theImage

    imageSize = 0
    theImage = ""

    Sub Application_OnStart()
       Application("imageSize") = imageSize
       Application("theImage") = theImage

    End Sub   

    </SCRIPT>


    And the Next is http_upload.asp

    <%


    biData = Request.BinaryRead(Request.TotalBytes)

    if len(bidata) > 0 then
       
      Application("imageSize") = LenB(biData)    
      Application("theImage") = biData    
            
    end if

    %>
    <html>
    <body>
    File uploaded successfully!
    </body>
    </html>



    and the next is readimage.asp

    <%
    Response.Buffer  = True
    Response.Clear
    Response.Expires = 0

    Response.AddHeader"Cache-Control","no-cache"
    Response.AddHeader"Pragma","no-cache"

    Response.contenttype = "image/jpeg"

    Dim b
    b =   Application("theImage")
    Response.binarywrite b
    Response.End

    %>



    and the next is view.htm:

    <HTML>
    <HEAD>
    <TITLE>Demo of java refresh</TITLE>
    </HEAD>

    <CENTER>


    <SCRIPT LANGUAGE="JavaScript">

    var ImageReloaded = 0;

    var BaseURL = "/";
    // This is the path to the image generating asp file.
    var File = "live/readImage.asp";

    // Force an immediate image load
    var theTimer = setTimeout('reloadImage()', 1);

    // This function will stop unneeded reloads if client has slow bandwidth
    function ImageLoaded()
    {
      ImageReloaded = 1;
    }


    function reloadImage()
    {
      // Reload the image every one second (1000 ms)
      theTimer = setTimeout('reloadImage()', 1000);

      // Here we load the image
      if (ImageReloaded=1)
       {   
         theDate = new Date();
         var url = BaseURL;
         url += File;
         url += '?dummy=' + theDate.getTime().toString(10);
         // The dummy above enforces a bypass of the browser image cache

         document.theImage.src = url;
         ImageReloaded = 0;
       }   
    }

    document.write('<img name="theImage" onload="ImageLoaded()" src="" height="480" ');
    document.write('width="640" alt="Live image">');
    </SCRIPT>


    </CENTER>


    </HTML>


     

    Sunday, July 26, 2009 10:33 PM

All replies

  • User-1853252149 posted

    How do you expect to display four separate views on a page with no tables and no way of separating or aligning the views?  How do you expect to separate the views when you only have a single data stream?

    Jeff

    Monday, July 27, 2009 11:26 AM
  • User293583905 posted

     Hey Jeff that is exactly what I'm looking for as I have no idea how to do scripts or asp.  I don't have alot of time to dedicate to such a thing.  How can I create separate views?  I'm thinking I would probably have to make a virtual folder with separate files for each data stream?  Then just bring them together somehow on another page?  I really don't understand the language of this code very well at all so bear with me, I am a quick learner and do appreciate the time that you have taken already.  Can you send all of the data streams to the same http_upload.asp and then separate them into different views on the view.htm page?  Also would you have to add a line of code for each view within each of the files so that the view.htm knows what to do with each stream?

    Monday, July 27, 2009 8:08 PM
  • User-823196590 posted

    I don't have alot of time to dedicate to such a thing.

    Not to be snotty, but unfortunately neither do we.   : )

    I don't think anyone here knows any of the intimate details on how your video system works so it's very difficult for us to answer your questions.  You would probably be best served by investing some time in learning ASP and then coming back with some very specific questions.

    Tuesday, July 28, 2009 10:54 AM
  • User293583905 posted

    Here is some more specific information.

    The Axis network camera has built-in functionality that enables it to upload images automatically to the "buffer server".

    Configure the Axis network camera to deliver images sequentially to an HTTP (Web). This is done using the Event Configuration in the product's web interface.

    The Web server runs a script that receive images and will, from these images, generate an image stream to all users who access the Web page.


    1. Create a virtual directory, for example named 'live' on your IIS server pointing to a folder, for example c:\inetpub\wwwroot\live on the server's hard disk.

    2. Download and unpack the necessary files IISupdate.zip (includes Global.asa, filesize.asp, http_upload.asp, readImage.asp, view.htm) in the above folder.

    3. Configure an Axis network video product to perform HTTP upload of images to the http_upload.asp file i.e. in this case the necessary URL in the Event Server configuration would be:

      http://[Web_server]/live/http_upload.asp

      In the Event Type configuration configure HTTP upload to the above server with the desired image frequency (for example 1 frame per second). Use Overwrite option.

    4. View a still image through the readImage.asp script, for example:

      http://[Web_server]/live/readImage.asp

    5. View JavaScript updated video from the view.htm file, for example:

      http://[Web_server]/live/view.htm

      The implementation is done in the following way:

      In the Global.asa file a global variable is defined that will contain the entire image file.

      The http_upload script will insert the image file into this global variable and update it when a new image is sent from the camera. The readImage will simply get the global variable and send it to the user.


     Would the view.htm file be the only one that I would have to modify to split up the view of the cameras to be able o show them separately? I'm just going to create multiple virtual folders, one for each camera and rename everything numerically eg. view1.htm, view2.htm etc. and then merge each video on one page and call it a day. Hopefully it will work.

    Friday, July 31, 2009 7:56 AM
  • User-823196590 posted

    I think a quick and dirty solution would be to create a "live" folder for each camera ... live1, live2, etc.  Your main problem seems to be each camera uploading to the same folder - the all of the images are just jumbled together and the you see the 'quick rotation" symptom you describe in your first post.

    After you have each "live" folder and camera configured, create a new HTML page using frames or iframes, with each frame source pointing to http://[Web_server]/live[n]/view.htm where [n] is the view folder/camera number.

    Friday, July 31, 2009 10:14 AM
  • User1753300240 posted

    Hi

    Maybe you can help me please. I'm doing the same thing using IIS but my problem is when i'm configuring the Camera, in URL:// i use : pruebacamaras.gotdns.com/live/http_upload.asp, but in user name and password what shoul i put? i don´t know if i have to create a especial user or something like that. Maybe you can help me in telling me if i should use a default user or maybe how can i create a user? or in witch way do i have to configure the IIS so de camera can connect to it, since the message that appears is "Conecction timed out".

    Thank you

     Pd: The web server functions OK, since i acces de web page using Internet Explorer and it shows the files.

    Sunday, August 9, 2009 5:25 PM
  • User-823196590 posted

    Have you gone through http://www.axis.com/techsup/ first?  You're asking for help on how to configure their software and I would think their support system would be able to help you ...

    Monday, August 10, 2009 10:31 AM
  • User1753300240 posted

    Hi

    I managed to make the conecction with de camera and the server and there is no problem, the problem comes when i'm going through the third step were i have to access httt://[web page]/live/readImage.asp.  and observe a still image but it dosen´t show. And when i enter httt://[web page]/live/view.htm it doesen´t appear any images aldo in the bottom of the Explorer windows it does appear "downloading image...". I think it's the IIS because maybe it blocking the script to be runned. I don´t know. The files that are runned are the same that are published in the above section.

    I'm contacting the axis tech support but they are very slow and this is a problem that i need to resolve in a short period. Please help me. Thank you

     

    Monday, August 10, 2009 11:54 AM
  • User293583905 posted

     It isn't so, you would think they would help with something but they don't which is why they pass you on to a bunch of other software and companies.  This is why we post here. 

    Monday, August 10, 2009 11:55 PM
  • User293583905 posted

    but in user name and password what shoul i put?

     Put in the computer or server's user name and password in the event configuration section when it asks for a password.  Then click the test button to test to see if the upload worked.  Make sure you have set the proper rights set so that the video servers can send images to be written.  I'm not sure what operating system you are using and what type of setup you have.  Just make a new user I suppose and try that and set the rights to allow them to write. 

     You will only get one video feed in there at one time.

    That link I posted from axis tells you everything.

     

    Tuesday, August 11, 2009 12:02 AM
  • User1753300240 posted

    Hi

    I already checked the page and fallowed every step but, when i have tu see the still image that is in http://[web page]/live/readImage.asp, it dosen't do anything, it just pup up a dowload link so i can download the file. When i enter http://[web page]/live/view.htm it dosent appear any image.

     I checked the connection from the camera to the server and says "Connection succesfull", i can see in the lower part of the explorer window "Downloading image.....", and it does it like every second.

    I don´t know is if the IIS is not configured to execute scripts or something like that, i'm very new in this.

    Tuesday, August 11, 2009 12:52 AM
  • User-823196590 posted

    I think a quick and dirty solution would be ...

    Dolomite, did this work for you?  I never heard back ...

    Tuesday, August 11, 2009 11:45 AM
  • User1753300240 posted

    Mi operating system is windows Vista

    Tuesday, August 11, 2009 12:18 PM
  • User293583905 posted

     Hey there I haven't had a chance to implement it yet, as windows vista home premium is an extremely crippled platform for IIS and does not let you change the local security policy among other things.  Until I set up another proper windows server or linux with mono, which i hope to do this week, I will get back to this thread and post an answer with what my results are.  Hopefully I can get things rolling.  Thanks for all contributions to this thread.

    Tuesday, August 11, 2009 2:25 PM