nocarryr / cyndilib Goto Github PK
View Code? Open in Web Editor NEWA Python wrapper for Newtek NDI® written in Cython
License: MIT License
A Python wrapper for Newtek NDI® written in Cython
License: MIT License
I'm trying to run this example code from: https://gist.github.com/royshil/2abf89b8d12072cdd793ddda2b73c497 and I received the error of :
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
I didn't find any documentation addressing Numpy compatibility, any solution?
Excellent project - thank you!
I use it in https://github.com/occ-ai/scoresight
While python 3.12 isn't supported from PyPi I resort to building, and missing some deps before setup.py
Suggest adding
$ pip install setuptools cython numpy
to the build instructions.
Note: this is without pipenv
.
Will be useful for brand new machines or a CI build.
Thanks!
UYVY format is 4 bytes per 2 pixels => 2 bytes per pixel
cyndilib/src/cyndilib/wrapper/ndi_structs.pyx
Line 178 in 23a84c0
For video receivers, cyndilib recomputes the line-stride in the calc_fourcc_pack_info
function instead of using the line-stride declared in the NDIlib_video_frame_v2_t
struct.
For most resolution this works fine but some non-standard resolution add some line padding.
In practice, this causes cyndilib
to consider that the data buffer is actually shorter than it really is. The get_array
function of a video frame returns incomplete data and trying to display it results in a jumbled image.
Here is a screenshot of OBS sending three color bands as a 300x700 rgba image through the OBS-NDI plugin and cyndilib receiving it.
This also happens with the RecvColorFormat.UYVY_RGBA
flag, which can also contain padding which cyndilb
ignores.
I have a simple fix for this for which I'll open a PR soon.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.