|
话说TIVTC真是个好东西,全自动VFR太方便了,效果还非常好。最近处理某混合DVD片源时发现残余大量拉丝,因为实在不想手动处理(太麻烦了。。。),想出了这个办法。
以下脚本内容大部分A自Dgwxx大神的主页:
function CombingInfo(clip c, int "thresh")
{
file = "ovr.txt"
global clip = c
global sep=" +"
global combedthreshold=default(thresh,70)
c=SeparateFields(c)
c=c.Blur(0.0,1.58).Blur(0.0,1.58).Blur(0.0,1.58).Blur(0.0,1.58)
c=c.Blur(0.0,1.58).Blur(0.0,1.58).Blur(0.0,1.58)
c=c.Blur(0.0,1.58).Blur(0.0,1.58)
c=c.Blur(0.0,1.58)
c=weave(c)
c = FrameEvaluate(c, "global a = IsCombed(clip, combedthreshold)")
c = WriteFileIf(c, file, "a==true", "current_frame", "sep")
return c
}
dgdecode_mpeg2source("d2v.d2v")
tfm(slow=2,d2v="d2v.d2v")
combinginfo
crop(0,0,32,32)
(后面的crop是为了加快处理速度)
然后把脚本从头到尾播一次(推荐avs2avi,速度很快),生成ovr.txt,最后直接在tfm的参数里指定ovr="ovr.txt"就可以了。
上面这段是从某人的blog里抽来的
在avs的说明书里面有这么一段..........
那个iscomb的filter就是decomb用来判断是否comb的filter.
Advanced conditional filtering: part II
In the following example, some frame dependent info will be written to a text-file. The first variable "a" indicates whether the frame is combed (for a certain threshold). Note that IsCombed is a filter from the Decomb plugin. The second variable "b" indicates whether there is "much" movement in the frame.
global sep="."
global combedthreshold=25
function IsMoving()
{
global b = (diff < 1.0) ? false : true
}
function CombingInfo(clip c)
{
file = "F:\interlace.log"
global clip = c
c = WriteFile(c, file, "a", "sep", "b")
c = FrameEvaluate(c, "global a = IsCombed(clip,combedthreshold)")
c = FrameEvaluate(c, "IsMoving")
c = FrameEvaluate(c,"global diff = 0.50*YDifferenceFromPrevious(clip) + 0.25*UDifferenceFromPrevious(clip) + 0.25*VDifferenceFromPrevious(clip)")
return c
}
v = mpeg2source("F:\From_hell\from_hell.d2v").trim(100,124)
CombingInfo(v)
然后再用conditional filter就可以使用任何deinterlace filter了.
像下面说明书里面写的那样.........
ConditionalFilter returns source1 when the condition formed by filter+operator+value is met, otherwise it returns source2. If filter is not explicitly applied to a clip, it will be applied on testclip. The audio is taken from source1. An example:
This will choose frames from vid_blur when the average luma value of a frame is less than 20. Otherwise frames from vid will be returned.
vid = AviSource("file")
vid_blur = vid.Blur(1.5)
ConditionalFilter(vid, vid_blur, vid, "AverageLuma()", "lessthan", "20")
这段是从以前popgo一个讨论帖里抽出来的
从函数来看貌似是师出同门,本人编程不懂所以不太理解这个的含义
而用yatta自动跑后也会出一个ovr文件,观察里面的内容则是列出全部i帧,有交错的弄个负号,没交错的没表示
现在问题是ovr这个到底是啥意义,怎么用
还有可能的话解释下函数吧 |
|