VideoHelp Forum
+ Reply to Thread
Page 3 of 5
FirstFirst 1 2 3 4 5 LastLast
Results 61 to 90 of 122
Thread
  1. Yes, maybe you're right, but those later posts were between you and riffraff42 and johnmeyer, and none were really directed towards helping out marcorocchini. But yes, apparently your scripts can also crop and resize to turn 4:3 input into 16:9 output, and you did point it out to him. But, as I mentioned earlier, I use GKnot for that sort of thing. I find it very intuitive and easy to use. But then, I've been using it for probably 15 years.
    Quote Quote  
  2. Sorry I have realized that only for 4:3 and 3:2 or 5:4 or similar sources I don't need apply the fuzzycat effect because it don't match the general 16:9 aspect ratio format but they are reasonable cropped/resized to fullscreen without an excessive lost of quality.

    For all the rest of "strange" ("strange" compared to the 16:9) aspect ratios, for example 720x1280 (0,563 aspect ratio) obviusly I'm force to apply the fuzzycat to "match" the 16:9.

    My target output is alwais 16:9

    I try to do a batch that analyze the source and aspect ratio and automatically decide if apply or not the fuzzycat: if not, it have to crop/resize to match in fullscreen 16:9 the output.
    Possibly it have to auto-calculate all parameters depending on the source.

    I cannot find any Autocrop.dll @ 64bit in http://avisynth.nl/index.php/AviSynth%2B_x64_plugins please help a cat: can put here the autocrop.dll 64bit? thanjks
    Last edited by marcorocchini; 21st Oct 2017 at 05:30.
    Quote Quote  
  3. Originally Posted by manono View Post
    Originally Posted by hello_hello View Post
    I dunno... the thread title is about adding borders.
    Then you also know that later on he lost interest in doing that and switched his questions to how to turn 4:3 video to 16:9 video without using added pillarbars... he made clear he wasn't interested in doing it that way, any longer.
    At which point he should have been told to start a new thread IMHO.
    Quote Quote  
  4. ok rafficat: I have opened another thread for the crop/resize without borders. Thanks

    Referring to your last script I get an error during load:

    Image
    [Attachment 43458 - Click to enlarge]


    what can it be to8bit?
    Quote Quote  
  5. "no function named To8bit" - please get the latest version of the script, To8bit is not needed.

    (I removed AviSynth+ code for simplicity)
    Quote Quote  
  6. ah wow***, the last works

    but can it works also for progressive and interlaced sources?

    i use avisynth+: is ok?
    Quote Quote  
  7. mm I have do mess
    Quote Quote  
  8. Hello_hello finally now wow I have found the 64bit autocrop.

    Please be patience: I'm a Cat

    Hello_hello your script can treat both progressive and interlaced source?
    Quote Quote  
  9. Originally Posted by marcorocchini View Post
    Hello_hello your script can treat both progressive and interlaced source?
    It's really only designed for progressive video because I always de-interlace before re-encoding, so as long as you de-interlace before using the script you're fine, however......

    You can resize the width of interlaced video, but not the height, so if you want to keep the video interlaced you can still use the script, but you have to use one of the modes that doesn't resize the height. There's three different modes you could use.

    Cmode="B" disables resizing completely and crops any black, but it always outputs the same resolution as the source. Therefore the cropped borders are replaced with new borders. The idea of that mode is just to make it easy to clean-up ugly borders and replace them with "clean" ones.

    Cmode="NR" (NR = no resizing) also disables resizing, but it'll crop borders without replacing them as the previous mode does.

    Cmode="RW" (RW = resize width) disables resizing of the height and only resizes the width when the source is anamorphic, in which case it resizes to square pixel dimensions, otherwise for non-anamorphic sources it's effectively the same as the previous mode.

    If you wanted to crop a 4:3 DVD to 16:9 without resizing it, you could use "NoResize" mode, specify the DVD display aspect ratio and the desired picture aspect ratio and let the script do the rest. The following would crop a 4:3 DVD to 16:9 without resizing anything and therefore leave it anamorphic.

    CropResizeBorder(InDAR=4.0/3.0, PicDAR=16.0/9.0)

    Oh.... and when cropping interlaced video you have to stick to mod4 cropping, but mod4 is the default for the script anyway.

    It's a pretty versatile script, which means it might take a bit of getting used to, but once you know your way around it, it's easy to use.
    Quote Quote  
  10. Originally Posted by manono View Post
    But, as I mentioned earlier, I use GKnot for that sort of thing. I find it very intuitive and easy to use. But then, I've been using it for probably 15 years.
    For years I used Yoda's Resize Calculator, which does much the same thing, but one day I made a request at just the right time, and a little later Zathor dragged MeGUI's cropping and resizing calculations out of the dark ages so it could calculate and display any aspect error etc too.

    I still find it all very tedious though. If I'm encoding episodes of a TV show, I usually resize them to the same resolution, and because they invariably require different cropping I have to crop/calculate each one individually, and then there's those episodes where the cropping changes at some point so there's two or more cropping and resizing calculations for each episode..... whereas to do that with the script requires far less effort.

    Now and then I'll run off a 16:9 version of a widescreen video for a family member to watch, but sometimes that cuts off the opening/closing credits at the sides, so they need borders top and bottom instead, while the main movie gets cropped at the sides. Easy....

    Trim(0,5000).CRB(1280,720)\
    ++Trim(5001,90000).CR(1280,720)\
    ++Trim(90001,100000).CRB(1280,720)

    The new version of the script, when it's done, will do sub-pixel cropping when resizing. No more mod2 cropping, not even mod1, zero aspect error no matter how you resize, and no calculations required. At least that's the plan. I should have thought of it years ago.
    Quote Quote  
  11. howerver the question of the borders is resolved, thank yoy raffriffcat and hellocat please help a poor *** I continue the question of the crop/resize in the new thread https://forum.videohelp.com/threads/385511-from-4-3-to-16-9-in-crop-resize-mode-and-avisynth-64-bit thanks
    Quote Quote  
  12. While I was adding pretty borders to the new version of my cropping and resizing script, I created a stand-alone function that simply adds borders and resizes if need be. And it has a name....
    FrostyBorders()
    The script borrows heavily from raffriff42's script earlier in the thread, so thank you to him. If you want more options, try raffriff42's script.

    Hopefully, whenever the script has to resize, it'll do so with zero aspect error (it'll do a little sub-pixel cropping if need be in order to resize to mod4 without distorting the picture before adding borders).

    These are the instructions found at the top of the script:

    - Specify the desired output width and height. ie FrostyBorders(960, 540)
    If it needs to resize, the script always resizes with Spline36Resize.
    - The AddGrainC plugin is required. http://avisynth.nl/index.php/AddGrainC

    The defaults when adding left/right borders:
    FrostyBorders(Width, Height, InPixelAR=1.0, Blend=0.2, Adjust=4, Texture=2, Sat=0.75, Gradient=false)
    The defaults when adding top/bottom borders
    FrostyBorders(Width, Height, InPixelAR=1.0, Blend=0.2, Adjust=2, Texture=2, Sat=0.5, Gradient=false)

    - InPixelAR (default = 1.0 (1:1))
    Specify an Input Pixel Aspect Ratio for anamorphic sources and the scipt will resize them to square pixels and add borders.
    Must be float. ie InPixelAR=1.0 or InPixelAR=10.0/11.0 or InPixelAR=0.9090909 etc
    If you're not fluet in pixel aspect ratio, there's a list of PARs here.
    https://forum.doom9.org/showthread.php?p=1058927#post1058927
    If in doubt, I'd recommend using an approriate MPEG4 PAR for 4:3 DVDs and a generic PAR for 16:9 DVDs.
    - Blend (range 0.0 to 1.0)
    At 0.0 the borders are completely independent.
    At 0.5 the borders are blended together so they look exactly the same.
    At 1.0 the borders have effectively swapped sides
    - Adjust (range 1 to 9)
    Adjusts the brightness offset and contrast together.
    - Texture (range 0 to 4)
    Adjusts the amount of texture over the borders.
    - Sat (range 0.0 to 2.0)
    Adjusts the colour saturation of the borders (0.0 = greyscale, 1.0 = no adjustment).
    - Gradient (default = false).
    Adds a gradient to the borders from the inside to outside (light to dark).

    How the resizing and adding of borders works:
    - If the specified width and height are the same as the source, the script does nothing.
    - If the specified width and height result in the same aspect ratio as the source, the script simply resizes to the specified dimensions.
    - If the specified width and height result in a wider aspect ratio than the source, the source is resized to the specified height and frosty borders are added to the sides.
    - If the specified width and height result in a narrower aspect ratio than the source, the source is resized to the specified width and frosty borders are added to the top and bottom.
    - The script needs to be able to add around 16 pixels to each side (or the top and bottom) to work correctly. If the output aspect ratio is too similar to the source aspect ratio, it'll produce an error.

    FrostyBorders 2017-10-28.avsi

    New version of the script with a bunch of changes. See this post for details.
    FrostyBorders 2018-02-15.avsi

    Image Attached Files
    Last edited by hello_hello; 17th Feb 2018 at 22:47.
    Quote Quote  
  13. thank you cat but the input DAR?

    different sources have different DAR, or the script automatically detect the input DAR?
    Quote Quote  
  14. The script doesn't have an option for specifying the source display aspect ratio. It assumes all sources have square pixels and the resolution and display aspect ratio are therefore the same.
    Originally I hadn't intended include any resizing, but I added it as I thought it'd be too limited to be useful otherwise. The new version of the CropResizerBorder script will include Frosty Borders and it'll support anamorphic sources as the current version does, so this script was only intended as something simple for adding borders. Something of an after-thought. There's not much point in duplicating all the other functionality.... and the new CropResizeBorder script is almost done.
    Last edited by hello_hello; 22nd Oct 2017 at 14:52.
    Quote Quote  
  15. Originally Posted by johnmeyer View Post
    While I'm not a fan of filling in the black pillar bars, some of these, especially raffriff's filling in with the average luma/chroma blur from the main video, look better than what I see on TV.

    However, the one thing that I still think makes it obtrusive is the hard line between the program material and the border. It seems to me that what is needed is some sort of transition ...
    I played around with a soft transition, and while it may look OK as a still frame, watching a video like this is a claustrophobic experience. Without the edge cues you feel like the blurred area is closing in on you. It's like those old movies where the detective wakes up in a fog after being "slipped a mickie." It might be OK for a special effect, but that can be done exactly to order in an editor like Vegas, as you say.

    Image
    [Attachment 43476 - Click to enlarge]

    Image
    [Attachment 43477 - Click to enlarge]


    Image
    [Attachment 43478 - Click to enlarge]

    Image
    [Attachment 43479 - Click to enlarge]
    Quote Quote  
  16. Originally Posted by raffriff42 View Post
    I played around with a soft transition, and while it may look OK as a still frame, watching a video like this is a claustrophobic experience. Without the edge cues you feel like the blurred area is closing in on you. It's like those old movies where the detective wakes up in a fog after being "slipped a mickie." It might be OK for a special effect, but that can be done exactly to order in an editor like Vegas, as you say.
    I agree. The edges blending too much becomes distracting. There needs to be a definite line, but hopefully with a border similar enough in colour to not stand out too much as a border much of the time.

    I found disabling the temporal softening on scene changes works well for me, and I removed the slight delay as well (I think your original script used a single frame delay on one side). Something like TemporalSoften(5, 255, 255, 40, 2) seems to do the job.
    For me, having the borders slowly change colour to match a new scene was a little distracting. When they change instantly with a scene change, I find it's far less noticeable, but they're still free to slowly change during a scene if need be and fade in/out when that's what scenes do.

    For me at least, that probably works better than the idea I had a while back of changing the borders on a scene change and keeping them static until the next scene change. That might get tedious too, whereas instant changes at the beginning of a scene and temporal softening in between scene changes is a good compromise.

    It's all personal taste, I guess.
    Image Attached Files
    Last edited by hello_hello; 22nd Oct 2017 at 16:48.
    Quote Quote  
  17. Originally Posted by hello_hello View Post
    And it has a name.... FrostyBorders
    Haha I like the name, and it looks good too. It it more stable (less movement) than my SuperSexyWidescreen, which some might prefer (not me tho lol). People should try them both!




    And black borders are okay too! They're classy and timeless!
    Quote Quote  
  18. Originally Posted by hello_hello View Post
    I found disabling the temporal softening on scene changes works well for me, and I removed the slight delay as well.
    I agree, and those changes were silently slipped into the script the other day. (EDIT as shown in the new demo video)
    Last edited by raffriff42; 22nd Oct 2017 at 16:53.
    Quote Quote  
  19. Originally Posted by raffriff42 View Post
    Originally Posted by hello_hello View Post
    And it has a name.... FrostyBorders
    Haha I like the name, and it looks good too. It it more stable (less movement) than my SuperSexyWidescreen, which some might prefer (not me tho lol). People should try them both!
    I'll have a play with the SuperSexyWidesreen script later today but unfortunately I have to visit the real world for a bit now. If you look at the video samples I just attached to my last post though, you'll see there's still a bit of movement there, it's just under the frosting.
    Or did you try the script? Sorry, I may have misinterpreted.....
    Quote Quote  
  20. Oh yes I tried it - a quick test. I will be watching a lot of old 4:3 videos in the days ahead, with both scripts.

    EDIT after a few more minutes viewing time, I see the main difference is really not the motion, it's the borders which are more heavily frosted.
    Last edited by raffriff42; 22nd Oct 2017 at 17:17.
    Quote Quote  
  21. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Hi,
    sorry I am unable to do script in avisynth. Because I am dumb. I did this picture. 4:3 ->16:9 borders. But probably it is not possible do in avisynth real time script. The idea is not to affect original picture by blur effect and take advantage of smoothly increase the blur effect to screen edge. It is reversed and blur is stronger to edge of the picture. But in motion it could do caleidoscope effect, i cant imagine it in motion (not perfectly). Here is the result. Please do not cast stones... I just try.
    And I know it is not perfectly 16:9 but almost.

    Bernix
    Image Attached Thumbnails Click image for larger version

