Displaying Live Camera (Windows)


I have a need to display video feed into an inspection application I am developing for Windows. Not sure how to start and would like some input. I’m okay with third-party plugins if they are available.

Ideally, I would like to have a control on my window that displays live video. Alternatively, having the ability to control a still camera to take a picture of the item then view it quickly would probably also work.

Does anyone have any experience with this?

Thanks very much.

I did it in the past for a Brazilian TELCO to monitor some popular beaches in Bahia, Brazil, so their users could see those beaches in their phones using an app. However, I did not use Xojo for that. And it was not something exactly trivial. What I can tell you is that we used small laptops in a hardened closure and USB webcams I managed to capture frames, package those frames as jpeg to compress, and send to the broadcasting system far away using a 3G modem, the cell phones received that “video” (stream of jpegs at a 6 fps) from the central using their 3G networks. Using Xojo I guess you will need help of MBS plugins to mimic something like this, and as you will be using a fast network, or direct access to the camera, speed and quality will not be a problem (PNG?). The movie is just a sequence of pictures and you can freeze any of those and even store. I guess Christian could help you.

I recently used VLC for this purpose. Andrew Lambert’s libvlc wrapper worked great: https://github.com/charonn0/RB-libvlc
Using libvlc lets you configure a range of options and leverage many of the features of VLC, in particular receiving video streams in a variety of formats; as long as your video source can produce one of them, you can easily display it in an Xojo app.


I guess we can’t control a camera with libvlc, only to connect to a video stream, not?

Probably not – that’s not really a VLC thing. Understood the use case to be

If you needed to control the camera, that’s going to be dependent on the camera in question and how you’re connected to it.

1 Like

Did you try the DirectShow classes in MBS Win Plugin?

PS: We also have VLC classes in MBS VLC Plugin.

Yep, maybe enough if he have some kind of always on camera broadcasting, in my fast initial reading I had a wrong impression the he needed to control a camera to capture content for inspection, but it was more like an alternative.

Thanks for all the input guys. It does not look like it is going to be too easy, but I’ll research your suggestions.

Thanks again.

MBS DirectShow should get you there super quick. You could also try declares, but that is a bit more work and I don’t think I ever got around some quirks of the declares.

1 Like

A networked cam

It’s API:


1 Like

Does the WFS still exist?

Fairly sure that’s what I used. It was trivial as I recall.

Its on Github

some of it has been ported to be 32 & 64 bit

If you have a local device installed with win32 compatible drivers, you can use VFW win32 API: https://docs.microsoft.com/en-us/windows/win32/multimedia/video-capture