nariakiiwatani / ofxNDI

NewTek NDI SDK Wrapper for openFrameworks.
https://ndi.tv/
MIT License
103 stars 19 forks source link

Lags with "Pixels" example #20

Closed RomainAl closed 4 years ago

RomainAl commented 4 years ago

Hi ! Thanks for this addon !

When I'm trying your "example-sender", it's perfect and no lagging stream for the way : video_.send(camera_.getPixels()); With camera.getPixels().size() = 8294400 But this way lag a lot : ofPixels pixels; ofGetGLRenderer()->saveFullViewport(pixels); `video.send(pixels);` while pixels.size() = 3145728

Is that normal ? Is there any optimization to do in code for streaming the principal canvas without lagging ? Thx

nariakiiwatani commented 4 years ago

Hi! thank you for trying this addon!

I don't know this is it but I found that saveFullViewport stores the pixel data in BGRA format. I'm not sure if it matters or not, it at least is worth to check.

So you can try...

or

RomainAl commented 4 years ago

It seems to be ok right now with your first solution ! Thx and very happy to use your add-on !!!!!!!!!!

nariakiiwatani commented 4 years ago

nice :)

Closing