Retrieve current JPEG from camera that is recording

Forum for questions and support relating to the 1.25.x releases only.
Locked
jasonsjunk
Posts: 4
Joined: Mon Sep 05, 2011 8:49 pm

Retrieve current JPEG from camera that is recording

Post by jasonsjunk »

Has anyone figured out how to retrieve and/or upload a current jpeg from a camera that is constantly recording.
I want to place an image on a webpage that updates every 30 seconds or so. I haven't been able to figure out how to write a script that will give me the most recent jpeg image that was captured by the camera.
antonio
Posts: 6
Joined: Thu Nov 29, 2012 10:49 am

Re: Retrieve current JPEG from camera that is recording

Post by antonio »

In html5 supposing that you have an http stream you could do something like that

<canvas id="myCanvas" width="578" height="400"></canvas>
<script>
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
var imageObj = new Image();

imageObj.onload = function() {
context.drawImage(imageObj, 69, 50);
};
imageObj.src = 'http://192.168.1.60:8080/video.mpg';
</script>
Locked