VideoHelp Forum




+ Reply to Thread
Results 1 to 1 of 1
  1. Hi cats, please I have this wrong script:

    Code:
    FFVideoSource("input.avi")
    ConvertToYUY2(interlaced=true)
    
    src = last 
    src = src.width==720&&src.height==608?src.crop(0,32,0,0):src 
    src = src.width>720 || src.height>608?src.ColorMatrix(mode="Rec.709->Rec.601"): src 
    src = src.width!=720 || src.height!=576 ? src.IResize(720,576): src 
    src = src.width==1920&&src.height==1088?src.crop(0,0,1920,1080): src
    
    
    function IResize(clip Clip, int NewWidth, int NewHeight) {
    Clip
    SeparateFields()
    Shift=(GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0)
    E  = SelectEven().Spline36resize(NewWidth, NewHeight/2, 0,    Shift)
    O  = SelectOdd( ).Spline36resize(NewWidth, NewHeight/2, 0,   -Shift)
    Ec = SelectEven( ).Spline36resize(NewWidth, NewHeight/2, 0,  2*Shift)
    Oc = SelectOdd( ).Spline36resize(NewWidth, NewHeight/2, 0, -2*shift)
    Interleave(E, O)
    IsYV12() ? MergeChroma(Interleave(Ec, Oc)) : Last 
    Weave()
    } 
    AssumeTFF()
    SeparateFields()
    Ev=SelectEven().sharpen(0.20)
    Od=SelectOdd().sharpen(0.20)
    Interleave(Ev,Od)
    Weave()
    src.framerate<26 ? src:src.AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave() 
    AssumeFPS(25)
    ChangeFPS(25)
    The script should do this:

    source is input.avi

    if source is 720x608 ---> crop(0,32,0,0) (to get a 720x576)
    if source is 1920x1088 ---> crop(0,0,1920,1080) (to get a 1920x1080)
    if resolution is > 720x608 ---> colormatrix from rec.709 to rec.601
    if source is framerate > 25fps ---> apply the AssumeTFF().SeparateFields().SelectEvery(4,0,3).We ave() to get standard 25fpsInterlaced
    if source is all but not a 720x576, resize to 720x576

    How can I modify the script to have correct all this conditional? thanks

    ps. seems missing a ")" in the colormatrix line but it's only this site that don't show it
    Last edited by marcorocchini; 21st Sep 2014 at 11:17.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!