Name:	TEST43169.jpg
Views:	78
Size:	43.3 KB
ID:	43482  

    Quote Quote  
  22. Originally Posted by raffriff42 View Post
    Originally Posted by hello_hello View Post
    I found disabling the temporal softening on scene changes works well for me, and I removed the slight delay as well.
    I agree, and those changes were silently slipped into the script the other day. (EDIT as shown in the new demo video)
    I saw your edit so I had a look at the video. It does look good. I've reduced the contrast more and blended the two borders together by about 30%, and of course given it a frosty coating (actually the contrast reduction is what brings out the frosty look, I think, because I don't think I have AddGranC cranked up very much), but they're not overly dissimilar now. We've both headed in the same direction to a certain extent.

    I don't know about you, but I'd play around for a bit, convince myself I'd discovered border perfection, then I'd move to a different spot in the video to find I didn't like it as much. Nothing seemed to work perfectly 100% of the time. I guess nothing ever will.

    Anyway, I'm off to the real world......
    Last edited by hello_hello; 22nd Oct 2017 at 17:25.
    Quote Quote  
  23. Originally Posted by Bernix View Post
    The idea is not to affect original picture by blur effect and take advantage of smoothly increase the blur effect to screen edge.
    Nice, although as I say up the page, you probably want this as a special effect and not for long term viewing.
    Quote Quote  
  24. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Hi raffriff42,
    you are right, and thank you that you didnt hit me with the stone

    Bernix
    Quote Quote  
  25. Originally Posted by Bernix View Post
    probably it is not possible do in avisynth real time script.
    It's pretty simple.

    Code:
    ImageSource("TEST43169.jpg") 
    left = Crop(0, 0, width/6, height).FlipHorizontal()
    right = Crop(width-width/6, 0, width/6, height).FlipHorizontal()
    StackHorizontal(left, last, right)
    Of course, with horizontal chroma subsampling you have to make sure the parts are mod 2. You can do that by dividing by 12 then multiplying by 2 instead of dividing by 6.

    Starting with this image gives the same result as your sample.

    Click image for larger version

