Public webcam capture

Hi there
Any pointers regarding how to capture time lapse images of a public webcam found on the web like this example;
Example link

Hey, sorry. I’m a little confused with the question…

Do you want to take periodic screenshots of the website which has a streaming webcam, or do you want to capture time-lapse images from a webcam you can access over the internet directly via IP?

Both ought to be possible, but the approaches would be substantially different…

Sorry for not being clear enough about my motivations and goals. Let me try again. I would like to “borrow” images that are generated by an online webcam ( a cam which is publicly accessed via web site). I would like to save locally these images (in real time) to be used later as processed images. I don’t need (or want) to see these jpegs in real time (that’s way a simple application of screen recording won’t do), I just need a local folder on my hard drive that is constantly filled with jpegs of the webcam stream.
Does that make any sense?

And just to make clear, this is not my webcam, I do not have access to it. It’s a remote cam, somewhere out there in cyberspace.

Got it. Do you need only the image, or can you get by with a “screenshot” of the entire page?
Would the page layout change on a regular basis?

Just off the top of my head (disclaimer: I’m a newbie), maybe you could use:
a) https://processing.org/examples/embeddedlinks.html to access the web page
b) Print the page to PDF, or take a screenshot of it https://forum.processing.org/two/discussion/8025/take-a-screen-shot-of-the-screen

If the webpage does not change on a regular basis except for the webcam stream, you could automatically crop / mask the images before saving them. For reference,
c) https://processing.org/reference/saveFrame_.html

I am sure there are better, more efficient approaches, but maybe this could be a starting point? :neutral_face:

Thank you Maya for your advice, I am a complete beginner, I will sure look into your references soon. Yet, I was hoping there is some sort of a work-around to get the stream information directly (saving it locally as jpegs) without the need to actually watch it (it doesn’t give me any benefit to see the information I capture in real time). Somehow to skip the presentation of the info via a web page. The processes is a bit like “digging” for online visual information.

So, assuming the hare-brained strategy I proposed works, it should just run in the background;

Opening the link, taking a “snapshot”, cropping it (if that’s possible) and saving it should all be scripted, without you or anyone having to look at the image…

But I’ve never built something like this, particularly in Processing, and like you, I’m new to this too. So… take it FWIW I guess… :slight_smile:

If earthcam had a public IP cam, you could connect to it directly – but maybe they don’t.

If they were periodically publishing images to the page, you could download them – but it seems like you want frames much faster than their sample rate.

If they were using a simple streaming video form, you could stream the video and grab frames.

But it seems like they embed a custom viewer application, complete with ads, into the page.

 <div class="playerArea">

You could analyze this to see what is exposed to the browser – if the browser can get it, then you can too (in theory). There is already a Kodi plugin for earthcam – you could also see if that would give you a platform to record video, then have your processing app consume the video or extract frames from the video, especially if realtime isn’t that important to you.

https://kodi.wiki/view/Add-on:EarthCam

1 Like