Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#81 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,981
|
You're welcome.
I've been watching some 4:3 animation with the updated borders and they're much better for that. Because animation has lots of areas of a single color, they were prone to changing too quickly when something with a sold color got too close to the edge of the picture, but they're much better now. Changing them was a good idea, and something I should have thought of myself, although the way they were created was left-over from the days before FastBur existed and the blurring was done with a resizer. |
![]() |
![]() |
![]() |
#82 | Link |
Registered User
Join Date: Aug 2016
Posts: 804
|
In the end I still found myself subjectively preferring
Code:
FrostyBorders(Clone=1, Blur=height/18, VBlur=height/18, Cont=0.5, TSoft=7, InDAR=0.0) Code:
Video = last.LanczosResize(720,540) FastBlur(200,100,3,dither=true) Overlay(FlipHorizontal(), Opacity=0.5) StackHorizontal(Crop(0,0,-600,0), Crop(600,0,0,0)) ConvertBits(dither=1, dither_bits=6) AddGrainC(8, constant=true) # can be reduced to 4/2 or removed if desired - still minimal posterisation Tweak(Cont=0.5, dither_strength=10.0) CLR = 8 # pixels to crop off left and right StackHorizontal(Crop(0,0,-120+CLR,0), Video.Crop(CLR,0,-CLR ,0), Crop(120-CLR ,0,0,0)) Last edited by flossy_cake; 6th January 2025 at 17:04. |
![]() |
![]() |
![]() |
#83 | Link | |
Registered User
Join Date: Aug 2016
Posts: 804
|
Quote:
|
|
![]() |
![]() |
![]() |
#84 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,981
|
The brightness fluctuations, at least for the default borders, are caused by something brighter than the majority of the picture getting too close to one of the sides. The only way to settle it down is to blur more of the picture into the borders so it averages out more, or limit the contrast etc, as the picture cropped from the sides for the borders isn't very wide, maybe only 16 pixels worth for a SD source. Those 16 pixels are then stretched to the border width, so if the edge of the picture changes it can potentially change the border brightness quite a lot.
For your script above, line 4 should give you a 240 pixel wide video. StackHorizontal(Crop(0,0,-600,0), Crop(600,0,0,0)) The last line really just splits the borders in half and joins them back together, if you ignore the 8 pixels of cropping. By that I mean.... this: StackHorizontal(Crop(0,0,-600,0), Video, Crop(600,0,0,0)) produces the same output as this: StackHorizontal(Crop(0,0,-600,0), Crop(600,0,0,0)) StackHorizontal(Crop(0,0,-120,0), Video, Crop(120 ,0,0,0)) So you know, there was only one reason to crop the video for the borders twice, and that was to apply temporal softening, because TemporalSoften can't detect scene changes accurately when it's only softening the borders. The more of the picture it sees, the more accurate it's scene change detection can be. So, the idea was to crop enough for TemporalSoften to detect scene changes accurately without it having to soften the entire picture, as that's the slow part of the process, and then crop again to take the pixels for the borders. In other words, if you're not temporal softening you probably only need to crop once. This is probably closer to the amount of picture actually used for the default borders (assuming the source width is 720). I only cropped each border once as I didn't include TemporalSoften. Thinking about it, if you blend with Opacity=0.5 there's no need to crop both left and right borders because they'll be the same anyway. You could just crop one side of the picture and resize it appropriately for each border, assuming they're not always the same width. Code:
Video = last.LanczosResize(720,540) Video.FastBlur(30,54,3,dither=true) Overlay(FlipHorizontal(), Opacity=0.2) Left = Crop(0,0,-704,0).Tweak(Cont=1.0, dither_strength=10.0).ConvertBits(dither=1, dither_bits=6) Right = Crop(704,0,0,0).Tweak(Cont=1.0, dither_strength=10.0).ConvertBits(dither=1, dither_bits=6) Left = Left.GaussResize(120,540).AddGrainC(8, constant=true) Right = Right.GaussResize(120,540).AddGrainC(8, constant=true) StackHorizontal(Left, Video, Right) Also, if there's pixels of black at the sides that need to be cropped, it's probably easier/safer to crop them first. That way they can't be blurred into the borders. Something like this would be similar to what the function does when it's cropping. Code:
Video = last.LanczosResize(720,540).Crop(8,0,-8,0) Video.FastBlur(200,100,3,dither=true) Overlay(FlipHorizontal(), Opacity=0.2) Left = Crop(0,0,-696,0).Tweak(Cont=1.0, dither_strength=10.0).ConvertBits(dither=1, dither_bits=6) Right = Crop(696,0,0,0).Tweak(Cont=1.0, dither_strength=10.0).ConvertBits(dither=1, dither_bits=6) Left = Left.GaussResize(128,540).AddGrainC(8, constant=true) Right = Right.GaussResize(128,540).AddGrainC(8, constant=true) StackHorizontal(Left, Video, Right) Same as the first script, only with a bucket load of blurring. Code:
Video = last.LanczosResize(720,540) Video.FastBlur(200,100,3,dither=true) Overlay(FlipHorizontal(), Opacity=0.2) Left = Crop(0,0,-704,0).Tweak(Cont=1.0, dither_strength=10.0).ConvertBits(dither=1, dither_bits=6) Right = Crop(704,0,0,0).Tweak(Cont=1.0, dither_strength=10.0).ConvertBits(dither=1, dither_bits=6) Left = Left.GaussResize(120,540).AddGrainC(8, constant=true) Right = Right.GaussResize(120,540).AddGrainC(8, constant=true) StackHorizontal(Left, Video, Right) I'm not a fan of blending the borders together completely. I think it looks a bit more natural if they're a little independent, but that's just me. It's why I changed the default for Blend to 0.1 for the last version, to help compensate for the extra blurring making the borders less dynamic. For the record, not everyone was excited about the changes to the border defaults. ![]() https://forum.videohelp.com/threads/...e7#post2762998 I completely forgot that Tweak() was given the ability to dither. I should have been using it. Anyway, if you find something else you like I'm happy to try it. Cheers. Last edited by hello_hello; 14th January 2025 at 17:07. |
![]() |
![]() |
![]() |
#85 | Link | |
Registered User
Join Date: Aug 2016
Posts: 804
|
Quote:
It seems that doing the temporal soften on the blurred borders suppresses brightness fluctuations the most though, versus doing it to the whole frame before the blur. |
|
![]() |
![]() |
![]() |
#86 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,981
|
There's a link for FrostyBorders 2025-01-26 in the opening post.
The main change is the addition of a Gamma argument for adjusting the gamma of the borders (reducing the gamma to darken the borders seems to work better than reducing the brightness and contrast, at least to me). For the VapourSynth version the Bright argument now auto-scales according to bitdepth (I had foolishly assumed the Tweak function I borrowed from adjust.py would auto-scale as Avisynth's Tweak does). Last edited by hello_hello; 27th January 2025 at 18:22. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|