VideoHelp Forum

+ Reply to Thread
Page 4 of 4
FirstFirst ... 2 3 4
Results 91 to 106 of 106
  1. You can't change the frame size within the AVS script in potplayer.
    Quote Quote  
  2. Hi jagabo, i’m using your script and it works great!
    src = potplayer_source()
    Crop(src, 8,0,-8,-0) # assuming ITU cap
    Overlay(Spline36Resize(width/16*2,height/16*2).Blur(1.4).Blur(1.4).Blur(1.4).Spline36Resize(src.width,src.height).ColorYUV(gain_y=-50), Spline36Resize(width*3/4, height), x=(src.width-(width*3/4))/2, y=0)
    float(src.width)/float(src.height) < 1.77 ? last : src
    But i'm getting some blocking/posterization artifacts.
    I would like to use your script and Fastblur and AddgrainC.
    This is a quote from butterw in this thread.

    To avoid blocking/posterization artifacts (with the live-updated blurred background):
    - use a higher downscaled resolution
    w, h: src resolution/4*2
    or w, h = 256
    - use bspline resizer (smooth cubic)
    - use external plugins Fastblur and Addgrain (used by FrostyBorders)
    Fastblur is a stronger adjustable gaussian blur + it also has a dithering option.
    Addgrain noise helps mask artifacts.

    bg = src.BicubicResize(w, h, b=1, c=0).ColorYUV(gain_y=-30).FastBlur(8, iterations=3, dither=yes).BicubicResize(1920, 1080, b=1, c=0).AddGrain(var=2.0)
    Do you have any idea how i can merge your script and add this part from butterw's post to avoid blocking/posterization?
    Quote Quote  
  3. Put AddGrain(var=2.0) at the end of the script to add grain to the entire output frame. If you want it only on the fuzzy background add it at the end of the first argument to Overlay:

    Overlay(Spline36Resize(width/16*2,height/16*2).Blur(1.4).Blur(1.4).Blur(1.4).Spline36Resize(src.width,src.height).ColorYUV(gain_y=-50).AddGrain(var=2.0), Spline36Resize(width*3/4, height), x=(src.width-(width*3/4))/2, y=0)
    For only the main image add it to the end of the second argument to Overlay:

    Overlay(Spline36Resize(width/16*2,height/16*2).Blur(1.4).Blur(1.4).Blur(1.4).Spline36Resize(src.width,src.height).ColorYUV(gain_y=-50), Spline36Resize(width*3/4, height).AddGrain(var=2.0), x=(src.width-(width*3/4))/2, y=0)
    Quote Quote  
  4. Great, thanks!
    Do you also know how to replace the blur so it will use FastBlur?
    Fastblur is a stronger adjustable gaussian blur + it also has a dithering option.
    Quote Quote  
  5. Replace the first argument to Overlay() with FastBlur(options):

    Overlay( FastBlur(8, iterations=3, dither=yes), \
            Spline36Resize(width*3/4, height), \
            x=(width-(width*3/4))/2, \
    I also noticed there was a bug in the x position of the overlay. It used src.width but it should have been just width. I fixed it here.

    Note that the other script you referred to downscaled the video, used FastBlur, then upscaled the video.
    Last edited by jagabo; 3rd Sep 2022 at 19:26.
    Quote Quote  
  6. I believe i did it right:
    src = potplayer_source()
    Crop(src, 8,0,-8,-0) # assuming ITU cap
    Overlay(FastBlur(8, iterations=3, dither=yes).Spline36Resize(src.width,src.height).ColorYUV(gain_y=-50).AddGrain(var=2.0), Spline36Resize(width*3/4, height), x=(width-(width*3/4))/2, y=0)
    float(src.width)/float(src.height) < 1.77 ? last : src
    Would donescaling, use Fastblur, and upscaling help with the blocking/posterization?
    And if so, would you happen to have an idea how to implement this in this script?
    Quote Quote  
  7. Downscaling-blurring-upscaling is used to produce the fuzzy left/right edges. Is that where you are seeing blocking and posterization? If you have a blocky posterized source you need to deal with it before adding fuzzy borders. Maybe with deblock_qed and GradFun3. Using a less sharp resizer like BilinearResize for the second argument (the unfuzzed part of the image) may help too (sharp resizers like Spline36 enhance block edges).
    Quote Quote  
  8. The sources are dvd remuxes of cartoons, i just want the smoothes blur and grain on the left and right side as possible.
    i think what i have now is already great, but i would like to know if Downscaling-blurring-upscaling would take it even further.
    or changing Spline36Resize for BicubicResize like butterw suggested would make a difference.
    He also states:
    to improve performance downscale the source before bluring: either to 256x256 or to half-resolution
    I don't have a preformance drop so maybe downscaling wouldn't benefit here.

    I also noticed there was a bug in the x position of the overlay. It used src.width but it should have been just width. I fixed it here.
    I changed it to width but now the rightside bar is wider then the left side and the picture isn't centered.
    When changed back to src.width it works, so i don't think there was a bug.
    Last edited by Desz5; 4th Sep 2022 at 09:29.
    Quote Quote  
  9. deleted
    Last edited by Desz5; 4th Sep 2022 at 14:52.
    Quote Quote  
  10. The point of downscaling before blurring then upscaling after is to get more blur without increasing CPU usage too much. Very large radius blurs can take a lot of CPU power, the time taken typically increases with the square of the radius. By downscaling first you can use a smaller radius blur. If you find you can get the amount of blurring you want, without excessive CPU usage, without the down/up scale, then you don't need it.
    Quote Quote  
  11. I would like to have a blur of 40, but using Overlay(FastBlur(40, iterations=3, dither=yes) results in a lot of banding.
    To reduce this i added FastBlur twice, with both the amount of 20.
    The blur is now exactly where i would want it:
    Overlay(FastBlur(20, iterations=3, dither=yes).Spline36Resize(src.width,src.height).ColorYUV(gain_y=-50).FastBlur(20, iterations=3, dither=yes).AddGrain(var=0.0), Spline36Resize(width*3/4, height), x=(src.width-(width*3/4))/2, y=0)
    But like you said, the CPU without the script runs at approx 6% and with the script it runs at 26%.
    Is this normal?
    Would downscaling-blurring-upscaling reduce the CPU load a lot? with keeping the desired effect.
    Quote Quote  
  12. I don't know why you would have a lot of banding. I don't see any. Add more grain to the fuzzy background.
    Quote Quote  
  13. Strange, but is 26% CPU normal for an AviSynth script?
    Quote Quote  
  14. There's nothing unusual about 26% CPU usage when using AviSynth. How much CPU usage you get depends on the filters used and the properties of the video. You can get anywhere from 0 to 100 percent.
    Quote Quote  
  15. I would like to thank you for taking the time to answer my questions and providing me with a great script jagabo! Thank you!
    Quote Quote  
  16. Its possible to fill black borders using SVPflow. I have MPC-HC, AviSynth+ and AviSynth Filter. To fill pilar boxes in 4:3 video I use this code

    super = SVSuper("{gpu: 1}")
    vectors = SVAnalyse(super, "{}")
    SVSmoothFps(super, vectors, "{rate: {num: 2}, algo: 23, light: {aspect: 1.77, sar: 1.0, zoom: 0.0, lights: 32, length: 100, cell: 4.0, border: 12}}", mt=4)
    If you don't need frame interpolation change "num: 2" to "num: 1". The documentation is here. The only problem is I can't make perfect 16:9 no matter what I type as the "aspect" parameter. Its 848x480 or 856x480 instead of 854x480. Maybe someone will find a fix.

    edit: Just realized that the latest version requires SVP Manager, use this.
    Image Attached Thumbnails Click image for larger version

Name:	svpflow light.png
Views:	18
Size:	871.6 KB
ID:	67608  

    Last edited by ashketchum; 14th Nov 2022 at 06:24.
    Quote Quote  

Similar Threads