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 July 2020, 00:55 | #1 | Link |
Cary Knoop
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
|
Saving YUV as three separate b&w videos.
I know I can use ShufflePlanes to extract the Y, U, and V planes, but is there a way to save those individual planes as three separate B&W videos for individual processing in a single script to be merged at a later stage in another script?
|
18th July 2020, 01:21 | #2 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
You are thinking having three scripts for each plane and then forth script to load results? Try this.
Y = [core.std.ShufflePlanes(clip, planes=0, colorfamily=vs.GRAY)] #load Y #process Y #other scripts that proce U or V #in forth script you load those scripts (it is just python object, so same rules should apply, things to watch for is vs though) import script_Y import script_U import script_V yuv = core.std.ShufflePlanes(clips = [script_Y.Y, script_U.U, script_V.V], planes= [0,0,0], colorfamily=vs.YUV) yuv.set_output() #use this always below lines that load clips so vs would not override those script imports |
18th July 2020, 03:43 | #3 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
you don't need separate files if it's YCbCr 4:4:4, you can store it as an interleaved grayscale video
Code:
# 4:4:4 clip Y = core.std.ShufflePlanes(clip, 0, vs.GRAY) Cb = core.std.ShufflePlanes(clip, 1, vs.GRAY) Cr = core.std.ShufflePlanes(clip, 2, vs.GRAY) clip = core.std.Interleave([Y, Cb, Cr]) |
Thread Tools | Search this Thread |
Display Modes | |
|
|