You can't change the frame size within the AVS script in potplayer.
+ Reply to Thread
Results 91 to 120 of 120
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.
-
The best aspect ratio is stretch video to fullscrImage
[Attachment 71086 - Click to enlarge]een and shrink the sides . like this
Can anyone make a just aspect ratio like the one on Panasonic tvs , pixel shader hsl that works with potplayer / mpc
Can you make a just aspect ratio like the one on Panasonic tvs
It stretches only the edges , the center of the image remains fullscreen in correct aspect ratio and you view the entire image without losing parts of the picture as in your stretch by keeping aspect ratio
Format JUST - Justifies the image by stretching it to the four corners on the screen. The middle of the image stays almost the same shape, however the sides of the image are stretched or shrunk more. This is recommended when you do not want to have black bars.
[Attachment 71087 - Click to enlarge]
it would be the same for 21:9 except the edges shrink instead. so its fullscreen stretch then shrink the side edgesLast edited by dunt; 20th May 2023 at 21:01.
-
There are already non-linear stretch filters like that. I consider it the worst. I get nauseated every time there's a horizontal panning shot.
-
As suggested by my mum, in the specific case of displaying a 4/3 video (=12/9) in fullscreen on a 16/9 monitor, an acceptable compromise might be to zoom-crop the video to 14/9.
You lose the edges of the picture, but there is no aspect ratio distortion and the lateral black bars to display are greatly reduced. -
hi, can you show of any that work with potplayer, it will be better than what is currently available, stretching the entire image to fit screen distorted, available in all players.
1. it fills entire screen---- bigger picture
2. no black bars
3. no distortion in middle screen (your focus)
4. you don't lose any picture, you see everything -
look here no nausea
https://www.youtube.com/watch?v=qJHxrAA1HYQ -
Last edited by dunt; 21st May 2023 at 02:40.
-
-
-
You don't strictly need a shader for this, just a player that supports custom zoom with crop to window.
In mpc-hc, you can adjust manually with numpad 9 (1, 5) OR you can set up a fixed Pan&Scan Preset. -
to zoom-crop 4/3 to 16/9, you need a zoom factor of 4/3=1.333.
In mpc-hc, this is called PnS/Zoom to Widescreen and his accessed via mpc-hc > View > Pan & Scan
to zoom-crop 4/3 to 14/9 the required zoom factor is 7/6=1.167, this can be saved as a custom PnS settings.
mpc-hc64.ini:
[Settings\PnSPresets]
Preset0=zoom to 14/9,0.500,0.500,1.167,1.167
Preset1=Zoom to Widescreen,0.500,0.500,1.333,1.333
Edit: An alternative is to use mpc-hc > View > Video Frame > Zoom 2
The zoom is a bit stronger than 14/9, it will apply in fullscreen for 4/3 videos (! the black bars must not be encoded in the video).Last edited by butterw; 23rd May 2023 at 06:42.
-
[QUOTE=butterw;2691080]to zoom-crop 4/3 to 16/9, you need a zoom factor of 4/3=1.333.
In mpc-hc, this is called PnS/Zoom to Widescreen and his accessed via mpc-hc > View > Pan & Scan
to zoom-crop 4/3 to 14/9 the required zoom factor is 7/6=1.167, this can be saved as a custom PnS settings.
mpc-hc64.ini:
[Settings\PnSPresets]
Preset0=zoom to 14/9,0.500,0.500,1.167,1.167
Preset1=Zoom to Widescreen,0.500,0.500,1.333,1.333
Edit: An alternative is to use mpc-hc > View > Video Frame > Zoom 2
The zoom is a bit stronger than 14/9, it will apply in fullscreen for 4/3 videos (! the black bars must not be encoded in the video).[
/QUOTE]Last edited by dunt; 16th Jun 2023 at 13:50.
-
Here's the solution for those of you who can't stand black borders:
https://arstechnica.com/gadgets/2023/05/this-months-6-most-intriguing-monitor-and-tv-tech-debuts/
You can "unfurl" the screen to get the aspect ratio that matches your source video.
Or much cheaper: paint the wall behind your TV black. You won't be able to tell the black part of the TV screen from the wall! -
A screen with a custom aspect ratio would only help if the input signal doesn't have the black bars encoded and the screen is installed with the correct (horizontal/vertical) orientation.
With an OLED* panel, a dark room and a large enough screen, black borders are probably not much of an issue, but the dark room in itself doesn't solve anything.
And many people aren't watching videos on a dedicated premium home-cinema setup, they might be using a phone, a laptop screen, or an entry-level IPS monitor close-up.
* Disclaimer: Black bar burn-in might actually be an issue with OLED depending on usage, but at least the black levels are good with OLED.Last edited by butterw; 1st Jun 2023 at 08:16.
-
For 4:3 it's usually better not to crop the top and bottom evenly (when zooming in) because the important stuff tends to be centered above the middle of the frame. Doing it manually with MPC-HC I'd generally zoom in with the "9" key until the borders are gone, then tap the "2" key 9 or 10 times while holding down Ctrl to move the picture down.
There's a script below for ffdshow's Avisynth filter that does much the same thing. It should work in Potplayer's Avisynth filter too, although apparently even Potplayer still only supports 8 bit video for it's Avisynth filter. Instead of using the FrostyBorders function to do the work it uses CropResize, but both scripts can add plain black borders instead of frosty ones.
The stuff that has to be added to ffdshow's Avisynth filter lets you set a range between which no borders are added and the function simply crops to 16:9 (the default range is 1.75 to 1.79) and you can also set a minimum and maximum aspect ratio according to the size of the borders you can tolerate before the script starts cropping picture. The defaults are 1.55:1 to 2:1. If the script has to crop picture from the height, one third of whatever it crops is cropped from the top and two thirds from the bottom. The sides are always cropped equally.
The defaults for a 4:3 video on a 16:9 display look like this (ignore the few grey lines bottom/centre, it's just VirtualBox's toolbar not hiding completely).
Original 4:3 (full screen)
[Attachment 71505 - Click to enlarge]
Minimum DAR 1.55
[Attachment 71506 - Click to enlarge]
Minimum DAR 1.55 with default FrostyBorders
[Attachment 71507 - Click to enlarge]
Increasing the minimum DAR to 1.77
[Attachment 71508 - Click to enlarge]
The function for ffdshow is below (it has to be in the plugins folder along with CropResize). The stuff that needs to be copied and pasted into ffdshow's Avisynth filter is at the top of the script. Post #2 in the FrostyBorders thread has instruction for installing just the ffdshow raw video filter and adding it to MPC-HC, if you prefer that to a full ffdshow install.Last edited by hello_hello; 5th Jun 2023 at 10:17.
Avisynth functions - Audio Speed/Meter/Wave - CropPreview - CropResize - FixBlend.zip - Image/FrostyBorders - AnyResizer/CropResize MeGUI - Position.zip - Resize8 Mod
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