Display video stream from IP camera in component?

In Firefly there is a component that can display a video stream from my computer’s built-in web cam:

Is there a component that takes as input a URL and shows the output of an IP camera?

Note that, for now, I don’t want to process the data. I only want to show it. The URL as input parameter is important, as I want to have the option to programmatically change the camera from within Grasshopper.

If there is no such component: Is there a component that can show a web page? (aka webview)

Then I could simply set up a page that shows the stream.

Firefly might be worth a test, it has an image recog module, not sure about video though…

Thanks for the suggestion, but did you even read my question?

Hi Feklee, yes i did :slight_smile:

Sorry i dont have all the answers - im still learning GH…

from what i searched, out of curiosity, looks like you will need a custom script in GH (ph, c#, vb) + a custom component to display in the GH UI. I didn’t see any networking ops in the sdk or if you can use ph’s urllib library to get the url you want (but should be possible IMOHO).


etc. Just google to look for streaming from webcam and implement a custom form in your GH component.

1 Like

Creating a custom component is what I wanted to avoid, but I’ll try if I have to. At least I have a little bit practise with that now. Most of the components in my screenshot I created in the past week.

Thanks for the link. As I mentioned in my original post, a web view could be a good alternative. At least with Chrome, the stream from these IP cameras plays straight away. Of course that doesn’t mean that it works with the standard .NET web view.

Here I would like to have a link to a step by step guide. How does one create a custom form?

Or is there an example of a component with a custom UI?

That would be very helpful! I’ve never worked with Windows Forms before. C# is new to me as well, although it was relatively easy to get going because I know C++ and a few other languages.

here comes in the other alphabet product, google: Windows.forms - Grasshopper
Rhino - Extending the GUI

the only real trouble with developing in rhino common/grasshopper is the api and finding all the infos you need, but in the end it is not that complicated. Also, keep the forum tab open and use the search function.

Did you try something like an IP Cam to webcam driver:

I haven’t tried it, but that seems like a much easier solution.

Found that earlier, but it’s from 2011. Wonder if it’s still up to date. A working example would be very useful.

Is there any sample code? Or is the source code of Firefly available?

How would that fulfill the requirements from my original post? (URL as input)

You said it is able to display a “normal” webcam, right. If you can use a driver to make an IP Cam appear to your computer as such a normal webcam, than that would solve your problem, right? I presume the IP Address would go in the driver.

Or do you mean you will have a dynamic IP/URL that you need to enter from GH? edit: my bad, just saw that part in your original post.

Just curious what you are trying to do eventually. I feel GH is not the right tool for that. With something like vvvv it would be fairly easy to do. Communicating between GH and vvvv is pretty easy. Definitely easier than trying to code something from scratch in C# I would imagine.

I assume it’s not too hard to write such a component, but I’d like to have an example.

See my question: Code example for component with custom UI?