aye randall!

i fear NDI is not your weapon of choice for these kind things.
as you already assumed, NDI is applying some agressive, proprietary compression on the image to achieve a low bandwith (i.e. several fullHD streams over gigabit ethernet are possible). it is highly optimized for the CPUs vector extensions (SSE etc.) to for low latency video streaming. i’m not sure if you have a lot of choice regarding the transmitted video formats but i’m pretty sure it preferres “visual quality” over “technical correctness” and assumes plain broadcast video images…

anyways, i would have to look into this deeper to be sure (an update to NDI 3.8 is nescessary anyways - when there is time for that i will have a look).

if you want to share on the same machine, shared GPU textures are the way to go. they have no delay, no copy and no compression. or do you need CPU pixel data?

I think he be needin to share data between multiple gpus ;)

I’ve used Spout to do this, PNG compression, encoding the 16bits of 1 channel into 2 8bit channels in a shader and sending that via spout, all the other formats are too lossy to work, not sure if it would cope with HD or not, mine were depth textures from a kinect. ( @ravazquez )

The ndi thread gets a bit derailed but couldn’t you do something like PixelData (DX11.Texture 2d) -> Writer (Raw SharedMemory) -> Reader (Raw SharedMemory) -> AsTexture (DX11.Texture 2d Raw).

It works in principle (see patch) but the combination PixelData / AsTexture is borked, something wrong with calculation of the stride it seems.

SharedMemTex.v4p (19.1 KB)

@catweasel - that wont work between gpus though right?

@bjoern - that’s mega heavy - coming back to the cpu

Well I know. But it’s the same for NDI, isn’t it?

@mrboni you can run spout locally, so yes, but I guess you can’t share texture between them, never tried tbh. I’d guess that if NDI needs a texture through VL via CPU, using spout would be less taxing, as it gets the shared texture in another thread, and then shares that via shared memory on the receiver. But tbh you’d have to test it, to be sure, and let us now ;)