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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th July 2020, 00:55   #1  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
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?
Cary Knoop is offline   Reply With Quote
Old 18th July 2020, 01:21   #2  |  Link
_Al_
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
_Al_ is offline   Reply With Quote
Old 18th July 2020, 03:43   #3  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
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])
feisty2 is offline   Reply With Quote
Old 18th July 2020, 04:03   #4  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
Thanks folks!
Cary Knoop is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:48.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.