VideoHelp Forum




+ Reply to Thread
Results 1 to 17 of 17
  1. Member
    Join Date
    May 2011
    Location
    Vietnam
    Search Comp PM
    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
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    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:
    Image Attached Files
    Quote Quote  
  3. 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.
    Quote Quote  
  4. Member
    Join Date
    May 2011
    Location
    Vietnam
    Search Comp PM
    Originally Posted by davexnet View Post
    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:
    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 above
    Image Attached Files
    Last edited by drawar; 30th May 2011 at 20:36.
    Quote Quote  
  5. 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.
    Image Attached Files
    Quote Quote  
  6. There's always the cheap easy way of eliminating comb artifacts:

    Blur(0, 1.0)
    Sharpen(0, 0.7)
    Quote Quote  
  7. Member
    Join Date
    May 2011
    Location
    Vietnam
    Search Comp PM
    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?
    Quote Quote  
  8. 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.
    Quote Quote  
  9. Member
    Join Date
    May 2011
    Location
    Vietnam
    Search Comp PM
    Originally Posted by jagabo View Post
    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.
    Do you want a longer sample clip or the whole video (4m 54s /269 MB)?
    Quote Quote  
  10. Originally Posted by drawar View Post
    Do you want a longer sample clip or the whole video (4m 54s /269 MB)?
    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:

    Click image for larger version

Name:	faded.png
Views:	601
Size:	427.8 KB
ID:	7095

    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)
    Image Attached Files
    Last edited by jagabo; 30th May 2011 at 22:16.
    Quote Quote  
  11. Member
    Join Date
    May 2011
    Location
    Vietnam
    Search Comp PM
    So how to IVTC it properly? Actually vinverse can deal with those interlaced fades
    Quote Quote  
  12. You could replace the Blur().Sharpen() with Vinverse(). Though that video is over sharpened already so I'd use Blur().Sharpen().
    Quote Quote  
  13. Member
    Join Date
    May 2011
    Location
    Vietnam
    Search Comp PM
    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()
    Preview (in AvsPMod) <----> Output

    Quote Quote  
  14. Originally Posted by drawar View Post
    So how to IVTC it properly? Actually vinverse can deal with those interlaced fades
    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.
    Quote Quote  
  15. Member
    Join Date
    May 2011
    Location
    Vietnam
    Search Comp PM
    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
    Quote Quote  
  16. Originally Posted by drawar View Post
    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:
    Originally Posted by drawar View Post
    Are there any ways to get rid of those nasty artifacts
    and:
    Originally Posted by drawar View Post
    So how to IVTC it properly?
    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.
    Quote Quote  
  17. Member
    Join Date
    May 2011
    Location
    Vietnam
    Search Comp PM
    Originally Posted by manono View Post
    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
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!