VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Member
    Join Date
    Dec 2011
    Location
    Denmark
    Search PM
    If you have a big encoding job running, in virtualdub, avs file, and save to avi with compression, and i makes the nice Virtualdub just crashed, and you have used i dont know, 34 hours, can you resume or is it just start from scratch again?
    Quote Quote  
  2. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Not enough information. What are you "encoding" with an avs running in VirtualDub? Can you post your avs script?
    Last edited by sanlyn; 21st Mar 2014 at 20:24.
    Quote Quote  
  3. Member
    Join Date
    Dec 2011
    Location
    Denmark
    Search PM
    DirectShowSource("C:\Users\Admin\Documents\elmebak ken.mpg")
    ConvertToYV12(interlaced =true)
    AssumeTFF()
    SeparateFields()
    a=last

    clense(reduceflicker=false).merge(last,0.5).clense (reduceflicker=false)
    mot=removegrain(11,0).removegrain(20,0).DepanEstim ate(range=2)
    take2=a.depaninterleave(mot,prev=2,next=2,subpixel =2)
    clean1=take2.TMedian2().selectevery(5,2)

    sup1 = clean1.minblur(1).removegrain(11,0).removegrain(11 ,0)
    \ .mt_lutxy(clean1,"x 1 + y < x 2 + x 1 - y > x 2 - y ? ?",U=2,V=2)
    \ .msuper(pel=2,sharp=0)
    sup2 = a.msuper(pel=2,levels=1,sharp=2)

    bv22=sup1.manalyse(isb=true, truemotion=false,global=true,delta=2,blksize=16,ov erlap=8,search=5,searchparam=4,DCT=5)
    bv21=sup1.manalyse(isb=true, truemotion=false,global=true,delta=1,blksize=16,ov erlap=8,search=5,searchparam=4,DCT=5)
    fv21=sup1.manalyse(isb=false,truemotion=false,glob al=true,delta=1,blksize=16,overlap=8,search=5,sear chparam=4,DCT=5)
    fv22=sup1.manalyse(isb=false,truemotion=false,glob al=true,delta=2,blksize=16,overlap=8,search=5,sear chparam=4,DCT=5)

    interleave(a.mcompensate(sup2,fv22),a.mcompensate( sup2,fv21),a,a.mcompensate(sup2,bv21),a.mcompensat e(sup2,bv22))
    TMedian2().selectevery(5,2)

    sup3 = last.msuper(pel=2,sharp=2)
    bv33=sup3.manalyse(isb=true, truemotion=false,global=true,delta=3,blksize=8,ove rlap=4,search=5,searchparam=4,DCT=5)
    bv32=sup3.manalyse(isb=true, truemotion=false,global=true,delta=2,blksize=8,ove rlap=4,search=5,searchparam=4,DCT=5)
    bv31=sup3.manalyse(isb=true, truemotion=false,global=true,delta=1,blksize=8,ove rlap=4,search=5,searchparam=4,DCT=5)
    fv31=sup3.manalyse(isb=false,truemotion=false,glob al=true,delta=1,blksize=8,overlap=4,search=5,searc hparam=4,DCT=5)
    fv32=sup3.manalyse(isb=false,truemotion=false,glob al=true,delta=2,blksize=8,overlap=4,search=5,searc hparam=4,DCT=5)
    fv33=sup3.manalyse(isb=false,truemotion=false,glob al=true,delta=3,blksize=8,overlap=4,search=5,searc hparam=4,DCT=5)

    last.mdegrain3(sup3,bv31,fv31,bv32,fv32,bv33,fv33, thSAD=499)

    Interleave()
    Weave()

    ###
    #####interpolate bad frames and residual cleaning
    ###

    Super = msuper()
    bv1 = manalyse(Super, isb=true, delta=2)
    fv1 = manalyse(Super, isb=false, delta=2)
    bv2 = manalyse(Super, isb=true, delta=3)
    fv2 = manalyse(Super, isb=false, delta=3)
    global CandidatesForN = mflowinter(Super, bv2, fv2, time=33.3, ml=100)
    global CandidatesForO = mflowinter(Super, bv2, fv2, time=66.7, ml=100)
    global CandidatesForC = mflowinter(Super, bv1, fv1, time=50.0, ml=100)

    last
    rx(104,12) #104-116 replaced

    AssumeTFF()
    SeparateFields()
    f1=SelectEven().RemoveDirtMC(100,false).LSFMod(str ength=5)
    f2=SelectOdd().RemoveDirtMC(100,false).LSFMod(stre ngth=5)
    Interleave(f1,f2)
    Weave()





    function MinBlur(clip clp, int r, int "uv")
    {
    uv = default(uv,3)
    uv2 = (uv==2) ? 1 : uv
    rg4 = (uv==3) ? 4 : -1
    rg11 = (uv==3) ? 11 : -1
    rg20 = (uv==3) ? 20 : -1
    medf = (uv==3) ? 1 : -200

    RG11D = (r==0) ? mt_makediff(clp,clp.sbr(),U=uv2,V=uv2)
    \ : (r==1) ? mt_makediff(clp,clp.removegrain(11,rg11),U=uv2,V=u v2)
    \ : (r==2) ? mt_makediff(clp,clp.removegrain(11,rg11).removegra in(20,rg20),U=uv2,V=uv2)
    \ : mt_makediff(clp,clp.removegrain(11,rg11).removegra in(20,rg20).removegrain(20,rg20),U=uv2,V=uv2)
    RG4D = (r<=1) ? mt_makediff(clp,clp.removegrain(4,rg4),U=uv2,V=uv2 )
    \ : (r==2) ? mt_makediff(clp,clp.medianblur(2,2*medf,2*medf),U= uv2,V=uv2)
    \ : mt_makediff(clp,clp.medianblur(3,3*medf,3*medf),U= uv2,V=uv2)
    DD = mt_lutxy(RG11D,RG4D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=uv2,V=uv2)
    clp.mt_makediff(DD,U=uv,V=uv)
    return(last)
    }

    # median of 5 clips from Helpers.avs by G-force
    Function Median2(clip "input_1", clip "input_2", clip "input_3", clip "input_4", clip "input_5", string "chroma")
    {
    chroma = default(chroma,"process") #default is "process". Alternates: "copy first" or "copy second"
    #MEDIAN(i1,i3,i5)
    Interleave(input_1,input_3,input_5)
    chroma == "process" ? Clense(reduceflicker=false) : Clense(reduceflicker=false,grey=true)
    m1 = selectevery(3,1)
    #MAX(MIN(i1,i3,i5),i2)
    m2 = input_1.MT_Logic(input_3,"min",chroma=chroma).MT_L ogic(input_5,"min",chroma=chroma).MT_Logic(input_2 ,"max",chroma=chroma)
    #MIN(MAX(i1,i3,i5),i4)
    m3 = input_1.MT_Logic(input_3,"max",chroma=chroma).MT_L ogic(input_5,"max",chroma=chroma).MT_Logic(input_4 ,"min",chroma=chroma)
    Interleave(m1,m2,m3)
    chroma == "process" ? Clense(reduceflicker=false) : Clense(reduceflicker=false,grey=true)
    selectevery(3,1)
    chroma == "copy first" ? last.MergeChroma(input_1) : chroma == "copy second" ? last.MergeChroma(input_2) : last
    Return(last)
    }

    function TMedian2(clip c) {
    Median2( c.selectevery(1,-2), c.selectevery(1,-1), c, c.selectevery(1,1), c.selectevery(1,2) ) }



    function RemoveDirt(clip input, int limit, bool _grey)
    {
    clensed=input.Clense(grey=_grey, cache=4)
    alt=input.RemoveGrain(2)
    return RestoreMotionBlocks(clensed,input,alternative=alt, pthreshold=6,cthreshold=8, gmthreshold=40,dist=3, dmode=2,debug=false,noise=limit,noisy=4, grey=_grey)

    # Alternative settings
    # return RestoreMotionBlocks(clensed,input,alternative=alt, pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=li mit,noisy=12,grey=_grey,show=true)
    # return RestoreMotionBlocks(clensed,input,alternative=alt, pthreshold=6,cthreshold=8, gmthreshold=40,dist=3,tolerance= 12,dmode=2,debug=false,noise=limit,noisy=12,grey=_ grey,show=false)
    }

    function RemoveDirtMC(clip,int limit, bool "_grey")
    {
    _grey=default(_grey, false)
    limit = default(limit,6)
    i=MSuper(clip,pel=2)
    bvec = MAnalyse(i,isb=false, blksize=8, delta=1, truemotion=true)
    fvec = MAnalyse(i,isb=true, blksize=8, delta=1, truemotion=true)
    backw = MFlow(clip,i,bvec)
    forw = MFlow(clip,i,fvec)
    clp=interleave(backw,clip,forw)
    clp=clp.RemoveDirt(limit,_grey)
    clp=clp.SelectEvery(3,1)
    return clp
    }



    function R(clip Source, int N)
    {
    # N is number of the frame in Source that needs replacing.
    # Frame N will be replaced.

    Source.trim(0,-N) ++ CandidatesForC.trim(N-1,-1) ++ Source.trim(N+1,0)
    }


    function RP(clip Source, int N)
    {
    # N is number of the first frame in Source that needs replacing.
    # Frames N and N+1(O) will be replaced.

    Source.trim(0,-N) ++ CandidatesForN.trim(N-1,-1) \
    ++ CandidatesForO.trim(N-1,-1) ++ Source.trim(N+2,0)
    }


    function RX(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)
    }

    ColorYUV(gain_y=-12,gain_v=-5,gain_u=+10)
    SmoothLevels(0, 0.75, 255, 16, 235, Limiter=0)
    SMoothTweak(saturation=0.8)
    Quote Quote  
  4. Member
    Join Date
    Dec 2011
    Location
    Denmark
    Search PM
    And there are some colour and brightness filters in virtualdub also
    Quote Quote  
  5. If you have a big encoding job running, in virtualdub, avs file, and save to avi with compression, and i makes the nice Virtualdub just crashed, and you have used i dont know, 34 hours, can you resume or is it just start from scratch again?
    I assume you used the script on your other tread it is very slow 0,74 fps average ( how many hours are you trying to encode ).
    Also try to not do other thing with pc while you encode ( it is best to do it overnight while sleep almost all here do the same thing on slow projects ).

    The crashing could be related something with your pc CPU ( overheating) or ram or hdd or graphic card
    put more info

    first use the script on its own ( without filtering in vdub ) maybe some of the filters and filters from the script interact in the bad way use fast recompress in the video tab.

    I told you on the other tread that you should do step by step first do the errors then noise reduction then color correction not all at once
    Quote Quote  
  6. VirtualDub cannot resume after a crash. If you were running a 2-pass encoding, and it crashed during the second pass, you don't need to run the first pass again.

    Don't use DirectShowSource() for MPG files, it's not frame accurate. Use DgIndex and Mpeg2Source().
    Quote Quote  
  7. Don't use DirectShowSource() for MPG files, it's not frame accurate. Use DgIndex and Mpeg2Source().
    but he can use assume 25fps and i think that will solve it right jagabo ? according to wiki that is

    I think because of the slowness of the script ( at least that was poisen suggestion ) he should first do that, then the filtering in vdub he stuck to much filters in one pass i guess he could also put convert to rg in the end it will less likely make the vdub crash
    Quote Quote  
  8. The problem isn't the frame rate. DirectShow doesn't guarantee frame accuracy. If you start at frame 0 and move forward frame by frame until you get frame 10 you will get a particular frame. If you then zoom forward to frame 20 and seek backward frame by frame until you get to frame 10 you may not get the same frame you got when seeking forward. This is a bigger problem with editors than with AviSynth scripts but I still wouldn't trust DirectShow.
    Quote Quote  
  9. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    At first, I wouldn't try to convert an entire video to AVI. DGIndex/MPEG2Source will avoid frame problems. When you open an MPG in DGIndex, you'll notice a view of the video with a slider along the bottom of the viewer. Use that viewer to cut out just a small section of video. If anything is going wrong or not setup to suit you, you'll waste all that time doing it over. Convert a small section of video to see how it goes. MAke a .d2v of that cutout, then open it with an avs script in VirtualDub.

    The DGIndex viewer has a slider and some buttons on the right. Click the "[" button to mark where you want your cut start. Then click the "]" button to mark where you want it to end. You'll notice when you move the slider that it sort of "jerks" several frames in motion -- that's because it's stopping on key frames. You want to start and stop on key frames.

    Look over the DGIndex QUick Start guide referred to earlier. It's only one html page, will answer a lot of questions and get you started. Right now, you're doing it the hard way.
    Last edited by sanlyn; 21st Mar 2014 at 20:24.
    Quote Quote  



Similar Threads

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