02-08-2024 08:15 AM - edited 02-08-2024 08:17 AM
Hello everyone, I'm new to the G Web Development software and I'm struggling with a certain project.
So I'm trying to acquire a live camera feed from a webcam and i'm trying to do this on the G Web software, is this feasible or are there modules to do this in G Web like the IMAQ modules on LabView . I couldn't find anything relevant and don't think i can use system link on LabView as it seems to be not for these kinds of tasks due to a ~2Hz approx frequency which is unusable for a live video feed ( correct me if I am wrong ).
Thanks for your help.
02-10-2024 07:42 PM - edited 02-10-2024 07:45 PM
As you have described, G Web Development Software does not have explicit support for web cam streaming. These are some of the things I have done for different projects:
Send images over SystemLink Tags
The pattern there is to capture the images, convert them to the Data URL string format that can be displayed in the URL Image control on a WebVI, and write it to a SystemLink Tag. The forum Displaying LV Current Gen FP in NXG WebVI discusses that approach and uses capturing images of the LabVIEW Front Panel as an example but it is a similar concept.
Some Pros:
Some Cons:
Send images over WebSockets
The workflow in LabVIEW would look like:
The workflow in G Web Development would look like:
Some Pros:
Some Cons:
Use camera hardware / software designed for browser integration
Some webcams have built-in servers that can give you a URL that can be used with the URL Image control. For example in the Embed Content into a WebVI example the URL Image control is given a URL to an mjpeg video stream from a webcam.
There is probably web cam software that can create servers for video formats compatible with the browser native HTML <video> tag. While G Web does not have support for the HTML 5 <video> tag out of the box one could use the JavaScript Library Interface and the Placeholder HTML Container control to use one as described in the topic Creating UI Elements with JavaScript.
02-12-2024 02:36 AM
Thank you, I will try them and see if they work well for my kind of application.
02-12-2024 03:53 AM
How about using real time streaming protocol (rtsp)?
I have gweb application that should be extended to also display cctv.
If anyone in this forum has implemented this before, please kindly share how to perform this in gweb.
02-12-2024 04:32 AM
Thank you,
I haven't used an rtsp before or a related application but I will look into it and hopefully I will come up with a possible solution.
If anyone has a know-how or related program please inform me.
02-12-2024 10:47 AM
I don't have much RTSP video streaming experience so it will be interesting to see what y'all find.
I do know that web browsers cannot access the RTSP protocol directly, so you likely need some additional server software in the middle.