I’m trying to get the camera feed in c++ and send it using UDP library.
how can I get the camera feed in c++? as far as I know I need to create a new uscenecapturecomponent2d how can I do it?
I’m beginner in c++ UE4 programming so any help will be appreciated
While it would be technically possible to stream a video feed in UDP using C++ and a scene capture component, it’s worth noting that implementing what amounts to video streaming yourself would be quite complicated. The compression alone would be a pain to make, and certainly not something a beginner in C++ should attempt.
(NOTE: I’m assuming a decently-sized image and a decent framerate. For still pictures you might be able to do it without any compression or complex algorithm)
If you’re really inclined to send a video feed through UDP, you might have some luck looking at the “Pixel Streaming” official documentation and starting from there.
Still, before investing time in this endeavour, are you absolutely certain that you need this? For instance, it would be easier to replicate every actor on the target client and use a render target locally instead.
i’m not sure if OP means the unreal camera or a physical camera…
Hi Altrue and eblade, thanks for reply
you have right it’s not gonna be easy, what I really need is to get the camera feed and send it using UDP, actually I don"t need a high resolution stream
I need to know how can I get the matrix of the stream in C++, after that I will find a way to send it.
the second way seems to be easier, but I must do it with c++ way
i just see “Pixel streaming” it’s only for UE4.21 i use 4.18
if some one can give tutorial on how to get the camera feed in C++ it will be great, like getting image of camera evry tick