nocarryr / cyndilib

A Python wrapper for Newtek NDI® written in Cython
MIT License
11 stars 0 forks source link

Sender Example? #4

Open ThomasLengeling opened 1 week ago

ThomasLengeling commented 1 week ago

Hi!, very nice library the viewer example works very fast!,

I'm wondering if you have an example on how to send NDI, that would very helpful

Many Thanks Thomas

nocarryr commented 1 week ago

Thanks for your interest!

It's been difficult to find an easy example for sending video. Mostly because colorspace conversion, chroma subsampling and planar packing of the various video formats is a very very deep rabbit hole (not to mention CPU-intensive for python/cython)

A while back I was working on some examples using ffmpeg since it already has very efficient pixel format conversion. Here's a gist with a sender and a player, both with click cli's.

Note though, that it's using pipes to get the raw data from/to ffmpeg, so it'll only work in Linux and macOS (which is why I never added it to this repository)

nocarryr commented 6 days ago

@ThomasLengeling here's another example found in the wild: https://gist.github.com/royshil/2abf89b8d12072cdd793ddda2b73c497

ThomasLengeling commented 4 days ago

Thank you very much!, I'll try these examples!