VideoHelp Forum
+ Reply to Thread
Page 4 of 4
FirstFirst ... 2 3 4
Results 91 to 120 of 120
Thread
  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!
    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
    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:

    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)
    For only the main image add it to the end of the second 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), 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):

    Code:
    Overlay( FastBlur(8, iterations=3, dither=yes), \
            Spline36Resize(width*3/4, height), \
            x=(width-(width*3/4))/2, \
            y=0)
    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:
    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
    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:
    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)
    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.
    Thanks!
    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

    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)
    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:	41
Size:	871.6 KB
ID:	67608  

    Last edited by ashketchum; 14th Nov 2022 at 06:24.
    Quote Quote  
  17. 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.Image
    [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 edges
    Last edited by dunt; 20th May 2023 at 22:01.
    Quote Quote  
  18. 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.
    Quote Quote  
  19. 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.
    Quote Quote  
  20. Originally Posted by jagabo View Post
    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.

    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
    Quote Quote  
  21. Originally Posted by jagabo View Post
    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.
    look here no nausea

    https://www.youtube.com/watch?v=qJHxrAA1HYQ
    Quote Quote  
  22. Originally Posted by butterw View Post
    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.
    please make a shader for this
    Last edited by dunt; 21st May 2023 at 03:40.
    Quote Quote  
  23. Originally Posted by dunt View Post
    Originally Posted by jagabo View Post
    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.
    look here no nausea

    https://www.youtube.com/watch?v=qJHxrAA1HYQ
    They were very careful to avoid panning shots and anything with a recognizable shape.
    Quote Quote  
  24. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by dunt View Post
    Originally Posted by jagabo View Post
    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.

    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
    Nausea for me as well.

    Video should not be butchered with streching, distortion of the proportions, etc. Black bars at top- bottom, left-right should be used instead.
    Quote Quote  
  25. Originally Posted by dunt View Post
    Originally Posted by butterw View Post
    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.
    please make a shader for this
    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.
    Quote Quote  
  26. 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 07:42.
    Quote Quote  
  27. [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 14:50.
    Quote Quote  
  28. 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!
    Quote Quote  
  29. 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 09:16.
    Quote Quote  
  30. 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)

    Image
    [Attachment 71505 - Click to enlarge]


    Minimum DAR 1.55

    Image
    [Attachment 71506 - Click to enlarge]


    Minimum DAR 1.55 with default FrostyBorders

    Image
    [Attachment 71507 - Click to enlarge]


    Increasing the minimum DAR to 1.77

    Image
    [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.
    Image Attached Files
    Last edited by hello_hello; 5th Jun 2023 at 11:17.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!