Page 1 of 1

Retrieve current JPEG from camera that is recording

Posted: Sun Feb 17, 2013 9:05 am
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.

Re: Retrieve current JPEG from camera that is recording

Posted: Thu Feb 21, 2013 11:36 am
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>