Streaming over a local network


#1

Hey all. I’m trying to stream video over a local switch. I’ve been using Cinder’s ASIO with tcp, and basically doing what @eight_io is doing with this block https://github.com/eighteight/Cinder-VideoStream. It’s basically dumping a Surface into a Queue, and sending it off in a thread. Even with a 640x480 8 bit Surface, I’m getting a lot of tearing. The fidelity is important, so I’m trying not to compress it in a lossy way, but I’d also love it to be as close to real-time as possible.

Has anyone has success with such a setup, or any advice to get the most out of asio?

Thanks!
charlie


#2

What is the speed of your network? For uncompressed stream at 30 fps 640x480x8x30fps = 73728000 bps ~ 73 mbps. Did you try to compress it (as in my block), to see if at lower data rates the tearing goes down (that would suggest that the network speed may be a factor)?

Another alternative is an NDI protocol https://www.newtek.com/ndi/ , which provides an SDK, but I don’t know of any cinder blocks for NDI.

–8


#3

I’ve got a gigabit switch. I tried compressing with your block, and while it works fine on osx, for whatever reason it gets scrambled on windows. It must not be sending through the same number of bytes when you compress it, so when it comes through on the receiving end, it’s all interlaced looking.

NDI looks cool, though potentially a bit tricky to set up. I also briefly looked at libx264, but i’m not sure it’s it’s applicable here.

-c


#4

It actually appears there exist both NDI->Spout, and NDI->Syphon apps. I’m going to test these out before embarking on the block writing.
-c


#5

I think there is a NDI block over here, not sure if it’s working:


#6

I think NDI would be a great candidate to try out if you have a gigabit connection available. The SDK has been updated in the mean time and I haven’t found the time / need to update the block but I believe @num3ric has kept it updated in his fork . Plus he has a cinderblock.xml file with support for Windows which as I understand is your development platform.

Cheers,
Petros