Name:	TEST43169.jpg
Views:	111
Size:	22.7 KB
ID:	43487
    Quote Quote  
  26. It turns out being indecisive means you can't create a function without adding options to it, so I've replaced the script attached to post #72 with a new version and edited the post to add a description of the new options.
    Quote Quote  
  27. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Hi,
    It's pretty simple.
    Nice to see it is so simple. Just few commands. Then I can test it in motion.

    EDIT - but I cant see blur effect that is used on the added part, it increase from 0 to (full - higher) at the edge

    Thank you Jagabo

    Bernix
    Last edited by Bernix; 23rd Oct 2017 at 07:22.
    Quote Quote  
  28. Since others have already posted solutions for marcorocchini's original question, I'll post the simple option that he should have been able to figure out for himself:

    Code:
    # 4:3 source, any SAR, any RGB/YUV format
    Spline36Resize(1920, 1080, 0, height/8, width, height*3/4)
    Quote Quote  
  29. And thanks for the grayscale ramp idea, jagabo. BTW it works between any two colors!
    Quote Quote  
  30. Originally Posted by raffriff42 View Post
    And thanks for the grayscale ramp idea, jagabo. BTW it works between any two colors!
    Yes, once you have a perfect ramp you can lots of things with it. Rotate it, flip it, resize it, brightness/contrast/gamma adjustment, etc.
    Quote Quote  



Similar Threads

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