VideoHelp Forum


Try NordVPN to access Netflix or other streaming services from any country and also surf safely!
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. ImageBorders

    ImageBorders 2020-08-26.zip

    A function for adding images as borders to a video, rather than plain black borders.
    Standard usage is to specify a width and height, and the image(s) to be used for the borders, and the script resizes and adds the image borders as required.

    Border = ImageSource("Border.bmp")
    ImageBorders(640,360, Border)




    A = AVISource("Video.avi").Trim(476,476)
    ImageBorders(640,360, A, Stretch=false)




    A = ImageSource("Elvis1.png")
    B = ImageSource("Elvis2.png")
    ImageBorders(640,360, A, B, InDAR=4.0/3.0)
    Picture courtesy of amaipaipai.




    FrostyBorders

    Current version:
    - The argument names have been simplified. There's no longer separate arguments for pillarboxi and letterBox borders. For example, previously there were arguments named "Bright" and "BrightL", but now there's only "Bright".
    - Added TextureC argument for enabling chroma texture over the borders. It's disabled by default. The Texture argument for adding luma texture remains unchanged.
    - Added GPlugin argument (Grain Plugin). The default is GPlugin=1, which uses AddGrainC to add the border texture as before.
    GPlugin=2 uses neo_f3kdb. The Texture and TextureC arguments should produce roughly the same result for either plugin.
    FrostyBorders 2021-04-07.zip

    Previous version:
    Added Mod argument for specifying the picture width/height mod before adding borders.
    Added Info argument for displaying information such as picture and border size over the video.
    There's an included wrapper function so Info=true can be enabled by simply preceding the function name with "i".
    iFrostyBorders()
    FrostyBorders 2020-08-26.zip

    Standard usage is to specify a width and height and the script resizes and adds FrostyBorders as required.
    FrostyBorders(832,468)

    For anamorphic sources, you can also specify the appropriate input display aspect ratio or sample aspect ratio along with the desired output width and height.
    FrostyBorders(832,468, InDAR=4.0/3.0)





    Last edited by hello_hello; 6th Apr 2021 at 16:24.
    Quote Quote  
  2. This is hopefully just a temporary version to work around what I think is a FastBlur bug.

    Link removed
    Last edited by hello_hello; 19th Jul 2019 at 06:45.
    Quote Quote  
  3. This should be a better fix for the mod8 width problem, which may only be an Avisynth 2.6 issue. It's less restricted. See the "Mod8 Width Fix" text file in the zip file.

    Link removed

    There's also a new version of the standard version of the script in the opening post. Just some very minor tweaks.
    Last edited by hello_hello; 20th Jul 2019 at 07:04.
    Quote Quote  
  4. So it's possible the FastBlur mod8 width problem only effects CPUs that don't support SSE4.1 (FastBlur 0.1).

    I don't know why I didn't do it originally, but the "mod8 width fix" version of FrostyBorders now pads the borders to mod8 if need be, blurs them, then crops them back to the original width. The output should be the same as the standard version of the script and there's no longer any output width or height restrictions.

    Both versions of the script are in the zip file in the opening post, now dated 2019-07-20.
    Last edited by hello_hello; 20th Jul 2019 at 08:59.
    Quote Quote  
  5. Updated the FrostyBorders function and added the ImageBorders function to the thread. Both are dated 2020-03-26. There's links in the opening post.
    Quote Quote  
  6. I've uploaded a new version of the FrostyBorders function. It's dated 2021-04-07. There's a link in the opening post.
    Quote Quote  
  7. I fixed one problem and caused another. It hasn't been uploaded long so I haven't changed the version date, but I've fixed an oversight preventing the script from checking that any specified mod is correct for the source. If anyone has downloaded FrostyBorders 2021-04-07 before reading this post, please download it again.
    Quote Quote  
  8. Would you be able to feather the edges between the video and the boarders? I have attached 2 pictures. One is how the script acts now, and the other is the desired effect.

    jagabo was able to achieve this effect in his script. I have posted his below.


    Code:
    uncropped = potplayer_source()
    src = uncropped.Crop(8,0,-8,-0)
    
    ZOOM = 1.167
    
    Spline36Resize(src, int(uncropped.width*ZOOM)/2*2, int(uncropped.height*ZOOM)/2*2)
    Crop(0, (height-src.height)/4*2, -0, src.height)
    alpha = Overlay(BlankClip(last, color=$000000), BlankClip(last, color=$ffffff).Crop(16,0,-16,-0), x=16, y=0).ColorYUV(cont_y=50).PointResize(width/16*2, width).BilinearResize(width,height)
    bg = Spline36Resize(width/16*2,height/16*2).Blur(1.4).Blur(1.4).Blur(1.4).Spline36Resize(uncropped.height*16/18*2,uncropped.height).ColorYUV(gain_y=-50)
    Overlay(bg, last, x=(bg.width-width)/4*2, y=0, mask=alpha)
    Spline36Resize(uncropped.width, uncropped.height)
    
    float(uncropped.width)/float(uncropped.height) < 1.77 ? last : uncropped
    Image Attached Thumbnails Click image for larger version

Name:	current script.jpg
Views:	6
Size:	103.8 KB
ID:	59110  

    Click image for larger version

Name:	feather.jpg
Views:	7
Size:	102.2 KB
ID:	59111  

    Quote Quote  



Similar Threads