Question / Help Chroma-Shifting for video-game capture

Enmet

New Member
Hey there,

I'm currently using a PEXHDCAP60L to capture analog video signals (mostly SNES and RGB) using AmaRecTV, and then window capturing that in OBS to stream it. I've been thinking about moving to an OBS-only setup so that I can record and stream at the same time using only OBS, mainly because OBS can capture in fractional frame rates, as the SNES runs at roughly 60.10 hz.

Now this looks great, aside from the fact that the PEX has a slight chroma shift. While AmaRecTV does not record in the correct color space, it does the color shifting ("Color horizontal adjust: type-C"). There are also Avisynth and VirtualDub scripts that gets around this issue, but I haven't found one for OBS.

So my question is if there's any kind of solution to this or any kind of work around? Ideally, if there is some kind of filter that can be applied to the beginning of the filter chain.


Here's a comparison, AmaRecTV 3.10 on the left, OBS Studio 19.0.2 on the right, both raw. Look closely on the right side of the red letters (brown pixels between red and black) and the light-blue letters.

kUVo3vO.png
 

Attachments

  • AMAvsOBS.png
    AMAvsOBS.png
    443.2 KB · Views: 226

Enmet

New Member
Anyone? If there is no way around this, I highly request chroma shifting as an OBS filter plugin.
 

Suslik V

Active Member
It is not an issue with OBS Studio.
The big chance that your hardware incorrectly captures analog signal 4:2:2 and makes it digital or so. The original SNES shipped with coax cord (cable connection), isn't it?

Any chance to try other capture device or maybe SNES emulator?
 
Last edited:

Enmet

New Member
It is not an issue with OBS Studio.
The big chance that your hardware incorrectly captures analog signal 4:2:2 and makes it digital or so. The original SNES shipped with coax cord (cable connection), isn't it?

Any chance to try other capture device or maybe SNES emulator?

You are correct, my question was if there is some way to get around this issue. It appears that the capture card only has this color shift whenever it's recording 240/288p sources (in this case, analog RGB).

Have you tried setting the color settings manually on the capture device in OBS?

Tried everything in the capture device settings so far with no luck.
 

Enmet

New Member
This issue has nothing to do with color matrix as OBS can accurately capture in 709. The issue I'm having is that the color of all pixels are shifted horizontally by two. Note that this is not a color space, color range or video format issue.

Look closely at the screenshot I posted in my first post (the right-sided one of course); on the big red letters, you can see on the right side that red and black kinda blends together into brown.

YWNWAmd.png


Like I mentioned earlier, AmaRecTV handles this by having an option to apply color shift "type-C", for VirtualDub you can use a filter called flaXen VHS filter, and for anything that can handle Avisynth scripts you can apply simply called ChromaShift. I guess the ChromaShift page explains this a little bit better:
This filter will shift the chrominance information (C == U and V together) or the U or the V separately, by an even number of pixels, in either horizontal direction. It can also apply an overall vertical shift of the total chrominance information, up or down. This applies to clips in YUY2 or YV12 colourspaces.

Though in the end OBS is the superior option in most ways, it still lacks this feature. Maybe there could be a way around like being able to use Avisynth scripts or something?
 

DeMoN

Member
ah ok. I just thought maybe you didnt watch out for this setting.
But your problem is then indeed a complete else referencing to your last post.
 

Suslik V

Active Member
It is not quite true about RGB, as signal shifted, as I see, at Pr (or Cr) plane and why pixels so big?

By the way, if you connect your SNES to TV as usual and try to capture TV set video-out, same issue? Just wondering.
 

Enmet

New Member
It is not quite true about RGB, as signal shifted, as I see, at Pr (or Cr) plane and why pixels so big?

By the way, if you connect your SNES to TV as usual and try to capture TV set video-out, same issue? Just wondering.
Same issue, because it's a capture card issue. There seems to be no way around this, but I'll make a thread in feedback and suggestions.

On a side-note, I'm fiddling around with different setups. Is there a way to apply a color space (601 to 709) filter change to a specific window capture?
 

Suslik V

Active Member
No. You even cannot choose the matrix for Media Source (VLC Video Source) import, and it can do wrong things (v19.0.2).

But it is possible to try to adjust colors via LUT filter. It can reduce color shift caused by mismatched matrix used.

If BT601 coefficients applied over BT.709 content, you can try attached LUT (.png format OBS Studio compatible). Apply reverse matrix file - "reduce_green_709over601.png" LUT file over the source that has "overbright-green". The second one "reduce_green_709over601_TVoverPC.png" - used (in addition to 709-601) to emulate TV range wrongly interpreted as PC range when displayed on PC range display (just for test).

Both LUTs are free, and as is. (Made by me using ffmpeg, OBS Studio, GIMP).

I assuming that you have "overbright-green" and your screenshots/players/editors has right colors... (just in case, OBS Studio: Color Space, Color Format, Color Range settings Guide. Test charts.)
 

Attachments

  • reduce_green_709over601.png
    reduce_green_709over601.png
    146.5 KB · Views: 192
  • reduce_green_709over601_TVoverPC.png
    reduce_green_709over601_TVoverPC.png
    115.4 KB · Views: 176

Suslik V

Active Member
Or maybe this LUT. The previous has partial range source in the middle of the process. This one is better *_*

Actually, I cannot determine range by my eyes (is it scaled up or it is genuine:). Maybe you can? Which LUT is better?
The naming is custom, and maybe should read as "601 to 709". Anyway, it is free and as is.
 

Attachments

  • 709_to_601.png
    709_to_601.png
    112.7 KB · Views: 295

Suslik V

Active Member
Let's me add "601 to 709" too. Just for beauty of pictures.

Can be used in case you see "darker" green (BT.601 source decoded as BT.709) and want to correct this by Apply LUT filter (unfortunately, I don't have examples in OBS Studio where it can happen without any user adjustment).

This one, produced in few steps by subtracting and adding previous "709_to_601.png" to "original.png" LUT. So, it's free and as is too.
 

Attachments

  • 601_to_709.png
    601_to_709.png
    126.2 KB · Views: 241

Enmet

New Member
Thank you Suslik V, I'll go back to the Ama+OBS setup and use the LUT filter with it!

I also made a post in 'Feedback and Suggestions' regarding the color shift thing.
 

Suslik V

Active Member
OK. Just want to mention that when I use both LUTs in a row - cyan alternates a bit. That means - either method not fully compatible with LUTs and it works as intended (nothing to improve), or I messed up with LUTs creation. So, use this LUTs as workaround only and look for other methods when ever possible (I think, window capture is not the best option).

As for chroma shift feature - small chance that you'll see it soon...
 
Top