VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Hi ****

    really this time I think IResize is problematic

    so that for this C0004.MXF NTSC HD file, I would like converto to PAL SD

    https://www.dropbox.com/s/scno3zjczncabq9/C0004.MXF?dl=0

    I have try this script that produce excellent result ecxept any artifacts distorsion

    Code:
    LoadCPlugin("v:\automazioneclip\core\yadif.dll")
    vid=FFVideoSource("C:\Users\Administrator\Desktop\Nuova cartella (23)\C0004.MXF")
    aud=FFAudioSource("C:\Users\Administrator\Desktop\Nuova cartella (23)\C0004.MXF")        
    audioDub(vid, aud)
    assumeFPS(29.97002997003)              
    ConvertAudioTo16Bit()
    ConvertToYUY2(interlaced=true)
    colorMatrix(mode="Rec.709->Rec.601") 
    yadif()               
    SmoothFPS2(50000,1000)        
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
    AssumeFPS(25)

    plugin required:

    ffms2.dll https://www.dropbox.com/s/i9xcw0304mbhd9h/ffms2.dll?dl=0
    mvtools2.dll https://www.dropbox.com/s/uayb5xb6xsjcvdz/mvtools2.dll?dl=0
    colormatrix.dll https://www.dropbox.com/s/zelczg9dt32h7yp/ColorMatrix.dll?dl=0
    smoothFPS2.avsi (*)
    IResize (*)

    * slightly catMod

    Code:
    function SmoothFPS2(clip source, int num, int den) { 
    super = MSuper(source, pel=2, hpad=0, vpad=0, rfilter=4)
    backward_1 = MAnalyse(super, chroma=false, isb=true, blksize=32, searchparam=3, plevel=0, search=3, badrange=(-24))
    forward_1 = MAnalyse(super, chroma=false, isb=false, blksize=32, searchparam=3, plevel=0, search=3, badrange=(-24))
    backward_2 = MRecalculate(super, chroma=false, backward_1, blksize=8, searchparam=1, search=3)
    forward_2 = MRecalculate(super, chroma=false, forward_1, blksize=8, searchparam=1, search=3)
    backward_3 = MRecalculate(super, chroma=false, backward_2, blksize=4, searchparam=0, search=3)
    forward_3 = MRecalculate(super, chroma=false, forward_2, blksize=4, searchparam=0, search=3)
    MBlockFps(source, super, backward_3, forward_3, num, den, mode=0)}
    SEEMS that in my files the 32 in place of 16 reduce a little distorsions lines

    and the IResize:

    Code:
    function IResize(clip Clip, int NewWidth, int NewHeight) {
      Clip
      SeparateFields() 
      Shift=(GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0)
      E  = SelectEven().LanczosResize(NewWidth, NewHeight/2, 0,    Shift)
      O  = SelectOdd( ).LanczosResize(NewWidth, NewHeight/2, 0,   -Shift)
      Ec = SelectEven().LanczosResize(NewWidth, NewHeight/2, 0,  2*Shift)
      Oc = SelectOdd( ).LanczosResize(NewWidth, NewHeight/2, 0, -2*shift)
      Interleave(E, O)
      IsYV12() ? MergeChroma(Interleave(Ec, Oc)) : Last
      Weave()
    }
    seems in my files that LanczosResize in place of Spline36Resize is a little more detailed

    Hoewver I don't know where to put the IResize, in the case, but in everycase I think IResize is lower quality than the Virtualdub Resizer.
    So this script let output 1920x1080, and in virtualdub I set the deinterlace(doubleframerate)-->resize720x576withinterlaceflag-->andthenInterlace(evenFieldFirst)

    Anyone have idea how to resolve the distorsion artifacts, also with other optical flow plugin but alwais YUY2? thanks
    Quote Quote  
  2. Use whatever you feel works best.

    Play with the settings, or use another optical flow /interpolation filter. You will ALWAYS get artifacts in some situations. Usually when objects cross over one another, rotational movements, large movements. It's impossible to get perfect motion estimation in those situations without extra help. You can mask them out with other programs, compositing, or use motion tracking / track points to refine the motion estimation, mattes to separate foreground , background. This is what is done professionally if optical flow is used. It's never used "blindly" or in batch, even in Cat studios on Cat Planet

    IResize isn't used in your script that you posted (not called). You can only use optical flow on progressive video (you cannot generate new inbetween frames if video is interlaced). For the 17th time, IResize is usually used for interlaced HD to interlaced SD - notice there is no progressive state. Therefore IResize cannot be used with optical flow

    I posted a workaround how you can use Optical flow (or any filter that is supposed to be 4:2:0 only) with 4:2:2 in one of your other threads. <USE CAT SEARCH>
    Quote Quote  
  3. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    pdr, you and jagabo have WAYYY more patience than I could certainly muster.



    Scott
    Quote Quote  
  4. Originally Posted by poisondeathray View Post

    IResize isn't used in your script that you posted (not called).
    because seems to me it lower a lot the quality when used with smoothfps2. Considering the 4-5 method for resizing that I know, seems to me that the when avisynth pass all the interlaced stream to virtualdub, and it deinterlace/resize/interlace ... this seems to me the way that guarantee the best quality.


    Spline36Resize take too aliasing
    LanczosResize take aliasing
    GaussResize take too smooth and too aliasing in some points

    ...

    the way of pass all to virtualdub for resinze is not rational and logical, but seems to me that is the best quality

    Originally Posted by poisondeathray View Post
    IResize is usually used for interlaced HD to interlaced SD - notice there is no progressive state
    ________ Name:  SURPC.jpg
Views: 334
Size:  23.0 KB ________
    hoewver thanks poison
    Quote Quote  
  5. Originally Posted by marcorocchini View Post
    Originally Posted by poisondeathray View Post

    IResize isn't used in your script that you posted (not called).
    because seems to me it lower a lot the quality when used with smoothfps2.
    Because it's interlaced. You cannot use it with smoothfps2 with IResize. Read post #2 (Again).

    You can only use optical flow on progressive video (you cannot generate new inbetween frames if video is interlaced). For the 17th time, IResize is usually used for interlaced HD to interlaced SD - notice there is no progressive state. Therefore IResize cannot be used with optical flow
    You cannot interpolate frames with optical flow when video is still interlaced . Got it ? OPTICAL FLOW ONLY WORKS PROPERLY ON PROGRESSIVE FRAMES

    But if you deinterlace, it defeats the purpose of using IResize. You might as well use one of the deinterlace, resize , reinterlace methods (+/- low pass)


    ...
    this seems to me the way that guarantee the best quality.
    ...
    The only thing certain .... is there is no such thing that ensures "best" quality. Differnt settings and filters are more suited for different situations

    the way of pass all to virtualdub for resinze is not rational and logical, but seems to me that is the best quality
    Ok if you think so...then use it
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!