DistroAV icon indicating copy to clipboard operation
DistroAV copied to clipboard

[Bug]: NDI source output filter does not recognize size changes from crop filter

Open TimPeterson opened this issue 4 years ago • 13 comments

Steps:

  1. Create a scene with one source, for example an image.
  2. Add a Crop/Pad filter to the image source, e.g. cropping from 1920x1080 down to 1280x720.
  3. Add an NDI filter output to the image source.
  4. 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.

TimPeterson avatar Jan 25 '21 19:01 TimPeterson

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.

Trouffman avatar Dec 01 '24 16:12 Trouffman

I can reproduce this problem with OBS 31.0.3 on MacOS and DistroAV 6.0.0

markusloffler avatar Apr 03 '25 06:04 markusloffler

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?

BitRate27 avatar Apr 03 '25 19:04 BitRate27

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.

markusloffler avatar Apr 04 '25 05:04 markusloffler

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

BitRate27 avatar Apr 04 '25 13:04 BitRate27

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.

BitRate27 avatar Apr 04 '25 18:04 BitRate27

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

markusloffler avatar Apr 05 '25 05:04 markusloffler

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.

BitRate27 avatar Apr 05 '25 10:04 BitRate27

Yes, size is correct (checked with NDI Video Monitor)

markusloffler avatar Apr 05 '25 10:04 markusloffler

FYI: For testing, I copied distroav.plugin from artifacts to ~/Application Support/obs-studio/plugins and enabled it with xattr -d com.apple.quarantine

markusloffler avatar Apr 05 '25 10:04 markusloffler

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.

markusloffler avatar Apr 05 '25 10:04 markusloffler

Thanks for testing it! I can see the same issue. Stay tuned for further developments...

BitRate27 avatar Apr 05 '25 10:04 BitRate27

This seems to be also solved partly in : https://github.com/DistroAV/DistroAV/pull/1276

Trouffman avatar Jun 01 '25 11:06 Trouffman

This has been solved in #1343

Trouffman avatar Aug 29 '25 13:08 Trouffman