VideoHelp Forum

Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 45 of 45
  1. Member
    Join Date
    Jul 2007
    United States
    Search Comp PM
    Originally Posted by smrpix View Post
    Originally Posted by butterw View Post
    Couldn't bring myself to watch through those uninspired 16/9 music videos, but it's pretty clear they have nothing to do with the topic of this thread.
    If you don't understand the point in the context of this thread you started, you're beyond hope.
    I've wondered and commented on some of his myopic posts before and he's confirmed he/she has no understanding or appreciation of video or art.
    Quote Quote  
  2. Couldn't care less about your feelings about art. You guys post the same nonsense in every single thread.

    Please don't feel compelled to reply unless it is related to the topic of video player software.
    Quote Quote  
  3. No. there is nothing that automatically does what you want.
    Quote Quote  
  4. 1. The feature isn't required to be automatic.
    2. Be specific about which fullscreen non-black border fill modes you are referring to. I am assuming you mean blurred fill.
    3. Which video players/renderers have you tested ?
    Quote Quote  
  5. Mpv also has an option to set the screen background color, ex: gray160
    mpv --background=0.627 "video.mp4"
    Color can be specified as R/G/B each in the range [0, 1] or with hexadecimal color #ff00aa

    A few colors seem to work quite well.

    On my setup with non-daylight non-video-optimized monitor/windows settings, I've found that black16 (limited black) gives better results than the default black0 (tested with old black&white films).
    Quote Quote  
  6. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Deep in the Heart of Texas
    Search PM
    Off topic again: you can do what you want, and you might prefer it otherwise, but because:

    1. Detail & contrast are best preserved when there is something to contrast them against. IOW, you get the most out of your image when the image is set up properly on the display AND the background & environment are as close to totally BLACK as possible.

    2. It has been psychologically proven that, when letterboxing/pillarboxing is the same as the background environment, it is the least distracting. In absence of being exactly the same, BLACK (absence of light) is the next least distracting. Of course, if you follow #1, BLACK = background environment, so the best of both alternatives.

    There's opinion, and you can have a different opinion of whatever you like.
    And there's fact. The above are facts. Empirically/experimentally & formulaically provable and repeatable scientific facts.

    But have fun finding a player to do what you want. Personally, I think you'll have the easiest time (w/o re-encoding) by going the AVISynth script route.

    Quote Quote  
  7. Some players, like PotPlayer, let you apply an AviSynth script to any video that's playing. A 4:3 video pillarboxed on a stretched, blurred, darkened, 16:9 background:

    [Attachment 56032 - Click to enlarge]
    Quote Quote  
  8. Print "Good luck with that!"
    "Well, my days of not taking you seriously are certainly coming to a middle."
    Quote Quote  
  9. @Cornucopia: What you state are valid theoretical considerations. But the issue in practice is that PC monitors can be quite poor at displaying black0.
    Outside of movie watching, least distracting is not necessarily desired also.

    @jagabo: are you using the FrostyBorders script ?
    Quote Quote  
  10. Originally Posted by butterw View Post
    @jagabo: are you using the FrostyBorders script ?
    No, I used my own. It was a little tricky because PotPlayer doesn't allow (as far as I could tell) the script to enlarge the frame. So I had to keep the original 720x480 frame (4:3 DAR) of the AVI source. To get it to display as 16:9 I had to force the DAR in the player.

    Overlay(Spline36Resize(16,12).Spline36Resize(width,height).ColorYUV(gain_y=-50), Spline36Resize(width*3/4, height), x=(width-(width*3/4))/2, y=0)
    The crop was to remove small black borders in the original 720x480 video. For the blurry background I downscaled the source and upscaled back to the original size, then darkened it a little. I had to downscale the original video to make it display as 4:3 when the 720x480 frame was stretched to 16:9 by PotPlayer, then it was overlaid (centered) over the blurry background.


    I just noticed the black border at the right edge of the frame and saw the bug in the script:

    src = potplayer_source()
    Crop(src, 8,0,-8,-0)
    Overlay(Spline36Resize(16,12).Spline36Resize(src.width,src.height).ColorYUV(gain_y=-50), Spline36Resize(width*3/4, height), x=(src.width-(width*3/4))/2, y=0)
    Last edited by jagabo; 1st Dec 2020 at 21:00.
    Quote Quote  
  11. According to the changelog, this avisynth directshow filter: now has the ability to resize the frame.

    EDIT: From what I understand, your script doesn't use a gaussian blur, but instead relies on downscaling to a low resolution of (16x12, ratio of 40). There are some artifacts but it's very fast. The result has much more artifacts if a higher downscaled resolution is used, w=16, h=12 have some restrictions(must be mod-2, lower values causes crashes).
    I was thinking of using a soft cubic method (bspline) to resize the background, which may be preferable ?
    src.BicubicResize(w, h, b=1, c=0).BicubicResize(src.width, src.height, b=1, c=0)
    Last edited by butterw; 2nd Dec 2020 at 05:48.
    Quote Quote  
  12. Note that this script is running within PotPlayer. It's not an external script. That allows the script to be applied to whatever video PotPlayer is playing. Hence, the problem isn't that AviSynth can't change the frame size, it's that PotPlayer still uses the frame size of the video it's playing. If you enlarge the frame from 720x480 to 856x480 in AviSynth Potplayer will only use the left 720x480 and you will lose the right edge of the picture.

    You can use whatever downscale size you want. You can combine downscaling with blurring to get faster processing than blurring the full frame. For example: Spline36Resize(32,24).Blur(1.4).Blur(1.4).Blur(1.4 ).Spline36Resize(src.width,src.height) delivers less artifacts but is still fast.

    Instead of using a fixed downscaled frame size you can use a size relative to the source: Spline36Resize(width/16*2,height/16*2). Note that "/16*2" assures that you will get a mod2 frame size that's about1/8 the original. If you really want to use odd frame sizes you can convert to YV24 or RGB first, then back to YV12 later.

    src = potplayer_source()
    Crop(src, 8,0,-8,-0)
    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)
    [Attachment 56043 - Click to enlarge]

    Even with a 1440x1080 source I'm only getting 2 percent CPU usage.

    In any case, this was a proof-of-concept example. You can do whatever processing you want. I would never do this.
    Quote Quote  
  13. avisynth_filter works the same but can change the source frame size, at least in mpc-hc/be.
    This has the added benefit that you can also bypass the software player resizer.
    Quote Quote  
  14. 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)

    From my testing Portrait mode video would benefit most from this type of blurred background.

    If a moving background is undesirable, a high quality static blurred image could be used instead:
    bg = ImageSource("blurred_image", 0, src.FrameCount-1)
    Quote Quote  
  15. With mpv portable_config/scripts/autocrop.lua: All black borders are automatically cropped.

    It's based on ffmpeg cropdetect which feeds the parameters to crop vf.
    Quote Quote  

Similar Threads