VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 38
  1. One more similar question.

    Which is the best deinterlance filter, and when to put in this two scripts?

    So, which deinterlance, and were to put deinterlance and resize in this scripts?

    Code:
    LoadPlugin("DeGrainMedian.dll")
    avisource("C:\Documents and Settings\My Documents\Video 2.avi")
    ConvertToYuY2(interlaced=true)
    degrainmedian(interlaced=true)
    degrainmedian(interlaced=true)
    crop(8,4,-8,-12)
    AddBorders(8,8,8,8)
    Code:
    LoadPlugin("Convolution3d.dll")
    avisource("C:\Documents and Setting\My Documents\Video 1.avi")
    ConvertToYuY2(interlaced=true)
    SeparateFields()
    odd=SelectOdd.Convolution3D (1, 32, 128, 8, 32, 10, 0)  
    evn=SelectEven.Convolution3D (1, 32, 128, 8, 32, 10, 0) 
    Interleave(evn,odd)
    Weave()
    crop(8,4,-8,-12)
    AddBorders(8,8,8,8)
    I will use this script in Virtualdub, because i want to make divx from this scripts. Source is Dv avi(interlaced).

    best regard
    Quote Quote  
  2. any comment?
    Quote Quote  
  3. After the source loading.
    LeakKernelDeint() ot TDeint(). You must specify the field order.
    Mind that after deinterlacing your video is not interlaced anymore. So edit the scripts in this relation.
    Quote Quote  
  4. I always work with DV avi material(bottom field first)
    Code:
    LoadPlugin("DeGrainMedian.dll")
    avisource("C:\Documents and Settings\My Documents\Video 2.avi")
    #does here to put resize or not
    TDeint()
    ConvertToYuY2(interlaced=true)
    degrainmedian(interlaced=true)
    degrainmedian(interlaced=true)
    crop(8,4,-8,-12)
    AddBorders(8,8,8,8)
    Code:
    LoadPlugin("Convolution3d.dll")
    avisource("C:\Documents and Setting\My Documents\Video 1.avi")
    #does here to put resize or not
    TDeint()
    ConvertToYuY2(interlaced=true)
    SeparateFields()
    odd=SelectOdd.Convolution3D (1, 32, 128, 8, 32, 10, 0) 
    evn=SelectEven.Convolution3D (1, 32, 128, 8, 32, 10, 0)
    Interleave(evn,odd)
    Weave()
    crop(8,4,-8,-12)
    AddBorders(8,8,8,8)
    1. Where is better to put resize, before or after deinterlance filter?

    2. Does i need to load TDeint() or LeakKernelDeint() filter? (i mean dll file)

    3. Does is necessary to specify the field order?
    Quote Quote  
  5. 1. after the deinterlace. For education purposes try to put it before and see what happen to the output.
    2. If they are not in the plugin folder of avisynth, yes. If they are in the plugin folder they autoload (and also every dll in the plugin folder would be autoloaded, so be carefull what you put there).
    3. Read the documentation that come with the dlls and you will see.
    Several remarks about the scripts. After the deinterlacing the video is not interlaced anymore. So, all this (interlaced=true) are pointless. Also you don't have different fields anymore. So separate fields is not necessary and folowing interleave and weave also. In other words after deinterlacing you should treat the video as progressive.
    Quote Quote  
  6. Which deinterlance is best?

    And how to use convolution 3d filter if i dont have separate fields and wave(because i want to deinterlance)?

    thanks
    Quote Quote  
  7. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    If you have progressive (deinterlaced) material then you just need to have the one line as follows:

    Code:
    Convolution3D (1, 32, 128, 8, 32, 10, 0)
    So your script above would look like:

    Code:
    LoadPlugin("Convolution3d.dll") 
    avisource("C:\Documents and Setting\My Documents\Video 1.avi") 
    TDeint() 
    ConvertToYuY2() 
    crop(8,4,-8,-12)
    Convolution3D (1, 32, 128, 8, 32, 10, 0) 
    AddBorders(8,8,8,8)
    I've also put the NR after the crop but before the AddBorders for efficiency purposes as this will be the fastest, since you don't need to do NR on pixels you're going to crop out.
    If in doubt, Google it.
    Quote Quote  
  8. Originally Posted by SerbianBoss
    Which deinterlance is best?
    I don't know.
    Quote Quote  
  9. Thanks for script. But where to put resize and limited sharpen in this script?

    Code:
    LoadPlugin("Convolution3d.dll")
    avisource("C:\Documents and Setting\My Documents\Video 1.avi")
    TDeint()
    ConvertToYuY2()
    crop(8,4,-8,-12)
    Convolution3D (1, 32, 128, 8, 32, 10, 0)
    AddBorders(8,8,8,8)
    And where to put resize and limited sharpen and crop in this script:

    Code:
    LoadPlugin("DeGrainMedian.dll")
    avisource("C:\Documents and Settings\My Documents\Video 2.avi")
    TDeint()
    ConvertToYuY2()
    degrainmedian()
    degrainmedian()
    crop(8,4,-8,-12)
    AddBorders(8,8,8,8)
    Quote Quote  
  10. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    I would resize and then sharpen, at the end of the script. Although there would be a case for resizing early and then filtering. But it depends on if you want efficieny in your filtering or to negate the effects of the resize.

    You could always just experiment with a 30 second test clip and see what (and where) gives the best results.
    If in doubt, Google it.
    Quote Quote  
  11. In both cases before add borders and after denoising. In the second script you need to put crop before degrainmedian lines. If you want DVD you don't need to resize, because DV AVI is already at DVD resolution. That means you need to add borders to fill up the frame.
    As you are cropping 16 pixels horizontaly and 20 pixels verticaly you need to add the same numbers:
    crop(8,4,-8,-12)
    ...
    ...
    AddBorders(8,10,8,10)
    If you want to resize include the resizing parameters in limitedsharpen.
    Quote Quote  
  12. I want to make scripts for xvid Virtualdub and this is the reason of deinterlacing and resizing.

    So does this script looks better or not(make attention on deinterlance,resize,limitedsharpen and crop):

    Code:
    LoadPlugin("DeGrainMedian.dll")
    avisource("C:\Documents and Settings\My Documents\Video 2.avi")
    TDeint()
    LanczosResize(512,384)
    ConvertToYUY2(interlaced=false)
    crop(8,4,-8,-12)
    degrainmedian()
    limitedsharpen ()
    AddBorders(8,8,8,8)
    Code:
    LoadPlugin("Convolution3d.dll")
    avisource("C:\Documents and Setting\My Documents\Video 1.avi")
    TDeint()
    LanczosResize(512,384)
    ConvertToYuY2(interlaced=false)
    crop(8,4,-8,-12)
    Convolution3D (1, 32, 128, 8, 32, 10, 0)  
    limitedsharpen()
    AddBorders(8,8,8,8)
    Quote Quote  
  13. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    How does THE OUTPUT look ?

    That's the main thing here. It's all well and good for us to give script hints but at the end of the day you need to experiment a bit and follow your nose.
    If in doubt, Google it.
    Quote Quote  
  14. My finall scripts for xvid is this: I load this scripts in virtual dub and encode using xvid.

    Code:
    LoadPlugin("DeGrainMedian.dll")
    LoadPlugin("tdeint.dll")
    avisource("C:\Documents and Settings\Nenad\My Documents\Video 2.avi")
    Trim(0,3442)
    ConvertToYUY2(interlaced=false)
    TDeint()
    LanczosResize(512,384)
    crop(8,4,-8,-12)
    degrainmedian()
    AddBorders(8,8,8,8)
    Code:
    LoadPlugin("Convolution3d.dll")
    LoadPlugin("tdeint.dll")
    avisource("C:\Documents and Settings\Nenad\My Documents\Video 2.avi")
    Trim(0,3442)
    ConvertToYuY2(interlaced=false)
    TDeint()
    LanczosResize(512,384)
    crop(8,4,-8,-12)
    Convolution3D (1, 32, 128, 8, 32, 10, 0) 
    AddBorders(8,8,8,8)
    And picture quality is Ok. I tested on very short material(1 minute) and i think that is OK.But it encode very very slow 8-10 FPS on my dual amd.

    Maybe is better to use internal VD filters for deinterlance,resize...maybe faster
    Quote Quote  
  15. I don't believe you need ConvertToYUY2(interlaced=false) in the first script. You don't need it in the 2nd script unless you're using that old version of Convolution3D. I could be wrong, though, if your source is RGB.

    If you want your script to encode a bit faster, substitute LeakKernelDeint(Order=1) for TDeint(). Almost as good and quite a bit faster.

    Maybe is better to use internal VD filters for deinterlance,resize...maybe faster

    Not better. Not faster.
    Quote Quote  
  16. My source is Dv avi(bottom field first),but when i put in virtualdub it become RGB write or no?
    So does is better like this ConvertToYuY2()?

    Wow, with LeakKernelDeint i have 35 fps instead 8 fps with tdeint

    But should i set LeakKernelDeint(Order=0) instead order 1. In manual sais if have BTT to set order 0

    So scripts is:


    Code:
    LoadPlugin("DeGrainMedian.dll")
    LoadPlugin("LeakKernelDeint.dll")
    avisource("C:\Documents and Settings\My Documents\Video 2.avi")
    Trim(0,3442)
    ConvertToYuY2()
    LeakKernelDeint(Order=0)
    LanczosResize(512,384)
    crop(8,4,-8,-12)
    degrainmedian()
    AddBorders(8,8,8,8)
    Code:
    LoadPlugin("Convolution3d.dll")
    LoadPlugin("LeakKernelDeint.dll")
    avisource("C:\Documents and Settings\My Documents\Video 2.avi")
    Trim(0,3442)
    ConvertToYuY2()
    LeakKernelDeint(Order=0)
    LanczosResize(512,384)
    crop(8,4,-8,-12)
    Convolution3D (1, 32, 128, 8, 32, 10, 0) 
    AddBorders(8,8,8,8)
    Is that Ok.
    Quote Quote  
  17. Hi-

    But should i set LeakKernelDeint(Order=0) instead order 1.

    Yes, if your video is BFF, then Order=0. And if the video is in RGB, then yes, you need a convert call, although I think I'd ConvertToYV12() unless you're using a YUY2 only Convolution3D You can find out the colorspace by adding Info() to the end of the script and opening it in VDub(Mod). Of course, if you've already converted the colorspace, then it's going to give that colorspace. To find out the original colorspace, temporarily comment out (put a "#" in front of it) the Convert line (and maybe the filters that require it).

    Also, for faster encodes, make sure you're using FastRecompress in VDub(Mod). Video->Fast Recompress, and not Full Processing Mode.
    Quote Quote  
  18. When this script i load in virtual dub mod i see:

    Code:
    LoadPlugin("Convolution3d.dll")
    LoadPlugin("LeakKernelDeint.dll")
    avisource("C:\Documents and Settings\Nenad\My Documents\Video 2.avi")
    Trim(0,3442)
    ConvertToYuY2()
    LeakKernelDeint(Order=0)
    LanczosResize(512,384)
    crop(8,4,-8,-12)
    Convolution3D (1, 32, 128, 8, 32, 10, 0) 
    AddBorders(8,8,8,8)


    I am using YUY2 version of convolution 3d.

    So how does script looks like?

    And how to put some sharpening for deinterlance(i try Order=0,sharp=true and Order=0, sharp=false) but i dont have any sharpening on movie.

    best regard
    Quote Quote  
  19. I don't see Info() anywhere in that script. If you added it at the bottom, then you had already converted the colorspace, and you didn't comment out the lines as I suggested before. You can add Info() right after AVISource and it'll tell you what the colorspace of the AVI is.
    Quote Quote  
  20. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    Looks like I'm late here but manono has given his usual excellent advise already.

    Only thing I can add is this ... you probably don't need to crop as much as you are ... looks like you are still using MY VALUES from my EXAMPLE in the CONVOLUTION3D guide.

    Also I would resize to 640x480 myself since that is usually the resolution considered FULL SCREEN for DivX/XviD ... but using 640x480 will require more bitrate than using a resolution of 512x384 ... so I guess it all depends on the file size you are shooting for.

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  21. I always capture with canopus 110 in DV avi, so when that import in VD mod i have this:

    Code:
    avisource("C:\Documents and Settings\Nenad\My Documents\Video 2.avi")
    Info()


    From that script i make these scripts(for compressing in virtualdub)

    Code:
    LoadPlugin("Convolution3d.dll")
    LoadPlugin("LeakKernelDeint.dll")
    avisource("C:\Documents and Settings\Nenad\My Documents\Video 2.avi")
    Trim(0,3442)
    ConvertToYuY2()
    LeakKernelDeint(Order=0,sharp=false)
    LanczosResize(640,480)
    crop(8,4,-8,-12)
    Convolution3D (1, 32, 128, 8, 32, 10, 0) 
    AddBorders(8,8,8,8)
    Code:
    LoadPlugin("DeGrainMedian.dll")
    LoadPlugin("LeakKernelDeint.dll")
    avisource("C:\Documents and Settings\Nenad\My Documents\Video 2.avi")
    Trim(0,3442)
    ConvertToYuY2()
    LeakKernelDeint(Order=0)
    LanczosResize(640,480)
    crop(8,4,-8,-12)
    degrainmedian()
    AddBorders(8,8,8,8)
    I changed resolution to 640x480. How now looks scripts, and how to add little sharpening?
    Quote Quote  
  22. Not correct.
    You are converting to YUY2 interlaced material in these scripts. Because your converting line is before the deinterlacing line.
    Now if I go to make them they should look as follows:
    Code:
    LoadPlugin("Convolution3d.dll")
    LoadPlugin("LeakKernelDeint.dll")
    avisource("C:\Documents and Settings\Nenad\My Documents\Video 2.avi")
    Trim(0,3442)
    LeakKernelDeint(Order=0,sharp=true)
    ConvertToYV12()
    crop(8,4,-8,-12)
    Convolution3D (1, 32, 128, 8, 32, 10, 0)
    LanczosResize(634,464)
    AddBorders(8,8,8,8)
    Better get the YV12 version of Convolution3D from http://www.avisynth.org/warpenterprises
    name is convolution3Dyv12.
    The second script
    Code:
    LoadPlugin("DeGrainMedian.dll")
    LoadPlugin("LeakKernelDeint.dll")
    avisource("C:\Documents and Settings\Nenad\My Documents\Video 2.avi")
    Trim(0,3442)
    LeakKernelDeint(Order=0, sharp=true)
    ConvertToYV12()
    crop(8,4,-8,-12)
    degrainmedian()
    LanczosResize(634,464)
    AddBorders(8,8,8,8)
    To avoid further color space conversion in VDub use Fast Recompress. Thus all the steps would keep YV12.
    Quote Quote  
  23. When i first put LeakKernelDeint and then ConvertToYV12() i get this error:


    But when i first put ConvertToYV12() and than LeakKernelDeint that is OK.

    My dv avi material is RGB24, is there difference if i converttoyv12 or converttoyuy2?

    And one more, with sharp=true i dont see any sharpening in my film, maybe another metod?
    Quote Quote  
  24. Hmm, damned, your source is RGR24 and LeakKernelDeint support "only" RGB32.
    Then:
    Code:
    ...
    avisource("C:\Documents and Settings\Nenad\My Documents\Video 2.avi")
    Trim(0,3442)
    ConvertToYV12(interlaced=true)
    LeakKernelDeint(Order=0,sharp=true)
     ...
    ...
    for both scripts.
    sharp=true will preserve some more detail in the areas it deinterlace. It will not sharpen.
    Quote Quote  
  25. thanks for quick answers

    I am curios, why is better to use ConvertToYV12 instead ConvertToYuY2 ?
    Quote Quote  
  26. Because the output of XviD compressor is YV12. So you have convert only once - through Avisynth. Otherwise you convert twice -RGB24->YUY2->YV12. Less color space conversions - better quality. And the second - avisynth filters operate in YV12 a little bit faster.
    Quote Quote  
  27. thanks, i didnt know that xvid output YV12

    So, can i put ConvertToYV12() instead ConvertToYV12(interlaced=true). I think that i neednt interlaced=true ?

    And one more. I have Ok results with these scripts, but its little smoth. So where in scripts i can add little sharp filter?
    Quote Quote  
  28. Originally Posted by SerbianBoss
    So, can i put ConvertToYV12() instead ConvertToYV12(interlaced=true). I think that i neednt interlaced=true ?
    No. Well, I want to say it is not correct, but if you want - put it. You may have color issues.
    The logic of scripts follow the logic of events. You load the source. It is interlaced. Until deinterlacing it will stay interlaced. Correct is
    Deint()- you deinterlace
    ConverttoXXX() you convert the color space. (the color space conversion is interlaced=false by default)
    Or,
    ConvertToXXX(interlaced=true) - you convert interlaced source
    Deint() - you deinterlace
    The script is "executed" line by line.
    Originally Posted by SerbianBoss
    I have Ok results with these scripts, but its little smoth. So where in scripts i can add little sharp filter?
    Before addborders line seems OK for me.
    Quote Quote  
  29. yes i now understand why i must put ConvertToYV12(interlaced=true). So script looks like:

    Code:
    LoadPlugin("Convolution3d.dll")
    LoadPlugin("LeakKernelDeint.dll")
    avisource("C:\Documents and Settings\Nenad\My Documents\Video 2.avi")
    Trim(0,3442)
    ConvertToYV12(interlaced=true) //because source is interlaced,we must to put interlace=true
    LeakKernelDeint(Order=0,sharp=true) // now deinterlance it
    LanczosResize(640,480) // i found that script is faster when here is resizing(after deinterlance)
    crop(8,4,-8,-12)
    Convolution3D (1, 32, 128, 8, 32, 10, 0)
    //here some sharpen
    AddBorders(8,8,8,8)
    Which sharpen is good?
    Quote Quote  
  30. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    A note about Convolution3D ...

    The YV12 version is "crippled" in that it does no Temporal filtering as does the YUY2 version.

    Unless the YV12 version has been updated since I last downloaded it ...

    Probably a better denoiser for YV12 is the RemoveGrain filter using the 1 or 2 option meaning it would look like this in the script:

    RemoveGrain(mode=1) or RemoveGrain(mode=2)

    Mode 2 does more filtering than mode 1 and both are intended to be used with a progressive source (so it must be used AFTER you deinterlace in the script).

    - John "FulciLives" Coleman

    P.S.
    So using your last posted script it would look like this with RemoveGrain:

    Code:
    LoadPlugin("RemoveGrainSSE3.dll")
    LoadPlugin("LeakKernelDeint.dll")
    avisource("C:\Documents and Settings\Nenad\My Documents\Video 2.avi")
    Trim(0,3442)
    ConvertToYV12(interlaced=true) //because source is interlaced,we must to put interlace=true
    LeakKernelDeint(Order=0,sharp=true) // now deinterlance it
    LanczosResize(640,480) // i found that script is faster when here is resizing(after deinterlance)
    crop(8,4,-8,-12)
    RemoveGrain(mode=2)
    //here some sharpen
    AddBorders(8,8,8,8)
    You can get the RemoveGrain filter at the following website:
    http://www.avisynth.org/warpenterprises/
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  



Similar Threads

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