Data from webcam into web DAT

Is it possible to take live webcam data from HTML and run a TD script on it? eventually showing a live outcome on the website.

I tried to use a ‘web’ DAT, and then ‘select’ DAT to select from the HTML code. With the thought to connect it to a ‘videoin’ TOP, but didn’t succeed.
any ideas? I’m new to TD and not sure if it’s possible to do that at all.

Cheers!

its not super simple. Which website are you pulling the data from? You might have luck using the VideoStreamInTOP and pointing directly at the webcam.
Or you could use a WebRenderTOP to just display the data.

If you get the binary data of the image you can also use python to save it out as a PNG and load it back in.

1 Like

welcome to the forum.
If you have an IP webcam, it probably has a direct address on which you can access its stream, that URL could be something in this form rtsp://username:password@IP Camera address:port/stream1
(See your camera’s manual for that). In that case use a Video Stream In TOP, and enter this URL into its parameters.

Otherwise as alphamoonbase said use a Webrender TOP and crop the part you want to use with a Crop TOP

1 Like