Hi
I'm gonna IVTC a telecined video.This is what I get after tfm(slow=2,clip2=nnedi3).
![]()
![]()
![]()
![]()
![]()
As can be seen from these shots, there are some artifacts that the built-in deinterlacer of tfm simply can't deal with. Are there any ways to get rid of those nasty artifacts
Here is a sample clip http://www.multiupload.com/3XJ2NLQTUG
Thanks in advance
+ Reply to Thread
Results 1 to 17 of 17
-
-
I got good results using DGindex and AVIsynth.
Use DGindex to create the d2v project. (Set video/field operation/honor pulldown flags)
Create a script similar to to this:
LoadPlugin("F:\Program Files\AVStoDVD\DGIndex\dgdecode.dll")
mpeg2source("F:\Documents and Settings\Dave Xnet\desktop\sample2.d2v")
TFM().tdecimate()
What you do with it after that is up to you. I opened it in Virtualdub, cropped and resized,
but you could do all that in the script if you want to. Here's my sample output: -
I can see why TFM is having problems with that clip -- the quick fades, short shots, and frequent breaks in the pulldown pattern make it difficult for an automated field matcher.
You could do a manual IVTC (via Trim().SeparateFields().SelectEvery().Weave()) but it will be a lot of work with all those <half second long shots. -
No no, don't call it a 'good result' as there are even more annoying artifacts. Actually I have finished coding in AvsPMod using Frame Replacement function and TIVTC. First, let tfm(slow=2,clip2=nnedi3) do its work, if there are any frames having artifacts, I simply deinterlace them. This is my script
The problem is I'm getting an output full of artifacts, which is DIFFERENT from the artifact-free video previewed in AvsPMod. I bet it could be the script that causes the problem, so I'm asking for any other ways to IVTC this clip and fix all bad frames.
Thanks
*edit:
@jagabo: I've tried to do manual ivtc using doubleweave() and pulldown().trim()+.... but it's way too slow. That's why I've used that frame replacement function to shorten time, but I encounter another problem as cited aboveLast edited by drawar; 30th May 2011 at 20:36.
-
If you use assumetff.separatefields and examine the fields you will see that it's not just a field matching issue - even a manual ivtc will not work 100% because there is aliasing in individual fields to begin with
I would use QTGMC + srestore (or some other decimation) , because it will improve the bad aliasing, at the expense of some detail loss, and longer processing times. But at least it's "automatic"
mpeg2source()
assumetff()
qtgmc(preset="slower",sharpness=0.3)
srestore(frate=23.976)
assumefps(24000,1001)
or another approach might be QTGMC's progressive mode, or use some antialiasing function after IVTCing. -
There's always the cheap easy way of eliminating comb artifacts:
Blur(0, 1.0)
Sharpen(0, 0.7) -
thanks, but I don't want to sacrifice the details by using QTGMC. The output seems a little oversmoothed and oversharpened. Can anyone have a look at my script and tell what I'm doing wrong?
-
You're not doing anything wrong. It's simply difficult to IVTC when there is too little material to work with (few frames with picture, many all black) and many breaks in the telecine pattern. And I'm pretty sure some of the fades were performed after the video was telecined. Which means there are some fields that can't be matched because one field is darker than the other.
Last edited by jagabo; 30th May 2011 at 21:18.
-
-
No, I mean the IVTC has too few frames to work with between the black sections. Regarding the fade-after-pulldown problem, look at frames 46 and 47 of the sample. A perfect IVTC requires that one field come from each of those frames. But the frame 47 has been faded. So the matching field is darker than the matching field from the previous frame:
That means TFM doesn't recognize that the two fields match. It sees that as a very interlaced frame.
Attached is the first 5 shots manually IVTC with:
function ManualIVTC0(clip v)
{
SeparateFields(v).SelectEvery(10, 1,2, 4,5, 6,7, 8,9).Weave()
}
function ManualIVTC1(clip v)
{
SeparateFields(v).SelectEvery(10, 0,1, 3,4, 6,7, 8,9).Weave()
}
function ManualIVTC2(clip v)
{
SeparateFields(v).SelectEvery(10, 0,1, 2,3, 5,6, 8,9).Weave()
}
function ManualIVTC3(clip v)
{
SeparateFields(v).SelectEvery(10, 0,1, 2,3, 4,5, 7,8).Weave()
}
Mpeg2Source("sample2.d2v", CPU=6, upconv=1)
AssumeTFF()
A=Trim(1, 33).ManualIVTC3()
B=Trim(34,49).ManualIVTC2()
C=Trim(50,61).ManualIVTC0()
D=Trim(62,72).ManualIVTC2()
E=Trim(73,83).ManualIVTC2()
return(A+B+C+D+E).Blur(0,1.0).Sharpen(0,0.7)Last edited by jagabo; 30th May 2011 at 22:16.
-
So how to IVTC it properly? Actually vinverse can deal with those interlaced fades
-
You could replace the Blur().Sharpen() with Vinverse(). Though that video is over sharpened already so I'd use Blur().Sharpen().
-
Thanks, it works quite well. But still the question remains, what's wrong with my script?
Function R(clip src, clip enc, int frame)
{
ReplaceFramesSimple(src, enc, mappings=string(frame))
}
x=tfm(pp=0).vinverse
y=tfm(pp=0).nnedi3()
z=tfm(pp=0).qtgmc(inputtype=2)
t=tfm(pp=0).daaa()
tfm(slow=2,clip2=nnedi3) # perform auto IVTC post-processed by nnedi3
R(y,9)
R(y,10)
R(y,11)
R(x,15)
R(x,16)
R(x,20)
........
tdecimate()
-
As jagabo says, it was telecined and edited as video without concern for the cadence. As a result there are a ton of orphaned fields. And with the fades and the aliased fields, the IVTC can't 'fix' it all. Not at default settings. You can adjust the CThresh to make it more sensitive to the interlacing. This seems to work:
tfm(slow=2,clip2=nnedi3,CThresh=6)
But that will also cause it to deinterlace some 'good' frames. Your deinterlacer is so good, though, that you shouldn't notice if some non-interlaced frames get deinterlaced. Or you can add in Vinverse, as you discovered. Or you can do as pdr suggested and use QTGMC on it.
And Vinverse should only deinterlace those parts of frames detected as interlaced. I haven't tested myself (maybe you did), but you shouldn't have to use RemapFramesSimple to force it to deinterlace individual frames, if that's what you're doing.Last edited by manono; 31st May 2011 at 04:56.
-
Nope, I'm using different filters for different frames, you know, by using different variables
the x264 simply can't produce an output identical to the flawless previewed video in AvsPMod -
How is that at all relevant to what I suggested? You originally asked:
and:
I lowered the CThresh and the interlacing was gone. The issue you're having with the x264 encoder not outputting what the script does and what AvsP shows is a different issue entirely. All I know is I tested that script on the sample and it worked. Maybe break your script down into pieces and create a series of lossless AVIs, each in succession using different parts of the script. -
That's a good idea. Finally it works. Now I'm reencoding the lossless AVI to MP4 using x264 encoder
Thank you all. I really appreciate your help
Similar Threads
-
How To deinterlace IVTC ntsc promo only music video
By jamespoo in forum Video ConversionReplies: 14Last Post: 24th Mar 2011, 16:12 -
IVTC - could someone help?
By Gew in forum Newbie / General discussionsReplies: 51Last Post: 8th Feb 2010, 21:26 -
IVTC with video that constantly changes pattern?
By lordsmurf in forum Video ConversionReplies: 3Last Post: 8th Nov 2009, 18:36 -
ivtc help
By iamtehsux in forum Newbie / General discussionsReplies: 3Last Post: 20th Dec 2008, 19:58 -
IVTC Help!!!
By Martig in forum Video ConversionReplies: 1Last Post: 11th Jan 2008, 01:43