Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The line stride declared by the NDI video frame is ignored which causes issues for non standard resolutions #7

Closed
guillaumeriousat opened this issue Aug 2, 2024 · 0 comments · Fixed by #8

Comments

@guillaumeriousat
Copy link
Contributor

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.
image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant