VideoHelp Forum

+ Reply to Thread
Page 2 of 4
FirstFirst 1 2 3 4 LastLast
Results 31 to 60 of 99
Thread
  1. " Is it because you haven't changed the InDAR? If that's not correct and it's still InDAR=4.0/3.0, the script will assume the source is 4:3."

    Yes, you are correct, I did not change that. I didn't change the InDAR because I was under the assumption that it would not have to be changed manually. My fault...

    " It won't work for an anamorphic source such as a 16:9 DVD,"

    I'm not worried about 16 x 9 anamorphic sources from DVD files because I don't come across them frequently, if ever.

    "Source = potplayer_source()
    W = width(Source)
    H = height(Source)

    float(W) / float(H) >= 1.76 ? Source : \
    Source.FCropResize(Clone=true, Feather2=true)\
    .Crop43(W,H, 10,34,-10,-60, InDAR=15.0/11.0, OutDAR=16.0/9.0)"



    I'm happy to report that your script seems to work exactly the way I want! I'm sure I will come across something that would need to be configured, hopefully it's something that I can take care of, if not I will definitely report back here.

    As a side note, when I paste that script into pot player, pot player still needs to set the frame size to "stretch". This does not need to be done when using the FFDshow method.
    Although that really does not bother me, but I thought you'd like to know that was the result I was getting.

    Thank you for your time and patience with me and fine-tuning the script the way I would like it to be. Your knowledge of video scripting is highly appreciated! I will keep you updated on any anomalies that I find with your script.



    So just to recap, I would like to document the changes that were made to frostboarders so far

    added:
    • feathering
    • clone and mirror options for borders
    • restricting crop settings and frosty borders from being applied to native 16 x 9 videos. (Little to no user input is required when watching both old and current media!)
    • 720 X 480 videos sourced from DVDs have the correct aspect ratio applied, therefore frosty borders is able to correctly add the frosty borders to the video. (No more distorted main image!)
    Quote Quote  
  2. I've updated the FrostyBorders function to add the new border options discussed in recent posts. The new version is dated 2021-09-05 and there's a link in the opening post.

    thebib62,

    If you're still around I thought I'd let you know I changed the defaults for the Clone borders a little. They're blurred a little more with a bit more texture, because I think it looks better. The default values can be found in the help file.
    I also added a new argument "TSoft", for specifying how many frames either side of the current one are used for temporal softening (fewer frames is faster). The Clone borders can also be temporally smoothed now, but that's disabled by default.
    The new CropResize is still on the way. Hopefully I'll upload it tomorrow.
    Quote Quote  
  3. Originally Posted by thebib62 View Post
    As a side note, when I paste that script into pot player, pot player still needs to set the frame size to "stretch". This does not need to be done when using the FFDshow method.
    Although that really does not bother me, but I thought you'd like to know that was the result I was getting.
    Yeah that was expected, because PotPlayer won't let Avisynth resize, but that's why the CropResize OutDAR needs to be 16:9, so then when you set PotPlayer to display the video as 16:9 it'll have the correct DAR.

    I meant to ask, have you played around with ffdshow's presets? I ask because a preset can save each filter's configuration, including, I'm fairly sure, the syntax added to the Avisynth filter. And if you have ffdshow configured to display it's icon, you can easily enable or disable a filter or switch between presets with a couple of mouse clicks.

    Image
    [Attachment 60577 - Click to enlarge]
    Quote Quote  
  4. Yeah I'm still here, excited about the new crop resize, and I'll play with the new Tsoft argument when I have some time later today. The more options we have for frosty borders, the better.

    I did not know about the ability to switch FFDshow presets. I was able to figure that out, and in my search for making frosty borders as automated as possible, I found something that may be the answer to what I am looking for. I'm hoping that you would be able to implement the "preset autoload conditions" setting I found in FFDshow. If you scroll down, there is a option for on pixel aspect ratio match and picture aspect ratio match.

    Maybe you knew about this before, what do you think? Do you think this would work? I'm assuming that this is sufficiently more effective than using the following line of code float(W) / float(H) >= 1.76 ? Source : \


    I would love to have each frosty borders script that I customized, automatically load for its appropriate video aspect ratio. My hope is to eliminate the need to manually switch between profiles and have that done automatically by FFDshow when a video meets a certain condition. I haven't had time to play with this yet.
    Image Attached Thumbnails Click image for larger version

Name:	PotPlayerMini_on_2021_09_05_KVEL.png
Views:	8
Size:	17.4 KB
ID:	60584  

    Click image for larger version

Name:	PotPlayerMini_on_2021_09_05_cfXt.png
Views:	6
Size:	7.0 KB
ID:	60585  

    Last edited by thebib62; 5th Sep 2021 at 07:31.
    Quote Quote  
  5. Edit 1

    I think I got it working! I used the following values

    Auto load on 16x9 (which would leave the video alone in this case, by NOT applying frostyboarders)
    aspect <37:20

    Auto load on cinematic video (applies frostyboarders to top and bottom)
    aspect >2.16

    Edit 2:

    FrostyBorders(832,468, bright=0, cont=1.0, sat=0.85, TSoft=1, Feather=false, blur=0, texture=20)

    This is my current setting for using FrostyBorders with cinematic videos. I am having trouble editing the blur value. It doesn't seem to make any difference with any value I input.
    This is only an issue with cinematic videos and not 4x3 videos.



    Original, and trimmed down post:

    I'm assuming that the best condition to set would be either pixel aspect ratio or picture aspect ratio. If you think there is a better condition value to set for the best automated experience with frosty borders and dealing with different aspect ratios, let me know. My hope is that setting up these "preset autoload conditions" would eliminate the need for manual intervention from the user.
    Image Attached Thumbnails Click image for larger version

Name:	The Pursuit of Happyness 2006 720p BluRay DTS x264-CtrlHD.mkv_20210905_191422.029.jpg
Views:	8
Size:	123.5 KB
ID:	60597  

    Last edited by thebib62; 5th Sep 2021 at 21:52.
    Quote Quote  
  6. You're correct about the blur argument. I broke it. The border syntax had become somewhat messy over time so I gutted most of it and started again. The blur thing was a silly oversight but easy to fix. There'll be a link for a new version of FrostyBorders dated 2021-09-07 in the opening post shortly. Keep in mind the Blur and VBlur arguments are completely independent now, because by default the script adjusts each according to resolution, but for FrostyBorders they're different values. So to disable blurring completely Blur and VBlur both need to be zero.

    The main reason I was adding borders on playback was because I own a Plasma TV (I still do but it's in another room at the moment so I don't use it much myself now) and viewing a lot of video with borders can cause the display to age unevenly and I still watch a lot of 4:3. It also produces a "burned-in" look where the borders were when you go back to a full-screen picture, although that goes away fairly quickly.
    For aspect ratios wider than 16:9 though, I generally zoom in for 16:9 so there's no borders, which I was doing with the player rather than Avisynth, so I was adjusting the player zoom and enabling/disabling the ffdshow Avisynth filter manually as need be.

    I did try playing around with ffdshow's preset auto-loading but it was a long time ago. I can't even remember if there was a problem that made be decide it was easier to change things manually, or whether I just didn't get around to configuring it properly, but you probably know more about preset auto-loading by now than I do.
    Disabling the Avisynth filter when CropResize isn't needed is probably better than disabling it with the script, as it takes Avisynth out of the process completely.

    One of the color conversion/resize plugins CropResize uses won't work on XP, so I have to test it on the laptop, and I don't like using laptops so I'm still procrastinating, but I'll try to motivate myself shortly.
    Quote Quote  
  7. I've fixed the blending for StaticFrosty borders when either of the feathering options are enabled. They're supposed to be identical by default, but with feathering enabled they weren't. I haven't changed the date again because the new version has only been was only uploaded for about an hour. The new version is still dated 2021-09-07.
    Quote Quote  
  8. Thanks for such a quick fix to the blur argument issue I was having.
    " The main reason I was adding borders on playback was because I own a Plasma TV (I still do but it's in another room at the moment so I don't use it much myself now) and viewing a lot of video with borders can cause the display to age unevenly and I still watch a lot of 4:3. It also produces a "burned-in" look where the borders were when you go back to a full-screen picture, although that goes away fairly quickly."


    That sounds like a legitimate reason to use the script. I use your script because I want the entirety of my display to be filled, not for the same reason as you stated. For lack of a better word, I guess I am greedy. I don't want my widescreen display to go to waste when only displaying 4 x 3 video. I don't find the borders to be distracting especially with the settings that I've chosen and the features that I've requested from you. For most of the content that I watch with frosty borders, it feels like it's in native widescreen. The only time it can be a little bit distracting is when there is a panning shot from left to right or right to left. Other than that, I've been accustomed to these types of borders for a while now and just recently have been able to enjoy them in real time with AVI synth. From now on, I literally will not watch 4 x 3 video or extra widescreen cinematic movies without your script..

    I also want to make a video on how to set up frosty borders. I feel like it could be a little overwhelming for some newer users especially if they're not familiar with AVI synth or FFD show. The more people using frosty borders, the better in my opinion.

    In regards to the autoloading of FFD show profiles, I've had good luck with it so far. There may need to be some tweaks for oddly formatted videos, but so far it's been great. My default profile has AVI synth completely disabled which would apply for native 16 x 9 content.
    Quote Quote  
  9. thebib62,
    Here's something you might like to play with. I found an old function I was using with ffdshow so I added some new stuff and updated it to work with the current CropResize. The idea is to reduce the need to switch between ffdshow presets or manually zoom etc.

    If you use the function in Potplayer rather than ffdshow you can set an output DAR and the output dimensions will be the same as the source dimensions. You can specify an output width and height, but the script will take care of them if you don't. When the script is cropping the height of video with a DAR less than 16:9 (zooming in), the bottom cropping is twice the top cropping.

    I've left auto-cropping in the script in case it's an oddity happening to me, but I couldn't get it to work inside ffdshow. If you paste the stuff below into a normal script and open it, it all works fine, but no auto-cropping in ffdshow. Bummer.

    Below is what needs to be added to the ffdshow Avisynth filter. I tried to make it easy to change the important stuff. As you can see the FCropResize and CR_FFDShow functions are in the script twice (three times for the latter). The first FCropResize configures pillarbox borders, and the second configures letterbox borders. Likewise for the CR_FFDShow arguments. I've used a hash thingy between some of the lines in the script to make it easier to read in ffdshow as ffdshow deletes empty lines, but you can delete them. Don't delete any of the triple quotes though.
    The default for the CR_FFDShow function is Frosty=true. It has the same arguments as CropResize. The CR_FFDShow function does some calculating and then uses CropResize to do the work.

    Here it is. A new temporary version of the CropResize script is also in the zip file. The border options are the same as for FrostyBorders.

    Edit: One limitation I haven't worked-around yet, is a function is used to determine the picture aspect ratio after any specified cropping, and that picture aspect ratio determines whether pillarbox or letterbox borders should be added. It means the same cropping should be used for each instance of the CR_FFDShow function, otherwise the picture aspect ratio after cropping won't be the same each time. Depending on the cropping, it might mean the script thinks pillarbox borders should be added when they should be letterbox borders etc. I should try to solve that problem at some stage.

    CropResize FFDShow Functions.zip

    Code:
    Source = last
    #
    # Specify an InDAR for anamorphic sources, otherwise zero.
    # Use OutDAR=16.0/9.0 for PotPlayer, otherwise zero.
    #
    InDAR = 0.0
    OutDAR = 0.0
    #
    # If Source DAR < MinPicDAR, the height is cropped for the MinPicDAR before adding pillarbox borders.
    # If Source DAR > MaxPicDAR, the sides are cropped for the MaxPicDAR before adding letterbox borders.
    #
    MinPicDAR = 1.55
    MaxPicDAR = 2.0
    #
    # Add pillarbox borders when Source DAR < PBDAR.
    # Add letterbox borders when Source DAR > LBDAR.
    # Crop to 16:9 dimensions in-between.
    # PBDAR should be 16:9 or less. LBDAR should be 16:9 or greater.
    #
    PBDAR = 1.75
    LBDAR = 1.79
    #
    CL = 0
    CT = 0
    CR = 0
    CB = 0
    #
    AutoC = false
    #
    PicDAR = CR_PicDAR(Source, CL,CT,CR,CB, InDAR=InDAR, AutoC=AutoC)
    #
    CRString1 = (PicDAR < (16.0/9.0)) ? \
    """
    Source
    FCropResize()
    CR_FFDShow(0,0, CL,CT,CR,CB, CropDAR=MinPicDAR, InDAR=InDAR, OutDAR=OutDAR, AutoC=AutoC)
    """ : """
    Source
    FCropResize()
    CR_FFDShow(0,0, CL,CT,CR,CB, CropDAR=MaxPicDAR, InDAR=InDAR, OutDAR=OutDAR, AutoC=AutoC)
    """
    CRString2 = \
    """
    Source
    CR_FFDShow(0,0, CL,CT,CR,CB, InDAR=InDAR, OutDAR=OutDAR, AutoC=AutoC, Frosty=false)
    """
    (PicDAR < PBDAR) || (PicDAR > LBDAR) ? Eval(CRString1) : Eval(CRString2)
    Last edited by hello_hello; 8th Sep 2021 at 21:03.
    Quote Quote  
  10. I suspect this is as close as it can get to being fully automated.
    Cropping is the main issue. I thought about something like cropping presets that would be applied according to the aspect ratio, but that's pretty pointless as the cropping required doesn't really have anything to do with aspect ratio, so I added 4 configurable cropping presets. Unfortunately, the script needs to be modified manually to change the cropping. It only involves changing a single value, but it has to be done manually. Or you could create a bunch of ffdshow presets using different cropping configurations, although you'd still probably have to select the appropriate one manually.

    Anyway... the cropping preset and any InDAR are used by the CR_PicDAR function to calculate the new DAR after cropping. The new DAR determines whether pillarbox or letterbox borders should be added, or if the source should just be cropped. The upshot is, if you had a 16:9 source with 60 pixels of black top and bottom and you tell the script to crop it, the aspect ratio after cropping will ensure the script adds letterbox borders, so the black borders would effectively be replaced with frosty ones. That sort of thing....

    I can't remember if I changed anything in the CR_FFDShow function that'd alter it's output or just cleaned it up a bit, so just in case...

    CropResize FFDShow Functions.zip

    New script for ffdshow's Avisynth filter. I left the auto-cropping in but I still can't get it to work in ffdshow.

    Code:
    Source = last
    #
    # Specify an InDAR for anamorphic sources, otherwise zero.
    # Specify OutDAR=16.0/9.0 for PotPlayer, otherwise zero.
    #
    InDAR = 0.0
    OutDAR = 0.0
    #
    # Specify the cropping preset to use.
    # UseC = 0 disables cropping.
    # UseC = 1, 2, 3 or 4 selects one of the cropping configurations below.
    # Change the cropping for each preset to suit.
    #
    UseC = 0
    #
    # Cropping 1
    C1L=0    C1T=0   C1R=0   C1B=0
    # Cropping 2
    C2L=0    C2T=0   C2R=0   C2B=0
    # Cropping 3
    C3L=0    C3T=0   C3R=0   C3B=0
    # Cropping 4
    C4L=0    C4T=0   C4R=0   C4B=0
    #
    AutoC = false
    #
    # If CroppedDAR < MinPicDAR, before adding pillarbox borders,
    # additional height is cropped to achieve the MinPicDAR.
    # If CroppedDAR > MaxPicDAR, before adding letterbox borders,
    # additional width is cropped to achieve the MaxPicDAR.
    #
    MinPicDAR = 1.55
    MaxPicDAR = 2.0
    #
    # Add pillarbox borders when CroppedDAR < PillarboxDAR.
    # Add letterbox borders when CroppedDAR > LetterboxDAR.
    # Crop to 16:9 dimensions in-between.
    # PillarboxDAR should be 16:9 or less.
    # LetterboxDAR should be 16:9 or greater.
    #
    PillarboxDAR = 1.75
    LetterboxDAR = 1.79
    #
    CL = (UseC == 1) ? C1L : (UseC == 2) ? C2L : (UseC == 3) ? C3L : (UseC == 4) ? C4L : 0
    CT = (UseC == 1) ? C1T : (UseC == 2) ? C2T : (UseC == 3) ? C3T : (UseC == 4) ? C4T : 0
    CR = (UseC == 1) ? C1R : (UseC == 2) ? C2R : (UseC == 3) ? C3R : (UseC == 4) ? C4R : 0
    CB = (UseC == 1) ? C1B : (UseC == 2) ? C2B : (UseC == 3) ? C3B : (UseC == 4) ? C4B : 0
    CroppedDAR = CR_PicDAR(Source, CL,CT,CR,CB, InDAR=InDAR, AutoC=AutoC)
    #
    (CroppedDAR < PillarboxDAR) ? Eval("""
    #
    Source
    FCropResize()
    CR_FFDShow(0,0, CL,CT,CR,CB, CropDAR=MinPicDAR, InDAR=InDAR, OutDAR=OutDAR, AutoC=AutoC)
    #
    """) : (CroppedDAR > LetterboxDAR) ? Eval("""
    #
    Source
    FCropResize()
    CR_FFDShow(0,0, CL,CT,CR,CB, CropDAR=MaxPicDAR, InDAR=InDAR, OutDAR=OutDAR, AutoC=AutoC)
    #
    """) : Eval("""
    #
    Source
    CR_FFDShow(0,0, CL,CT,CR,CB, InDAR=InDAR, OutDAR=OutDAR, AutoC=AutoC, Frosty=false)
    #
    """)
    Last edited by hello_hello; 9th Sep 2021 at 14:06.
    Quote Quote  
  11. Thank you for all of the time and effort you put into making this as automated as possible. I will need to take some time on my day off to play around with this. I'm excited to get this up and running. I do have a question though. How do I implement the new cropresize code with my current Frostyborders script settings?

    FCropResize(Clone=true, Feather2=true, blur=10, vblur=10, texture=20)\
    .Crop43(840,540, 10,15,-10,-45, OutDAR=16.0/9.0)



    I would assume I need to replace these lines with my settings/values posted above?

    Code:
    #
    Source
    FCropResize()
    CR_FFDShow(0,0, CL,CT,CR,CB, CropDAR=MinPicDAR, InDAR=InDAR, OutDAR=OutDAR, AutoC=AutoC)
    #
    """) : (CroppedDAR > LetterboxDAR) ? Eval("""
    #
    Source
    FCropResize()
    CR_FFDShow(0,0, CL,CT,CR,CB, CropDAR=MaxPicDAR, InDAR=InDAR, OutDAR=OutDAR, AutoC=AutoC)
    #
    """) : Eval("""
    #
    Source
    CR_FFDShow(0,0, CL,CT,CR,CB, InDAR=InDAR, OutDAR=OutDAR, AutoC=AutoC, Frosty=false)
    #
    """)
    Quote Quote  
  12. Originally Posted by thebib62 View Post
    Thank you for all of the time and effort you put into making this as automated as possible. I will need to take some time on my day off to play around with this. I'm excited to get this up and running. I do have a question though. How do I implement the new cropresize code with my current Frostyborders script settings?

    FCropResize(Clone=true, Feather2=true, blur=10, vblur=10, texture=20)\
    .Crop43(840,540, 10,15,-10,-45, OutDAR=16.0/9.0)

    I would assume I need to replace these lines with my settings/values posted above?
    That's correct, except the Crop43 function isn't needed as it's been replaced with CR_FFDShow. I changed the name as Crop43 was really only intended to automatically crop 4:3 video to a different aspect ratio, whereas CR_FFDShow will do a similar thing for aspect ratios greater than 16:9, and for aspect ratios between PillarboxDAR & LetterboxDAR in the script (between 1.75 & 1.79 unless you change the values) it'll crop to 16:9 too.

    Unless you're using the script in Potplayer's Avisynth filter rather than ffdshow, don't set an OutDAR, and there's no need to specify an OutWidth or OutHeight. You can if you want to, but CR_FFDShow will calculate 16:9 dimensions for you, and it's based on the width and height of the source after it's been cropped, so it shouldn't resize very much. If adding borders is too slow for HD sources, you can specify an OutWidth & Outheight to force it to downscale before adding the borders, but other than that you should be able to let the function take care of it.

    Although why were you using 840x540? I'm curious as I thought you'd be using 16:9 dimensions.

    You can add the necessary options to the appropriate FCropResize function, but as there's one for pillarbox borders and one for letterbox borders in the script, hopefully you can configure each the way you prefer and then forget about them.
    You can specify cropping directly for each instance of the CR_FFDShow function, but the intention was to use the cropping presets in the script. It's up to you though
    The way it works at the moment, changing UseC to 1 will cause all three instances of CR_FFDShow to apply the cropping specified under "Cropping 1".

    Code:
    UseC = 1
    #
    # Cropping 1
    C1L=10    C1T=15   C1R=-10   C1B=-45
    # Cropping 2
    C2L=0    C2T=0   C2R=0   C2B=0
    # Cropping 3
    C3L=0    C3T=0   C3R=0   C3B=0
    # Cropping 4
    C4L=0    C4T=0   C4R=0   C4B=0
    
    Source
    FCropResize(Clone=true, Feather2=true, blur=10, vblur=10, texture=20)
    CR_FFDShow(0,0, CL,CT,CR,CB, CropDAR=MaxPicDAR, InDAR=InDAR, OutDAR=OutDAR, AutoC=AutoC)
    While I was messing around with these functions I found a few bugs (mainly related to the script adding tiny borders). They're fixed in the CropResize I included with the ffdshow function. I had an idea for improving the way the feathering works though, so I'll try it to see if it works the same way it does in my head, but whether I change that or not I'll have to upload a new version of FrostyBorders sometime soon. Sigh....
    Last edited by hello_hello; 11th Sep 2021 at 03:07.
    Quote Quote  
  13. Code:
    Although why were you using 840x540? I'm curious as I thought you'd be using 16:9 dimensions.
    Well I thought that resolution was a 16 x 9 dimension. It was coming up as one (16x9 AR) when I was playing back video. I don't know where I got those values from. It may have been from one of the default values from your script or maybe I picked a random resolution off the Internet. I'm not quite sure. With that being said, I was choosing a resolution less than 720P because I don't want my small microcomputers to overheat or chug during playback when playing higher resolution video especially with frostyborders enabled.

    I was going to ask, does setting the values to, for example, 840 x 540 rather than the native resolution of 720, make any difference in playback performance on low-end machines? Or what I have to use the resize values instead?

    The reason why haven't tested this out fully myself is because the computer needs to play back media for at least 30 to 60 minutes before any slowdown may occur due to overheating or video files that are too high of a resolution. I have another time to do that yet.
    Quote Quote  
  14. Maybe 840x540 was the result of a typo at some stage. I use 960x540 quite a bit, which I just typed as 860x540 and had to go back and correct it....
    If you happened to have your player set to always display as 16:9 it would've looked correct, because you were also using OutDAR=16.0/9.0. The output dimensions don't change the DAR when an OutDAR is specified, so even the following would display with the correct DAR as long as your player resizes it to 16:9 on playback. Obviously though, downscaling to a height of 50 pixels would lose some picture detail.

    CropResize(1920,50, OutDAR=16.0/9.0, Frosty=true)

    Adding FrostyBorders can be a bit slow, and task manager indicates there's a single CPU core doing pretty much all the work. This PC's a quad-core but it's over ten years old. Playing a h264 704x528 source and adding borders using the FrostyBorders defaults, CPU usage is about 7%. Upscaling it to 1440x1080 before adding borders takes it up to 20-25%. Although thinking about it, MPC-HC is using hardware decoding, so the GPU is doing that part. Decoding h264/h265 can be quite CPU intensive. Is your player configured to use hardware decoding, assuming your laptop's GPU is capable?

    The problem I've been having is a memory issue rather than a CPU one. I'm not blaming ffdshow or MPC-HC as I've been having the same problem when previewing video in MeGUI lately. Every time I edit a script in ffdshow, or even just disable it's Avisynth filter and enabled it again while a video is open, MPC-HC's memory usage increases. Quite a few times when I was playing around with these ffdshow functions the whole process came to a sudden halt because I'd run out of memory. The same happens each time I open a new video. Fortunately memory usage is steady while watching one, but if I keep opening successive videos without closing MPC-HC in between I'll eventually run out of memory, assuming the Avisynth filter is enabled.

    Anyway... you can specify the output dimensions for CR_FFDShow. Specify both though, as if you only specify one, the script will continue to calculate the other oblivious to the fact it's changed. I didn't think to include a check for that sort of thing, but specifying both the output width and height works normally. The lower the resolution, the less work the CPU has to do while adding borders, as they're added after any cropping and resizing. It doesn't matter what the dimensions are, as long as they're 16:9 or you use OutDAR=16.0/9.0.
    Last edited by hello_hello; 11th Sep 2021 at 14:49.
    Quote Quote  
  15. Thanks for the information. It is very helpful! I understand a little bit better how to utilize this new function. I still need to take some time to adjust the settings. I haven't had any free time as of late, I'm hoping sometime during this week I can start to really play with it.

    I may have an issue with it, but I'm not exactly sure. I came across a video that gets automatically cropped from the top and bottom even if my crop settings are set to zero. I'm not sure if that's due to user error on my part or the video itself not fitting in between the restrictions that you set in the script. I took your default script values pasted it into AVI'synth for FFD show and got the cropped top and bottom.

    " I had an idea for improving the way the feathering works though, so I'll try it to see if it works the same way it does in my head"


    I forgot to express my excitement about that news! Any optimization or feature that can be implemented with how feathering works is always welcome.
    When you say "improving the way feathering works", do you mean in regards to CPU usage? Or, the way it appears when it's enabled with frostyboarders?
    Quote Quote  
  16. Originally Posted by thebib62 View Post
    Thanks for the information. It is very helpful! I understand a little bit better how to utilize this new function. I still need to take some time to adjust the settings. I haven't had any free time as of late, I'm hoping sometime during this week I can start to really play with it.

    I may have an issue with it, but I'm not exactly sure. I came across a video that gets automatically cropped from the top and bottom even if my crop settings are set to zero. I'm not sure if that's due to user error on my part or the video itself not fitting in between the restrictions that you set in the script. I took your default script values pasted it into AVI'synth for FFD show and got the cropped top and bottom.

    " I had an idea for improving the way the feathering works though, so I'll try it to see if it works the same way it does in my head"


    I forgot to express my excitement about that news! Any optimization or feature that can be implemented with how feathering works is always welcome.
    When you say "improving the way feathering works", do you mean in regards to CPU usage? Or, the way it appears when it's enabled with frostyboarders?
    thebib62,
    Sorry about being absent for a while. To be honest it was a little because I was tired of looking at the script but I'm finally back playing with it so I thought I'd post back now with the new version. I've only updated CropResize so far (not the stand-alone FrostyBorders function) and it might be an idea to look on it as a new test version, although I don't think there's any bugs left. Did you sort out the cropping problem you mentioned in your last post?

    There's several argument changes which means it's not backwards compatible with previous versions, but it shouldn't be hard to modify any existing scripts using the FCropResize function. I haven't updated the help file yet so it's just the script in the zip file attached, but here's the list of changes with some pics. I'll probably move all this to the opening post eventually. None of the changes are particularly drastic. Just some improvements (I hope).
    The ffdshow functions I uploaded last should keep working. You'll just need to replace CropResize with this version and change any FCropResize arguments accordingly.

    CropResize Test 2021-09-28.zip

    - The Mirror argument is no more (the mirror borders didn't work well).

    - The Clone argument is no longer true or false. It can have a value of 1, 2 or 3.
    Clone=1 and Clone=2 are exactly the same unless feathering is enabled, in which case they're feathered into the picture differently.
    Clone=3 is an enlarged version of the Clone=1 borders, but when the borders are wider than the picture they're not stretched. They're enlarged more instead.
    Temporal softening can be applied to the Clone borders and they can also be blended. The defaults for clone borders are TSoft=1 and Blend=0.
    The default blur and texture options mightn't be exactly the same (I can't remember).

    - There's now only one Feather argument and it's no longer true or false. Instead the amount of feathering is specified as a value.
    I had to work around a FastBlur oddity producing artefacts for large amounts of blurring (it's used to create the mask for feathering) so the minimum value is Feather=4 and the maximum is roughly 1/6th the width (or height) of the picture. It's limited to mod8 steps. Ranges outside of those won't produce an error, they just won't decrease or increase the feathering. I might have another attempt at playing with the feathering to see if I can refine it without upsetting FastBlur, but it's still better than it was anyway.

    - BDivider is a value specifying the size of the divider rather than true or false. There's a new BDColor argument for specifying the BDivider color.

    I think that's it. Here's some examples. All the pics: https://postimg.cc/gallery/z1NnSCC/db628b30

    I still think the original FrostyBorders look the best, although you can blur and texture the Clone borders to look much the same anyway.

    FCropResize()
    CropResize(640,360, Frosty=true)



    FCropResize(BDColor=$191919, BDivider=4)
    CropResize(640,360, Frosty=true)



    FCropResize(Feather=64)
    CropResize(640,360, Frosty=true)



    FCropResize(Clone=1)
    CropResize(640,360, Frosty=true)



    FCropResize(Clone=1, BDivider=4)
    CropResize(640,360, Frosty=true)



    FCropResize(Clone=1, Feather=16)
    CropResize(640,360, Frosty=true)



    FCropResize(Clone=2, Feather=16)
    CropResize(640,360, Frosty=true)



    FCropResize(Clone=3, Feather=16)
    CropResize(640,360, Frosty=true)



    I'd already been toying with the idea of Clone=3 borders, but decided I was too lazy, however I was watching the news the other night and they were showing some cell-phone footage with similar borders, so I figured there's probably a market for them.

    FCropResize(Clone=3, BDivider=2)
    CropResize(640,360, Frosty=true)



    StaticFrosty borders still work the same way.
    Pick a frame (#5627)
    Edit: This is the wrong frame. I stuffed up the screenshot. Oh well.....



    Use those borders for the whole video.

    FCropResize(StaticFrosty=5627, BDivider=2)
    CropResize(640,360, Frosty=true)



    And blah, blah, blah....

    FrostyColor=true, BDivider=2



    FrostyColor=true, Texture=200, BColor=color_DarkBlue



    Frosty=false



    Frosty=false, Cont=0.5, sat=0.5, Feather=64



    By the way, if you give a crap, here's how the feathering works now. Bottom right is the final picture. The first is for Clone=1 borders and the second for Clone=2, so you can see why they look different. Clone=3 is feathered the same as Clone=1. The top left picture has backwards borders because that makes it very hard or impossible to see the picture edge under the feathering (sometimes you could see the edge when the borders underneath were black).
    Realistically, the more feathering you use, the more blurring and texture required.... in my opinion. If you have any other ideas though, let me know.

    Clone=1, Feather=32



    Clone=2, Feather=32

    Last edited by hello_hello; 28th Sep 2021 at 17:08.
    Quote Quote  
  17. •It's no problem. I expected as much.. I think it's perfectly natural to get burned out from providing so much support and implementing these requests as frequently as you were. I'm glad to see you're back and doing well.

    •I think I sorted out my issue from my previous post.

    •I'm really loving the new update! The new implementation of the feathering option is wonderful. It acts exactly the way I use to add it to videos in post processing. For awhile, I've been using a video editor to implement what FrostyBoarders is doing now. Over the past 10 years I've played with a lot of different video material and different methods of adding the borders. In my experience, the larger the feathering value is, the less noticeable the borders become. So having the option to now have such a large feather value, in real time, is a dream come true.

    •What you implemented into FrostyBoarders up until this point is outstanding. I don't have any new ideas at the moment, but I will definitely reply back here if I do come up with something that I believe could benefit the script even more. Still, as it stands today, the way Frosty boarders operates now is pretty much all I could ever ask for from this script.
    Quote Quote  
  18. thebib62,
    Thanks for the thank you!

    Here's today's test version with updated feathering.

    CropResize Test 2021-09-29.zip

    This is the problem I'm having, which I think relates to another mod8 FastBlur issue when using an old CPU. The resolution didn't seem to matter, just certain values for blurring produce these artefacts.

    Edit: This issue is fixed with FastBlur 0.3.1

    Image
    [Attachment 61045 - Click to enlarge]


    Forcing mod8 values for everything involving FastBlur prevents the artefacts, but I'd like to avoid that limitation, so hopefully it's just a problem with old CPUs and large amounts of blurring. I'll test it myself on an old laptop later (newer CPU than the one in this PC), but could you try it for me to see if you have the same problem? The following produces artefacts for me every time. You should see it easily enough in brighter borders if the artefacts are there. Any source should do. The first instance of CropResize will crop it to 4:3 dimensions.

    CropResize(640,480)
    FCropResize(Feather=88)
    CropResize(960,540, Frosty=true)

    Image
    [Attachment 61046 - Click to enlarge]


    At the moment, the only restriction for the Feathering argument is a minimum value of 2 and a maximum of 1/6th the video width (or height). Here's the magic formula which seems to work pretty well. I could try making the steps finer but I'm not sure the planets would still line up the same way.

    - The value specified for the Feather argument is multiplied by 3, rounded to mod2 and added to the border size. That becomes the area used for feathering each side (top/left in the pic below).

    - The value specified for the Feather argument is added to the border size and used to create white borders for the mask.

    - Finally, the value specified for the Feather argument is divided by 1.5 and used as the blurring value for FastBlur to blur the mask.

    FCropResize(Clone=1, Feather=64)
    CropResize(704,396, Frosty=true)

    Image
    [Attachment 61047 - Click to enlarge]


    That formula seems to work pretty well, but see what you think. The way it is though, even though there's no mod8 limitation now, it means each time the feathering value is increased by 2, the area used for feathering increases by 6 pixels, but hopefully, that's small enough steps.

    And of course once the two feathered sections meet, that's the limit. Feather=88 in this case. There's no error message. The script silently enforces that limit.

    Image
    [Attachment 61048 - Click to enlarge]
    Last edited by hello_hello; 1st Oct 2021 at 05:00.
    Quote Quote  
  19. When I tried

    CropResize(640,480)
    FCropResize(Feather=88)
    CropResize(960,540, Frosty=true)


    I got the same artifacts as you.


    Everything else seems to be functioning as expected, though!


    These are the values I use.
    CropResize(640,480)
    FCropResize(Clone=2, Feather=50, blur=3, vblur=3, texture=5, TSoft=0, blend=0)
    CropResize(960,540, Frosty=true)

    I am starting to warm up to

    CropResize(640,480)
    FCropResize(Clone=2, Feather=50)
    CropResize(960,540, Frosty=true)

    I love how clone=2 looks, its much better than clone=1, IMO, because the boarder between the video and FrostyBoarders are invisible.
    Image Attached Thumbnails Click image for larger version

Name:	WWE Vengeance 2007 (Original PPV Broadcast).mp4_20210929_152133.309.jpg
Views:	10
Size:	164.5 KB
ID:	61056  

    Click image for larger version

Name:	Unwrapped - S06E04 - Southern.mp4_20210929_154632.498.jpg
Views:	6
Size:	109.8 KB
ID:	61057  

    Click image for larger version

Name:	Unwrapped - S06E04 - Southern.mp4_20210929_154622.679.jpg
Views:	7
Size:	108.0 KB
ID:	61058  

    Click image for larger version

Name:	Unwrapped - S06E04 - Southern.mp4_20210929_155108.761.jpg
Views:	6
Size:	170.8 KB
ID:	61059  

    Click image for larger version

Name:	Unwrapped - S06E04 - Southern.mp4_20210929_155225.854.jpg
Views:	6
Size:	165.4 KB
ID:	61060  

    Last edited by thebib62; 29th Sep 2021 at 20:55.
    Quote Quote  
  20. Thanks for testing.

    Edit: I reported the FastBlur problem to the author and so far it looks like he's fixed it (FastBlur 0.3.1).
    I can't complain about the service....
    Last edited by hello_hello; 1st Oct 2021 at 04:19.
    Quote Quote  
  21. Originally Posted by thebib62 View Post
    These are the values I use.
    CropResize(640,480)
    FCropResize(Clone=2, Feather=50, blur=3, vblur=3, texture=5, TSoft=0, blend=0)
    CropResize(960,540, Frosty=true)
    You could do something like:

    CropResize(720,540, Frosty=true)
    H = height( last)
    FCropResize(Clone=2, Feather=50, Blur=H/75.0, VBlur=H/75.0, Texture=H/200.0, TSoft=0, blend=0)
    CropResize(960,540, Frosty=true)

    They're the blur and texture defaults for Clone 1 & 2, so this should give you a similar visual result regardless of resolution, with blur and texture values close to 3 and 5 (for pillarbox borders and when the resolution is 720x540).

    CropResize(720,540, Frosty=true)
    H = height( last)
    FCropResize(Clone=2, Feather=50, Blur=H/180.0, VBlur=H/180.0, Texture=H/108.0, TSoft=0, blend=0)
    CropResize(960,540, Frosty=true)

    Of course it'll only be similar visually if you don't upscale or downscale when adding borders.
    For the next version I might add some arguments or functions to the end of the script for setting the default ratios for calculating blurring and texture. Or instead of a value for blur, the Blur and VBlur arguments could be the ratio based on resolution.... maybe...
    Quote Quote  
  22. Now that it looks like FastBlur is behaving (see post #50) I'll try to finalise the scripts tonight or tomorrow and upload the new versions, then hopefully I'll never have to look at them again.
    Quote Quote  
  23. Originally Posted by hello_hello View Post
    Now that it looks like FastBlur is behaving (see post #50) I'll try to finalise the scripts tonight or tomorrow and upload the new versions, then hopefully I'll never have to look at them again.
    That's really good news, thanks for reaching out to him for the issue!

    Quick question about movie sized videos, these are my values for movie files, and I wanted to know if I set it up correctly.

    FCropResize(Clone=2, Feather=40, bright=0, cont=1.0, sat=0.85, TSoft=0, blur=5, vblur=5, texture=8)
    CropResize(960,540, 0, 135, 0, -135, Frosty=true)
    Image Attached Thumbnails Click image for larger version

Name:	Halloween 1978 35th Anniversary Edition BluRay 1080p TrueHD7.1 x264-D3FiL3R.mkv_20211002_084055..jpg
Views:	5
Size:	247.5 KB
ID:	61086  

    Click image for larger version

Name:	Halloween 1978 35th Anniversary Edition BluRay 1080p TrueHD7.1 x264-D3FiL3R.mkv_20211002_084047..jpg
Views:	7
Size:	134.1 KB
ID:	61087  

    Quote Quote  
  24. Yeah that's fine. You can use whatever values you prefer.

    I made the original FrostyBorders darker for letterbox borders because I find them more distracting than pillarbox borders, although I rarely add letterbox borders myself. I'd rather crop the sides for 16:9 when the aspect ratio is greater than 16:9.

    I'll confess... Clone=2, Feather=40 would drive me nuts for letterbox borders. I think the "ghosting" effect without lots of blurring and/or texture to hide it would give me motion sickness pretty quickly. I'm not a real fan fan of feathering even for side borders, but that's just me.

    For the remaining arguments, the correct value is the value you prefer.

    For the Clone borders, if you let me know your preferred settings (once you've decided) I'll make them the defaults. I'll mostly use FrostyBorders so it won't matter to me. Aside from feathering. I probably should leave the feathering disabled by default. I've already changed the way the Blur argument works. For Clone borders you can specify different values for Blur and VBlur, but for the next version if you want them the same you'll only need to specify a value for Blur and it'll be used by VBlur too. For the new FrostyBorders, which is nearly done, I've already made TSoft=0 the default for Clone borders.
    Clone=1, Clone=2 and Clone=3 can have different defaults if you prefer, and the defaults for letterbox borders don't have to be the same as for pillarbox borders.
    Quote Quote  
  25. Originally Posted by hello_hello View Post
    Yeah that's fine. You can use whatever values you prefer.

    I made the original FrostyBorders darker for letterbox borders because I find them more distracting than pillarbox borders, although I rarely add letterbox borders myself. I'd rather crop the sides for 16:9 when the aspect ratio is greater than 16:9.

    I'll confess... Clone=2, Feather=40 would drive me nuts for letterbox borders. I think the "ghosting" effect without lots of blurring and/or texture to hide it would give me motion sickness pretty quickly. I'm not a real fan fan of feathering even for side borders, but that's just me.

    For the remaining arguments, the correct value is the value you prefer.

    For the Clone borders, if you let me know your preferred settings (once you've decided) I'll make them the defaults. I'll mostly use FrostyBorders so it won't matter to me. Aside from feathering. I probably should leave the feathering disabled by default. I've already changed the way the Blur argument works. For Clone borders you can specify different values for Blur and VBlur, but for the next version if you want them the same you'll only need to specify a value for Blur and it'll be used by VBlur too. For the new FrostyBorders, which is nearly done, I've already made TSoft=0 the default for Clone borders.
    Clone=1, Clone=2 and Clone=3 can have different defaults if you prefer, and the defaults for letterbox borders don't have to be the same as for pillarbox borders.
    Clone=2 is definitely my preferred choice, but I am always tinkering with the settings and fine-tuning to my tastes. So I don't think I can give you a default value for the script.
    Thank you for asking though.
    Quote Quote  
  26. I'm finally getting there. The standalone FrostyBorders function is done.

    The new version is dated 2021-10-11 and the link is in the opening post.

    thebib62,
    I was side-tracked for a bit, then side-tracked again with an idea for the CropResize function (not border related). It's almost done. I'll hopefully be able to update the CropResize thread with the new version tomorrow, but in the mean time the original FrostyBorders function is updated and I've also updated the help file. There's new ways to enter Blur and Texture values.

    Cheers.
    Quote Quote  
  27. thebib62,

    If you're still around I'm about to update the CropResize thread with the new version (2021-10-15). The included frosty borders function has the same borders as the stand-alone FrostyBorders script I uploaded a few days ago.

    Due to the new CropResize being able to accept float values for cropping, the old functions for ffdshow won't work with it, so here's an updated version of the ffdshow functions.

    CropResize FFDShow Functions 2021-10-15.avsi

    The script for the ffdshow Avisynth filter itself hasn't changed, just the two functions it uses, but I've added a copy of it to the top of the above script for the sake of completeness.

    Cheers.
    Quote Quote  
  28. Still here. Thank you for both of those updates!

    I've started to use larger values for the blur argument. I've noticed that when I use those higher values a type of distortion/banding affect is visible. This is not visible when using lower values of blur. I was wondering if you had this issue as well? I've used Frostyboarders on three computers and I've had this same issue with all three.


    CropResize(640,480)
    FCropResize(Clone=1, Feather=30, blur=43, vblur=43, texture=5, TSoft=0, blend=0)
    CropResize(960,540, Frosty=true)

    Also, after updating CropResize it seems like the TSoft and Blend arguments are not recognized anymore. I've tried TSoft=0, blend=0, and get an error stating "I don't know what 'Blend' means". I know these are off by default with clone=1 and clone=2, but I don't think this error was intended. While using "CropResize Test 2021-09-29.avsi", I don't get this error.

    Plugins in my Avisynth directory
    AddGrainC.dll
    DirectShowSource.dll
    FastBlur.dll
    TCPDeliver.dll
    CropResize 2021-10-15.avsi
    CropResize CRCrop Functions 2021-10-15.avsi
    CropResize Resizer Functions 2021-10-15.avsi
    CropResize Wrapper Functions 2021-10-15.avsi
    FrostyBorders 2021-10-11.avsi
    Image Attached Thumbnails Click image for larger version

Name:	PotPlayerMini_on_2021_10_18_4Scm.jpg
Views:	9
Size:	276.8 KB
ID:	61334  

    Last edited by thebib62; 19th Oct 2021 at 09:22.
    Quote Quote  
  29. It'll be something I missed in the script. I thought this time I'd checked every possible combination, but apparently not. Sorry. I'll fix it soon....
    Quote Quote  
  30. thebib62,

    There's a link for CropResize 2021-10-20 in the opening post of the CropResize thread. The Blend and TSoft errors were only a problem for the function included with CropResize. The stand-along FrostyBorders function is fine. The problem was the script not looking for the initial Blend and TSoft values as global variables from the global FCropResize function, and CropResize itself doesn't have Blend and TSoft arguments, hence the errors. It was just a silly mistake by me.

    For the banding issue.... it's not clear if you're seeing that with the test version of CropResize (I hope that's the case) rather than the new version. I can't check what the test version is doing because I thought I was done with them and deleted them all, but blurring is prone to causing banding unless dithering is enabled. I've checked though, and it's definitely enabled for every instance of FastBlur in the latest versions of the scripts. Usually that's enough to prevent the worst of the banding, and any minor banding that might remain is usually hidden by a bit of texture.

    Obviously that's not what's happening with your screenshot, so if you're still having banding issues with the latest FrostyBorders/CropResize, would you mind uploading a small sample clip where it's an issue so I can look at it first hand? If it's still happening I'm not sure what the fix will be, but I'll wait for your reply before worrying about it.

    Cheers.

    PS Is the banding present before you run the video full screen? I'm just wanting to eliminate any upscaling being the cause.

    PPS. I've run through a fair bit of video with the following script

    CropResize(640,480)
    FCropResize(Clone=1, Feather=30, blur=43, vblur=43, texture=0, TSoft=0, blend=0)
    CropResize(960,540, Frosty=true)

    and even with texture disabled I've not seen any significant banding. Is it as bad as your screenshots indicate though? Jpegs are prone to causing banding themselves (or making it worse) when using typical compression/quality. Having said that though, this is a jpeg. I haven't seen anything worse yet.

    Image
    [Attachment 61359 - Click to enlarge]
    Last edited by hello_hello; 19th Oct 2021 at 23:06.
    Quote Quote