VideoHelp Forum




+ Reply to Thread
Results 1 to 2 of 2
  1. Hello,
    One of the posts I got this script:

    Code:
    AviSource("step 1 - filtered.avi")
    Crop(8,0,-16,-16)
    
    
    function ReplaceFramesMC(clip Source, int N, int X)
    {
        # N is number of the 1st frame in Source that needs replacing. 
        # X is total number of frames to replace
        #e.g. RX(101, 5) would replace 101,102,103,104,105 , by using 100 and 106 as reference points for mflowfps interpolation
     
        start=Source.trim(N-1,-1) #one good frame before, used for interpolation reference point
        end=Source.trim(N+X,-1) #one good frame after, used for interpolation reference point
     
        start+end
        AssumeFPS(1) #temporarily FPS=1 to use mflowfps
      
        super = MSuper()
        backward_vec = MAnalyse(super, isb = true)
        forward_vec = MAnalyse(super, isb = false)
        MFlowFps(super, backward_vec, forward_vec, blend=false, num=X+1, den=1) #num=X+1
        AssumeFPS(FrameRate(Source)) #return back to normal source framerate for joining
        Trim(1, framecount-1) #trim ends, leaving replacement frames
      
        Source.trim(0,-N) ++ last ++ Source.trim(N+X+1,0)
    }
    
    # deinterlace it
    Bob()
    
    # replace frames
    
    
    
    # reinterlace the video
    AssumeTFF()
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    I use it to repair damaged frames...

    But I always got the result image is not as sharp as I like ..
    I thought it was the tape ..

    But now, I checked to see if it is the script that dameg the sharpness of the video.

    The result is surprising.

    So here is two pictures of the same frame of the video.

    Photo One is when the script runs (code above) :
    Click image for larger version

Name:	hcwqhdzuv1rme8q1rryt.png
Views:	247
Size:	411.8 KB
ID:	14511


    And the second image with this code: (no ReplaceFramesMC)
    Code:
    AviSource("step 1 - filtered.avi")
    Crop(8,0,-16,-16)
    Click image for larger version

Name:	fnx93e36gfoswb68hdsr.png
Views:	276
Size:	563.8 KB
ID:	14512


    There is a big difference in sharpness if you check out the pictures one by one.

    It's not really bad if you bring me a new code of ReplaceFramesMC Which does not affect sharpness of the video.
    In that case I'll just have to process what I did again But with a new code and the same settings..

    I do not need to re-create the lists.. But it is still bad to my computer (it will have to work overtime)

    Thanks for helpers ..


    EDIT:

    Ok sanlyn,
    Now I understand why you write this:

    Code:
    Import("C:\Program Files (x86)\AviSynth 2.5\plugins\QTGMC-3.32.avs")
    Import("C:\Program Files (x86)\AviSynth 2.5\plugins\DeVCR.avs")
    Import("C:\Program Files (x86)\AviSynth 2.5\plugins\stab.avs")
    
    AssumeTFF()
    QTGMC(preset="fast")
    DeVCR(20)
    At the beginning of the code In the example you sent me ..
    I thought I was smart ass( = Google Translation) .. I did not understand why i need so i deleted it. (This slows the processing)

    So I added just like the example you sent me and now it's fine!

    Too bad I understand things too late...
    Last edited by gil900; 31st Oct 2012 at 15:20.
    Quote Quote  
  2. I don't know about replaceframesmc but one script i like to replace frames is dvdropouts (for progressive frames by default) kinda old but give it a try. Requires mvtools-v1.11.4.5

    function morph (clip c, int in, int "out", int "blksize")
    {

    Function fill_loop(string s, int stop, int count)
    {
    return (stop == 0) ? s : string("tofill.mvflowinter(fill_vb,fill_vf,time=" + string(100*(count - stop)/float(count))) + ",thscd1=255,thscd2=255).selectevery(tofill.framec ount(),0)," + fill_loop(s,stop-1,count)
    }

    out=default(out, 0)
    blksize=default(blksize,16)

    d=c.trim(in,out)# in-1?

    numframes=d.framecount-2
    tofill=d.selectevery(c.framecount(),0,c.framecount ()-1)

    fill_vf=tofill.mvanalyse(truemotion=true,blksize=b lksize,pel=2,isb=false,overlap=blksize/2)
    fill_vb=tofill.mvanalyse(truemotion=true,blksize=b lksize,pel=2,isb=true,overlap=blksize/2)
    filled=eval("interleave(" + fill_loop("" ,d.framecount()-1,d.framecount()-1) + "tofill.selectevery(tofill.framecount(),tofill.fra mecount())).assumefps(c.framerate())")
    c.trim(0,in-1)++filled++c.trim(out+1,0)
    }
    the syntax:
    separatefields()
    morph(3422,3424) # to replace frames 3423
    weave()
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  



Similar Threads

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