#215 AddBorders failed if TOP and BOTTOM are ZEROs

Filters (75)
Jian Jun Li

Let's try this script below:

DirectShowSource("test.mkv", fps=25, ConvertFPS=true)
Crop(124,110,-132,-114) # cuts some unnessary area, such as hard subtitles, letterbox, etc.
LanczosResize(560,256) # resize the video
AddBorders(60, 0, 60, 0) # <--- this line, when it is after LanczosResize(), causes the video failed, because TOP and BOTTOM are both ZEROs

# if it changes to this :
AddBorders(60, 0, 60, 2) # <--- this line works, seems it's because TOP and BOTTOM are NOT both ZEROs

and, this bug still remains in AviSynth v2.6 alpha series by my testing.


  • Jian Jun Li

    Jian Jun Li - 2013-01-28

    I checked the script again, yes, AddBorders(60, 0, 60, 0) goes wrong when it is AFTER LanczosResize(), and, on the other hand, if it's been put BEFORE LanczosResize(), it works well.

  • Ian Brabham

    Ian Brabham - 2013-01-29

    Sorry I cannot reproduce any noticable problem with AddBorders(). I tested with 2.5.8, the previous and the new Jan 14th,

    You do not actually state what is going wrong. Is it throwing an exception or is it corrupting the picture somewhere? Or some other problem? What am I looking for?

    Perhaps this is a DirectShow problem, to eliminate that please try this :-

    ColorBars(1920, 1080, "RGB32")
    AddBorders(60, 0, 60, 0)

  • Ian Brabham

    Ian Brabham - 2013-01-29
    • assigned_to: nobody --> ianb1957
    • milestone: 267420 --> v2.6x
    • status: open --> pending
  • Jian Jun Li

    Jian Jun Li - 2013-01-30
    • status: pending --> open
  • Jian Jun Li

    Jian Jun Li - 2013-01-30

    I've made a zip file about 4MB including a sample video and the scripts ( fails, and fine ), but how can I pass it to you ? The attached file by here just limited to 256K ...

    btw, when it's failed, there is nothing shown out, the video suspended, just gives me a black and blank face, no errors, no exeptions, no red text warning, nothing tell me.

    Oh, when video failed, the audio is pretty good.

    And, I've tested your codes, ColorBars(..) etc, it's failed too, just as my codes :-)

    I've tested the script by KMPlayer, PotPlayer, even MPC-HC, all failed as the same.

  • Ian Brabham

    Ian Brabham - 2013-01-30

    So is the problem best described as "The video playback hangs, but the audio continues normally"?

    If ColorBars() demonstrates the fault we have a much simpler case. (Always try to make the very simplest example of a problem)

    How much of my test script can you remove and still have the problem, i.e. does this fail :-

    ColorBars(560, 256, "YV12")
    AddBorders(60, 0, 60, 0)

    or this :-

    ColorBars(1920, 1080, "YV12")
    AddBorders(60, 0, 60, 0)

    Also what exact version of Avisynth.dll are you running?

    And do you have the problem when loading the script into VirtualDub, media players are not really the best venue for debugging avisynth scripts.

  • Jian Jun Li

    Jian Jun Li - 2013-01-31

    Thank's for your help, I think it's my Direct Show setting's problem. Before yesterday, all my testing videos are x264 format, so now I just made a standard Xvid AVI file, and when I set Xvid decoder to "ffdshow", the AddBorders() failed, and then I set the decoder to "Xvid & DivX", AddBorders() works fine, video and audio are prtty good ! So it's my fault, I'm sorry to make such troubles to you...

  • Ian Brabham

    Ian Brabham - 2013-01-31
    • assigned_to: ianb1957 --> nobody
    • status: open --> closed-works-for-me

Log in to post a comment.