RenderHeads / UnityPlugin-AVProLiveCamera

AVPro Live Camera is a Unity plugin for webcams, TV cards and capture cards
https://renderheads.com/products/avpro-live-camera/
11 stars 0 forks source link

YUV_I420 colors displaying wrong #38

Closed WCTFOX closed 3 years ago

WCTFOX commented 3 years ago

Describe the bug YUV_I420 colors look significantly wrong when captured by Live Camera 2.6.2. These colors were correct with Live Camera 1.6.4. I tried swapping in the conversion shader from 1.6.4 into 2.6.2. It gave me different colors that also weren't right. Switching between linear and gamma color spaces also doesn't help.

Your Setup (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Hook up two PCs, one playing video into the capture card, the other receiving the feed and displaying them in a Unity program using Live Camera.
  2. Show someone from the marketing department.
  3. Listen to them bitch and moan because our brand colors look wrong.

Screenshots I put the full 24-bit color palette through the card. The first image is the original colors. The second image is how they come through in OutputTexture.

rightColors wrongColors

Obviously going through a reduced color space you don't expect them to be identical, but it's considerably altering the hue.

WCTFOX commented 3 years ago

It's a lot more obvious if you download the two images and switch back and forth between them. It's not that subtle a difference, but it looks much less pronounced when the images are stacked as above.

kahnivore commented 3 years ago

Could you update to the latest version, 2.9.1, and let us know if the problem persists please?

WCTFOX commented 3 years ago

Apologies, the version I'm using is 2.9.1. That's the version that's showing incorrect colors.

I still had an old Readme.pdf in Assets\AVProLiveCamera; that's where I was getting the version number 2.6.2 from.

AndrewRH commented 3 years ago

Hi,

I think this could caused by two things:

1) Gamma 2) Full/TV range

For Gamma differences, try changing the colorspace setting in Player Settings to Gamma (or Linear if it's already in Gamma).

For Full/TV range try looking at your device settings (basically there are two brightness ranges 0..255 (full) or 16..235 (tv) and any difference here can affect brightness). You could also try toggling this here: image

Lastly it could be caused by using a slightly different YCbCr matrix when converting to RGB.

Sadly DirectShow often gives us incorrect or vague information about the matrix and range so this is a fairly common issue on some devices. You can try upgrading the drivers of your capture device in case that helps.

You could also try disabling the option "Support Internal Format Conversion" here: image

Does one of these suggestions help?

Thanks,

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically closed because it has not had recent activity. If you wish to continue this issue, then please create a new issue as we do not monitor closed issues.