[Bug]: NDI source output filter does not recognize size changes from crop filter
Steps:
- Create a scene with one source, for example an image.
- Add a Crop/Pad filter to the image source, e.g. cropping from 1920x1080 down to 1280x720.
- Add an NDI filter output to the image source.
- View the NDI output in Studio Monitor.
Expected result: Studio Monitor shows a 1280x720 signal with the cropped image, the same as shown within OBS.
Actual result: Studio Monitor shows a 1920x1080 signal with the cropped 1280x720 image in the upper left corner of the frame.
Using obs-ndi 4.9.0 with OBS 26.1.1 on Windows 10 1909.
Thanks for reporting and providing steps to reproduce.
Closing old issues. Please use the latest version of DistroAV / OBS and open a new issue if this persist.
I can reproduce this problem with OBS 31.0.3 on MacOS and DistroAV 6.0.0
What are the exact numbers you put into the Crop/Pad filter? Relative? x? y? width? height?
And just to be clear: you added the ndi filter after the crop filter?
Let's say I have a capture source of a window that has the size 1000 x 500. I set the crop filter to Left = 0, Top = 0, Right = 300, Bottom = 0. Then the NDI stream still has the size 1000 x 500, not 700 x 500. On the right side of the video stream, the pixels are just set to black with a width of 300. It doesn't matter if the crop filter is before or after the NDI output.
Thanks for clarifying. I can duplicate the issue. Seems to be related to how we implemented the NDI Output filter, it is directly accessing the parent source, instead of the target source (previous filter).
This is fixed in https://github.com/DistroAV/DistroAV/pull/1239 . It is a requirement that in order for the NDI output to be cropped, the Dedicated NDI output filter must be after/below the Crop/Pad filter in the list. @markusloffler if you have experience manually installing the build artifacts, it would be very helpful if you can verify the fix.
Thanks a lot for the quick fix. Happy to help with testing.
This is what I get:
- Crop filter after NDI output: Behavior as before
- Crop filter before NDI output: Black output
Does the size of the feed look correct? I saw the black screen with my own build of obs-studio but worked fine on a 31.0.3 install.
Yes, size is correct (checked with NDI Video Monitor)
FYI: For testing, I copied distroav.plugin from artifacts to ~/Application Support/obs-studio/plugins and enabled it with xattr -d com.apple.quarantine
Don't know if this observation helps: https://github.com/user-attachments/assets/a5ffc046-35ba-417b-9bff-7df66795309c
When combining a scroll and crop, having the crop before the scroll, it correctly crops and scrolls the cropped image. But also having the black cropped area in the end result.
When moving NDI output all the way down, the preview in the filter window really looks funky.
Thanks for testing it! I can see the same issue. Stay tuned for further developments...
This seems to be also solved partly in : https://github.com/DistroAV/DistroAV/pull/1276
This has been solved in #1343