You can't change the frame size within the AVS script in potplayer.
+ Reply to Thread
Results 91 to 106 of 106
Thread
-
Hi jagabo, i’m using your script and it works great!
Code: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
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) -
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:
Code: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)
Code: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)
-
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. -
Replace the first argument to Overlay() with FastBlur(options):
Code:Overlay( FastBlur(8, iterations=3, dither=yes), \ Spline36Resize(width*3/4, height), \ x=(width-(width*3/4))/2, \ y=0)
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 18:26.
-
I believe i did it right:
Code: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
And if so, would you happen to have an idea how to implement this in this script? -
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).
-
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 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.
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 08:29.
-
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.
-
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:
Code: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)
Is this normal?
Would downscaling-blurring-upscaling reduce the CPU load a lot? with keeping the desired effect.
Thanks! -
I don't know why you would have a lot of banding. I don't see any. Add more grain to the fuzzy background.
-
I would like to thank you for taking the time to answer my questions and providing me with a great script jagabo! Thank you!
-
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
Code:AvsFilterSource() 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) Prefetch(4,8)
edit: Just realized that the latest version requires SVP Manager, use this.Last edited by ashketchum; 14th Nov 2022 at 05:24.
Similar Threads
-
Auto Crop Black Borders
By m00511 in forum Video ConversionReplies: 17Last Post: 4th Apr 2022, 22:03 -
FFMPEG - Black Borders - [Please help]
By 21dresden21 in forum Video Streaming DownloadingReplies: 2Last Post: 12th Feb 2019, 07:51 -
Fullscreen mode - Store settings per display?
By GD314 in forum Software PlayingReplies: 2Last Post: 6th Apr 2018, 16:55 -
Potplayer fullscreen mode without resizing or scaling
By gregory003 in forum Software PlayingReplies: 2Last Post: 18th Mar 2018, 00:05 -
How to remove open playlist bar in fullscreen mode?
By mikica90 in forum Software PlayingReplies: 4Last Post: 9th Apr 2016, 09:17