Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
11th February 2022, 22:31 | #1 | Link |
Registered User
Join Date: Jan 2022
Posts: 1
|
Help converting old avisynth function
Hey,
I'm currently working on converting a few scripts to vapoursynth for a few reasons, (more familiar with python, easier to set up environment thanks to AUR, some vapoursynth plugins like VSGAN, etc.), and I've basically got everything ported over except this one function. This function does a quick and dirty removal of most of the green color gamut. It does this because it's being used on some old video from those first-generation camcorders that would get those bright blobs of color in bright spots of the image. The video in question has bright green blobs. Funny thing is that the color gamut of VHS at that time is so limited that actual greens in the image remain fine while the unnatural greens from that artifact just get desaturated. Anyway, the issue I've run into with this function is that basically none of the functions it uses exist in vapoursynth. Is there a good way to do this in vapoursynth? Is there a plugin or group of plugins that could accomplish this? Here is the function: Code:
function removeAllGreen(clip a) { gmask = Overlay(a.UtoY().invert(), a.VtoY().Invert(), mode="multiply").BilinearResize(a.width, a.height).ColorYUV(off_y=-65).ColorYUV(gain_y=3000) return Overlay(a, Tweak(a, sat=0.0), mask=gmask) # overlay original with greyscale, only where green } |
Tags |
avisynth, scripting, scripts, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|