VideoHelp Forum
+ Reply to Thread
Results 1 to 29 of 29
Thread
  1. Hi please can you help a cat?

    I wonder: meanwhile virtualdub have a checkbox that you specify your is a interlaced source

    Click image for larger version

Name:	VDINT.jpg
Views:	2042
Size:	92.7 KB
ID:	27629

    I cannot find this "option" in avisynth

    for example I do:

    Code:
    Yadif(1,1)
    LanczosResize(720,576)
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
    but in wich way I can tell to avisynth that my source in interlaced so that it have to considering it when resize? thanks
    Quote Quote  
  2. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by marcorocchini View Post
    I wonder: meanwhile virtualdub have a checkbox that you specify your is a interlaced source

    Image
    [Attachment 27629 - Click to enlarge]


    I cannot find this "option" in avisynth

    for example I do:

    Code:
    Yadif(1,1)
    LanczosResize(720,576)
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
    but in wich way I can tell to avisynth that my source in interlaced so that it have to considering it when resize? thanks
    You don't. Avisynth doesn't recognize interlace flags, and neither does VirtualDub. You have to specify with both.

    Why are you using lanczos? It sucks.
    http://hermidownloads.craqstar.de/videoresizefiltercomparasion/
    http://web.archive.org/web/20060827184031/http://www.path.unimelb.edu.au/~dersch/inter...erpolator.html
    - My sister Ann's brother
    Quote Quote  
  3. I don't know why I'm use Lanczos: I notice that in virtualdub, using the lanczos and the checked "interlaced" box--> quality of resize is "good", but if I uncheck the "interlaced" option I see some artifacts in details of image

    Now I'm wondering if also avisynth have a similar option ... e.g. lanczosresize(720,576, interlaced=true) or something of that.

    However in avisynth I use the IResize function and is similar to the use of Lanczos+Interlaced (as shown above) of virtualdub.

    Is it a better way? thanks
    Quote Quote  
  4. That virtualDub resize filter is Lee's resize filter, it considers interlace out as well. But internally I am not sure how it is being done. You should have video progressive to resize and re-interlace it again. Donald Graft wrote "smart resize" filter based on that Lee's resize, so maybe it is almost the same, it looks like this, I used to use this for a while:
    Code:
    Import("C:\.................\vdub_filters.avsi")                                            
    AviSource("C:\..............\60i.avi", audio = false)                                               
    LoadVirtualdubPlugin("C:\.....\Resize.vdf", "_VD_SmartResize")                  
    VD_SmartResize(720, 480 , true, false, 720, 480 , "p_bicubic")
    so you can "read" that avsi and study how it is being done, what is happening "behind scenes" or to use that resize in Avisynth as well,

    but I found iResize better than this, not knowing of any shortcut to not bother to double frame rate de-interlace it first ...
    Quote Quote  
  5. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by marcorocchini View Post
    Now I'm wondering if also avisynth have a similar option ... e.g. lanczosresize(720,576, interlaced=true) or something of that.
    The interlace parameter isn't available.

    Originally Posted by marcorocchini View Post
    However in avisynth I use the IResize function and is similar to the use of Lanczos+Interlaced (as shown above) of virtualdub.
    No it isn't. The iResize script uses Spline36ReSize, not Lanczos.

    Originally Posted by marcorocchini View Post
    Is it a better way? thanks
    Check the links I posted and judge for yourself.
    - My sister Ann's brother
    Quote Quote  
  6. mm,

    can I use in avisynth the VDMod_resize.vdf resize filter of virtualdub?
    Quote Quote  
  7. Originally Posted by marcorocchini View Post
    Now I'm wondering if also avisynth have a similar option ... e.g. lanczosresize(720,576, interlaced=true) or something of that.
    VirtualDub does the equivalent of this:

    Code:
    SeprateFields().LanczosResize(desired_width, half_desired_height).Weave()
    That looks ok if your source isn't very sharp. But if you have a sharp horizontal edges you get bad ringing artifacts and doubled edges. An example:

    https://forum.videohelp.com/threads/334812-AVS-File-Steps?p=2077875&viewfull=1#post2077875

    You can reduce the ringing artifacts by using a less sharp resizer. But the doubled edges can't be completely eliminated. It's better to do something like QTGMC().Resize().Reinterlace().
    Last edited by jagabo; 22nd Sep 2014 at 13:09.
    Quote Quote  
  8. ok, but in general: can I use the virtualdub resize plugin in avisynth? in this case I'm curios, is possible, to use the virtualdubMOD resize plugin into avisynth
    Quote Quote  
  9. Originally Posted by marcorocchini View Post
    can I use the virtualdub resize plugin in avisynth?
    No. VirtualDub's internal filters cannot be used in AviSynth.
    Quote Quote  
  10. but I have a "external" .vdf filter, in this case can I use it in avisynth?
    Quote Quote  
  11. Originally Posted by jagabo View Post

    Code:
    SeprateFields().LanczosResize(desired_width, half_desired_height).Weave()

    so the script become this? (C0035.mxf is a SD clip that I should convert in HD 1920x1080)

    LoadCPlugin("C:\Program Files\AviSynth\plugins\yadif.dll")
    FFVideoSource("C:\Users\Administrator\Desktop\upsc ale\C0035.MXF")
    ConvertToYUY2(interlaced=true)
    crop(0,32,0,0)
    Yadif(1,1)
    SeprateFields().LanczosResize(1920, 540).Weave()
    AssumeFPS(25)

    but I get an error, how I have to modify it? consider source is interlaced, thanks
    Quote Quote  
  12. there is "a" missing in SeparateFields()
    Quote Quote  
  13. so how have to change this catscript?^^
    Quote Quote  
  14. You don't use yadif before if you are using separatefields().LanczosResize(1920, 540).Weave()

    That vdub interlaced resize method resizes fields, you don't bob deinterlace before. That's why it produces worse results - the even/odd vertical field offset isn't taken into account. Proper way is to smart bob deinterlace first
    Quote Quote  
  15. bob deinterlace first? mmm

    so how can I change it?

    FFVideoSource("C0035.MXF")
    ConvertToYUY2(interlaced=true)
    crop(0,32,0,0)
    bob(1,1)
    SeprateFields().LanczosResize(1920, 540).Weave()
    AssumeFPS(25)


    and: the converttoyuy2(interlaced=true) is correct before of all? thanks
    Quote Quote  
  16. No deinterlace, no bob, no yadif. If you are simulating using vdub method, erase that line


    Code:
    FFVideoSource("C0035.MXF")
    AssumeFPS(25)
    ConvertToYUY2(interlaced=true)
    crop(0,32,0,0)
    SeparateFields().LanczosResize(1920, 540).Weave()
    Quote Quote  
  17. Code:
    FFVideoSource("C:\Users\Administrator\Desktop\upscale\C0037.MXF")
    ConvertToYUY2(interlaced=true)
    
    ColorMatrix(mode="Rec.709->Rec.601")
    
    SeparateFields().LanczosResize(720, 288).Weave()
    AssumeFPS(25)
    I have try with this similar, but there is a problem: image seems to vibrate slightly during playback

    usually, for example, when I resize in avisynth in this mode:

    LoadCPlugin("C:\Program Files\AviSynth\plugins\yadif.dll")
    FFVideoSource("d:\xdcamF335\c0013.mxf")
    #ColorMatrix(mode="Rec.709->Rec.601")


    Yadif(1,1)
    GaussResize(1920,1080)
    AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()

    AssumeFPS(25)

    ConvertToYUY2(interlaced=true)


    maybe is missing something that do the correct interlacing?
    Quote Quote  
  18. what is default in Avisynth ? bff or tff?? Better use assumetff() if you manipulate with interlaced footage, before that separatefields()

    but anyway, I jumped to IResize for now, post #4, I used that resize.vdf in Avisynth (no bob deinterlace there) , and that VD filter does perhaps things even better than that simple Avisynth line
    Last edited by _Al_; 22nd Sep 2014 at 15:19.
    Quote Quote  
  19. Originally Posted by marcorocchini View Post
    I have try with this similar, but there is a problem: image seems to vibrate slightly during playback
    That's why quality is lower. Don't simply resize fields - quality will be worse
    Quote Quote  
  20. When you upscale, it's even more important to use a good deinterlacer, otherwise you upscale deinterlacing artifacts, jaggies . Going down choice of deinterlacer is less important because deinterlacing artifacts are scaled down, less visible. You also might want to consier nnedi3_rpow for upscaling

    Also when going up, use colormatrix 601 to 709
    Quote Quote  
  21. ok, I use only the IResize but is a little slow, hoewver can I enclose the function of iresize in a external file (a .avsi file?) and "load" as "plugin" as well as, for example, yadif.dll?

    Code:
    FFVideoSource("c:\gopro25FPS.mp4")
    ColorMatrix(mode="Rec.709->Rec.601")
    IResize(720,576)
    
    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()
    AssumeFPS(25)
    
    ConvertToYUY2(interlaced=true)
    Quote Quote  
  22. Originally Posted by marcorocchini View Post
    ok, I use only the IResize but is a little slow, hoewver can I enclose the function of iresize in a external file (a .avsi file?) and "load" as "plugin"
    You've been using AviSynth this long and you have to ask that? Why don't you just try it?

    IResize is not much of an improvement over a simple SeparateFields().Resize().Weave(). Try it on the image in the link I posted.
    Quote Quote  
  23. I like integrate the sharpen(0.20) into the IResize so that the IResize function becomes:

    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().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()} 
    but is this correct?
    Quote Quote  
  24. Name:  crazy-cat.gif
