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. |
18th January 2022, 21:23 | #1 | Link |
Registered User
Join Date: Oct 2021
Posts: 83
|
How do you convert YUV to just Y
I'm trying to make an edge mask however when using algorithms where it applies to the whole clip and not a specific plane the result is a green white mess.
How do I convert YUV to Y only. I am only interested in the Luma layer for my mask and the edge mask I am using can not specify planes. Do I use Fmtconv, resize? etc Or is there a way to tell a plugin to target only a specific plane without needing the plugin to have it built in Last edited by Reclusive Eagle; 18th January 2022 at 21:27. |
18th January 2022, 21:36 | #2 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
http://www.vapoursynth.com/doc/funct...fleplanes.html
clip = core.std.ShufflePlanes(clip, planes=[0], colorfamily=vs.GRAY) |
18th January 2022, 21:41 | #3 | Link | |
Registered User
Join Date: Oct 2021
Posts: 83
|
Quote:
Thanks for your help! |
|
20th January 2022, 19:15 | #5 | Link |
Banana User
Join Date: Sep 2008
Posts: 989
|
@Selur
You mixed up the threads, "that" discussion is going over there: https://forum.doom9.org/showthread.php?t=183717
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
20th January 2022, 20:22 | #6 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
You are so right. -> deleted post.
Here's a small sample where I take a source, split it and stack Code:
original | Y U | U Code:
# Imports import vapoursynth as vs # getting Vapoursynth core core = vs.core # Loading Plugins core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2.dll") # source: 'G:\TestClips&Co\files\test.avi' # current color space: YUV420P8, bit depth: 8, resolution: 640x352, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive # Loading source using FFMS2 clip = core.ffms2.Source(source="G:/TestClips&Co/files/test.avi",cachefile="E:/Temp/avi_6c441f37d9750b62d59f16ecdbd59393_853323747.ffindex",format=vs.YUV420P8,alpha=False) # making sure input color matrix is set as 470bg clip = core.resize.Bicubic(clip, matrix_in_s="470bg",range_s="limited") # making sure frame rate is set to 25 clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) original = clip clipY,clipU,clipV = core.std.SplitPlanes(clip) clipY = core.text.Text(clip=clipY,text="Y",alignment=7,scale=1) clipY = core.resize.Bicubic(clip=clipY, width=clip.width, height=clip.height, format=vs.YUV420P8, range_s="limited") clipU = core.text.Text(clip=clipU,text="U",alignment=7,scale=1) clipU = core.resize.Bicubic(clip=clipU, width=clip.width, height=clip.height, format=vs.YUV420P8, range_s="limited") clipV = core.text.Text(clip=clipV,text="V",alignment=7,scale=1) clipV = core.resize.Bicubic(clip=clipV, width=clip.width, height=clip.height, format=vs.YUV420P8, range_s="limited") stacked = core.std.StackVertical([core.std.StackHorizontal([clip,clipY]), core.std.StackHorizontal([clipU,clipV])]) # set output frame rate to 25.000fps stacked = core.std.AssumeFPS(clip=stacked, fpsnum=25, fpsden=1) # Output stacked.set_output() Cu Selur Last edited by Selur; 20th January 2022 at 20:27. |
Thread Tools | Search this Thread |
Display Modes | |
|
|