johnmeyer
12th May 2016, 20:06
I captured a sports film from a laserdisc. It has standard 3:2 pulldown. However, when I use:
tfm()
tdecimate()
to remove that pulldown, TDecimate drops frames. I have looked at the original telecined video, field-by-field, and there is no interruption of the 3:2 pattern, and the fields look clean.
But here's the important part of the story ...
I created a test clip to upload with this post by doing a "smart render" (i.e., no re-render) of the DV video, taking about ten seconds on either side of one of the places where the IVTC failes.
However ...
The IVTC works OK on this test clip!
Here's the test clip, just to show you what I'm dealing with:
Test Clip (https://www.mediafire.com/?zhce5ms9s0o3u2x)
As I said, the IVTC works fine on this short clip. It is only when I do the entire 30 minute video that TDecimate fails.
To show you where the problem happens in the full video, when I IVTC the entire clip, one frame that is dropped is the same as frame 60 in this test clip.
So, if TDecimate's default Cycle is only 5 frames, why would feeding it a much longer clip cause a problem? I tried putting Requestlinear both before and after the TFM/TDecimate calls, but that made no difference (I understand what the documentation says about Requestlinear, but I don't fully understand when to use it).
So, does anyone have any suggestions on what TFM or TDecimate settings to change in order to get this to work? I have tried using Cycle=10 and CycleR=2, and that at first appeared to help, but all it does is move the dropped frame problem to a different frame. It does not cure the problem. I have experimented with different modes in both TFM and TDecimate. I've used TIVTC at least a hundred times, and never had a problem like this.
My version of TIVTC is v1.0.5.
Thanks. [edit] See next two posts for additional information. [/end edit]
Oh yes, here's the entire script:
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\TIVTC.dll")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\MVTools\mvtools2.dll")
AVISource("E:\fs.avi").KillAudio().converttoYV12(interlaced=true).AssumeBFF()
tfm()
tdecimate()
source=AssumeFPS(23.976, false)
output=MDegrain2P(source,4,2,0)
return output
#-------------------
function MDegrain2P(clip source, int "blksize", int "overlap", int "dct")
{
overlap=default(overlap,0) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with light flicker
super = source.MSuper(pel=2, sharp=1)
backward_vec2 = super.MAnalyse(isb = true, delta = 1, blksize=blksize, overlap=overlap, dct=dct)
forward_vec2 = super.MAnalyse(isb = false, delta = 1, blksize=blksize, overlap=overlap, dct=dct)
backward_vec4 = super.MAnalyse(isb = true, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
forward_vec4 = super.MAnalyse(isb = false, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
MDegrain2(source,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=200)
}
tfm()
tdecimate()
to remove that pulldown, TDecimate drops frames. I have looked at the original telecined video, field-by-field, and there is no interruption of the 3:2 pattern, and the fields look clean.
But here's the important part of the story ...
I created a test clip to upload with this post by doing a "smart render" (i.e., no re-render) of the DV video, taking about ten seconds on either side of one of the places where the IVTC failes.
However ...
The IVTC works OK on this test clip!
Here's the test clip, just to show you what I'm dealing with:
Test Clip (https://www.mediafire.com/?zhce5ms9s0o3u2x)
As I said, the IVTC works fine on this short clip. It is only when I do the entire 30 minute video that TDecimate fails.
To show you where the problem happens in the full video, when I IVTC the entire clip, one frame that is dropped is the same as frame 60 in this test clip.
So, if TDecimate's default Cycle is only 5 frames, why would feeding it a much longer clip cause a problem? I tried putting Requestlinear both before and after the TFM/TDecimate calls, but that made no difference (I understand what the documentation says about Requestlinear, but I don't fully understand when to use it).
So, does anyone have any suggestions on what TFM or TDecimate settings to change in order to get this to work? I have tried using Cycle=10 and CycleR=2, and that at first appeared to help, but all it does is move the dropped frame problem to a different frame. It does not cure the problem. I have experimented with different modes in both TFM and TDecimate. I've used TIVTC at least a hundred times, and never had a problem like this.
My version of TIVTC is v1.0.5.
Thanks. [edit] See next two posts for additional information. [/end edit]
Oh yes, here's the entire script:
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\TIVTC.dll")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\MVTools\mvtools2.dll")
AVISource("E:\fs.avi").KillAudio().converttoYV12(interlaced=true).AssumeBFF()
tfm()
tdecimate()
source=AssumeFPS(23.976, false)
output=MDegrain2P(source,4,2,0)
return output
#-------------------
function MDegrain2P(clip source, int "blksize", int "overlap", int "dct")
{
overlap=default(overlap,0) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with light flicker
super = source.MSuper(pel=2, sharp=1)
backward_vec2 = super.MAnalyse(isb = true, delta = 1, blksize=blksize, overlap=overlap, dct=dct)
forward_vec2 = super.MAnalyse(isb = false, delta = 1, blksize=blksize, overlap=overlap, dct=dct)
backward_vec4 = super.MAnalyse(isb = true, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
forward_vec4 = super.MAnalyse(isb = false, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
MDegrain2(source,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=200)
}