Views: 1205
Size:  895.0 KB
    Code:
    import("C:\Program Files\AviSynth\plugins\IResize.avsi")
    FFVideoSource("C:\Users\Administrator\Desktop\farfalle miao\C0037 fullhd .MXF")
    ConvertToYUY2(interlaced=true)
    src = last 
    src = src.width==720&&src.height==608?src.crop(0,32,0,0):src 
    src = src.width==1920 && src.height==1088 ? src.crop(0,0,1920,1080): 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.framerate<26 ? src:src.AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave() 
    AssumeFPS(25)
    ChangeFPS(25)
    Quote Quote  
  25. Marco - Your trolling is class for itself - i can't even imagine someone better... free beer from my side if we ever have opportunity to drink it!
    Quote Quote  
  26. Member Alex_ander's Avatar
    Join Date
    Oct 2006
    Location
    Russian Federation
    Search Comp PM
    That function just compensates for vertical shift errors - compared to the simple separatefields.resize.weave method. The second problem remains: when you resize separated fields, vertically you can only move objects by 2-line steps of original image. This means that edges of resized objects never get into lines of the missing field. If original image is sharp enough, this can give noticeable distortion of horizontal edges to the objects in picture (be it still or with motion between fields). Therefore, the methods of 'smartbob.resize.reinterlace' type, while not as fast, are generally preferable (most smart bob functions use both fields at deinterlacing). Example:
    Code:
    ......................
    TDeint(mode=1)# not too slow smart bob; or yadif could be used here, not Bob()
    Spline36Resize(1920,1080)
    AssumeTFF().SeparateFields()
    SelectEvery(4,0,3).Weave()# TFF
    Last edited by Alex_ander; 23rd Sep 2014 at 08:35.
    Quote Quote  
  27. Originally Posted by pandy View Post
    Marco - Your trolling is class for itself - i can't even imagine someone better... free beer from my side if we ever have opportunity to drink it!
    ?

    I've found another post of poison in wich he write that a function can me recalled with import(xyz.avsi) and.. magically work.

    Are u a cat?
    Quote Quote  
  28. *.AVSI files in AviSynth's plugins folder should be loaded automatically every time AviSynth is invoked. So you don't need to explicitly import them.
    Quote Quote  
  29. Originally Posted by marcorocchini View Post
    Originally Posted by pandy View Post
    Marco - Your trolling is class for itself - i can't even imagine someone better... free beer from my side if we ever have opportunity to drink it!
    ?

    I've found another post of poison in wich he write that a function can me recalled with import(xyz.avsi) and.. magically work.

    Are u a cat?
    Once again - i believe that smart trolling is a kind of art and You are real ARTIST - first class and i'm not trying to insult You. Well Done Sir!

    Nope i'm not a cat - i like cats from a safe distance as some people says: "You can be a dog owner by in case of cats You are always own by a cat".
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!