View Full Version : 'clip' parameter, correcting bobbiness
randomshinichi
22nd February 2008, 10:16
While dabbling around in plugins, I noticed that there's this parameter that many plugins accept called 'clip':
Yadif (clip, int "mode", int "order")
Coincidentally, I need to apply denoising more strongly in some places than others... does 'clip' exist to solve this problem? What is its syntax? I cannot find any documentation anywhere on 'clip'.
Oh yes, also I'm encoding an anime movie, and for some reason the picture bobs up and down slightly all the time. How can I fix that? It's present even in the source.
Then there's the issue of colour correction... but first thing's first.
J_Darnley
22nd February 2008, 13:58
Clip means the clip/video that you want to give to the filter, all filters should by default just take the last one and use it.
MPEG2Source(...)
ColorMatrix(...)
Yadif(...)
Is the same as
MPEG2Source(...)
ColorMatrix(last, ...)
Yadif(last, ...)
But if you want to do something like this:
source = MPEG2Source(...)
filtered = ColorMatrix(last, ...).Yadif(last, ...)
trim(source, 0, 999) + trim(filtered, 1000, 1999)
is where specifying the clip is really useful. Perhaps some silly DVD masterer mixed progressive and interlaced video.
If you want to denoise more in someplace than others you could use something similar to what I posted. Perhaps:
source = MPEG2Source(...)
strong = StrongDenoise(source, ...)
weak = WeakDenoiser(source, ...)
trim(strong, 0,999) + trim(weak, 1000,1999) + trim(strong, 2000, 2999)
If you need to vary between many sections there might be an easier solution using ApplyRange or something similar but I am trying to get one too.
For the bobbing, what is the source of your video and what deinterlacer or IVTC filter are you using?
For colour correction, do you mean a ColorMatrix() correction or total changes likeTweak()?
`Orum
22nd February 2008, 14:02
"Clip" is essentially the video you're applying a filter to. If not specified, it assumes the return value of the previous function.
For example:
AviSource("My File.avi") # returns a "clip"
Tweak(bright=20) # Takes the return value from AviSource as its "clip" parameter
This could also be written as:
Tweak(AviSource("My File.avi"), bright=20) # Does the same thing!
Or even
AviSource("My File.avi").Tweak(bright=20) # Also the same
You can also use variables if you have several clips to work with, like so:
a = AviSource("File A.avi")
b = AviSource("File B.avi")
c = AviSource("File C.avi")
t = Tweak(b, bright=20)
return a + t + c
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.