VideoHelp Forum

+ Reply to Thread
Page 4 of 5
FirstFirst ... 2 3 4 5 LastLast
Results 91 to 120 of 124
Thread
  1. This is the video encoding using the fixed script, video now runs with audio and playing with correct speed.
    Perfect!

    Thank you hello_hello!
    Image Attached Files
    Quote Quote  
  2. You're welcome, although maybe download the new version again. I realised I made a little mistake about five minutes after uploading it (related to checking that the border widths are wide enough for images) so I fixed it and replaced the attachment in my previous post. Chances are you didn't download it before then, but just in case.

    I'm downloading your sample at the moment, but my internet connection is running like a dog today. If it doesn't drop the connection before it's done, it looks like it'll be 20 minutes away. The screenshots in your previous post look great!
    Quote Quote  
  3. I'll get the new script, thank you hello_hello!

    My internet connection today are really bad too, it took me forever to upload that sample, even a google search is very slow.

    Once again, thank you very much hello_hello!
    Quote Quote  
  4. I had some time to kill so here's another version.

    SideImages(Video, OutWidth, LeftImage, RightImage, Flip, Stretch=false, BlankFrame=false, Offset=1.0)

    It's pretty much the same as before, except when BlankFrame=true and borders are being added, one additional frame is added to the end of the video. That frame is completely blank, without the images for borders.

    Offset can be used to move the picture off centre. The default is 1.0 and the range is from zero to 2.0.
    Offset values less than 1.0 decrease the size of the left border and increase the right border. Values greater than 1.0 decrease the size of the right border. The border should be totally on the left when Offset=2.0 and totally on the right when Offset=0. It's not really linear but it's at least a way to adjust the relative size of the borders.

    The attached screenshot is Offset=0.75.

    Flip works much the same way, flipping the left image to the right if no right image is specified, unless Offset=0, in which case if you only specify a left image it'll appear without being flipped on the right. You can still over-ride the defaults with Flip=true/false.

    This version doesn't use the first frame of the video for the border image when no LeftImage is specified. That seemed pointless as you can always specify that for LeftImage yourself if you want to, so instead it adds plain black borders until border image(s) are specified.

    Hopefully I didn't introduce any gremlins.
    Image Attached Thumbnails Click image for larger version

Name:	offset.jpg
Views:	36
Size:	30.3 KB
ID:	52284  

    Image Attached Files
    Last edited by hello_hello; 10th Mar 2020 at 21:25.
    Quote Quote  
  5. That is really nice hello_hello!
    Thank you!
    Quote Quote  
  6. amaipaipai,
    Here's a new function of you want to give it a test drive. It works much the same way as FrostyBorders. The argument names for the images are now Image1 and Image2.
    If you need to crop, you'll either have to use the crop function first, or if you need to specify an InDAR and cropping will change it, crop and resize with CropResize first as before. If you don't need to crop, ImageBorders can be used on it's own.

    ImageBorders(Video, OutWidth, OutHeight, Image1, Image2, Matrix1, Matrix2, \
    InDAR, InSAR, Mod, Flip, Stretch, BlankFrame, Offset, Resizer, IResizer)

    There's no longer any need to make sure the color formats or bit depths match, the only thing you need to check yourself is when images need to be converted to YV12 etc, their width and height are the correct mod (ie mod2), otherwise you'll get an error. I'll probably add a check for that later and automatically crop a pixel for mod2 if need be. I'm bored of looking at it at the moment.

    Mod determines the width mod of the video when borders are added to the sides, or the video height when borders are added top and bottom. The default is Mod=4.

    Matrix1/Matrix2 lets you specify the matrix when the border images need to be converted from/to RGB. The default is matrix="rec601", the same as for the Avisynth Convert functions.
    If Matrix2 is unspecified, Matrix1 is used.

    Resizer specifies the resizer for the video. The default is "Spline36".

    IResizer can be used to specify a resizer for the border images, independent of the video resizing (assuming they need to be resized). If IResizer is unspecified it defaults to the same as Resizer.

    See post #101 for an updated/fixed version.

    BorderImage = ImageSource("Border.bmp")
    Screenshot 1
    ImageBorders(720,540, BorderImage, Offset=0.75)
    Screenshot 2
    ImageBorders(720,400, BorderImage, Offset=0.75)
    Image Attached Thumbnails Click image for larger version

Name:	LetterBox.jpg
Views:	69
Size:	71.0 KB
ID:	52312  

    Click image for larger version

Name:	Pillarbox.jpg
Views:	86
Size:	51.3 KB
ID:	52314  

    Last edited by hello_hello; 13th Mar 2020 at 13:57.
    Quote Quote  
  7. I'm not home right now but I'll give a try.

    Thank you hello_hello!
    Quote Quote  
  8. Working GREAT.

    Thank you hello_hello!

    Elvis 1
    Code:
    A = ImageSource("EA.png")
    B = ImageSource("EB.png")
    ImageBorders(1920,1080, A, B)
    Elvis 2
    Code:
    BorderImage = ImageSource("EA.png")
    ImageBorders(1920,1080, BorderImage)
    Elvis 3
    Code:
    A = ImageSource("EA2.png")
    B = ImageSource("EA2.png")
    ImageBorders(1920,1080, A, B)
    Image Attached Thumbnails Click image for larger version

Name:	Elvis1.png
Views:	82
Size:	1.07 MB
ID:	52321  

    Click image for larger version

Name:	Elvis2.png
Views:	72
Size:	1.34 MB
ID:	52322  

    Click image for larger version

Name:	Elvis3.png
Views:	59
Size:	1.03 MB
ID:	52323  

    Click image for larger version

Name:	EA.png
Views:	24
Size:	306.7 KB
ID:	52324  

    Click image for larger version

Name:	EA2.png
Views:	26
Size:	321.9 KB
ID:	52325  

    Click image for larger version

Name:	EB.png
Views:	31
Size:	21.2 KB
ID:	52326  

    Last edited by amaipaipai; 12th Mar 2020 at 12:53.
    Quote Quote  
  9. You're welcome.

    I had some time to kill again, so here's the (hopefully) final version. It's the same as the previous version except it now crops the images to the correct dimensions (if need be) before converting them to the same color format as the main video.

    The Mod setting for the main video is also self adjusting.
    If Offset=1, the default Mod is twice the required mod for the color format. That means for YV12, which requires a mod2 width, the default Mod picture width (or height when adding top/bottom borders) would be mod4, so if you also specify a mod4 Outwidth (or OutHeight), the borders/images will always be exactly the same size. If Offset doesn't equal one, the Mod setting defaults to the same mod the color format requires. ie Mod=2 for YV12. In any case, you can over-ride those defaults by using the Mod argument to specify something else.

    I'll probably add ImageBorders to the same thread as FrostyBorders once I get around to creating a proper help file.
    Last edited by hello_hello; 13th Mar 2020 at 13:25.
    Quote Quote  
  10. There's always something...

    Uploaded again to fix a silly that stopped Stretch=false working for top/bottom borders.

    ImageBorders(640,360, A, InDAR=2.0/1.0, Stretch=false)
    Image Attached Thumbnails Click image for larger version

Name:	snapshot.jpg
Views:	95
Size:	59.1 KB
ID:	52343  

    Last edited by hello_hello; 13th Mar 2020 at 13:54.
    Quote Quote  
  11. Nice work!

    Thank you hello_hello!
    Quote Quote  
  12. There's a link for an updated version of CropResize in the opening post, containing some minor fixes. The new version is dated 2020-03-26. There's a text file included describing the changes.

    amaipaipai,
    I fixed some minor gremlins in the ImageBorders function and added an Info argument for displaying the picture and border size etc over the video. There's also a wrapper function included so Info=true can be enabled by preceding the function name with "i" as per the CropResize function. ie iImageBorders()
    The minimum image border size now changes according to the resizer being used. There's details in the help file. Images under the minimum width/height can be used as long as they don't need resizing.
    There's also an updated version of SideImages included in the ImageBorders zip file. There's a link in my signature.
    Quote Quote  
  13. Great work hello_hello, works like a charm.

    Thank you!
    Quote Quote  
  14. There's a link for an updated version of CropResize in the opening post, containing fixes for a couple of obscure aspect ratio bugs when specifying an Output DAR. The new version is dated 2020-06-23.

    Another link:
    CropResize 2020-06-23.zip
    Quote Quote  
  15. There's a link for an updated CropResize in the opening post dated 2020-09-11. There's a summary of changes above the link.
    Quote Quote  
  16. There's a link for an updated CropResize in the opening post dated 2020-10-28. It fixes a minor color conversion gremlin. Details in the "Changes" text file.
    Quote Quote  
  17. Sorry about an update so soon. It was just to fix some obsolete information in the help file, but I changed the version date to 2020-10-30.
    There be a link in the opening post.
    Quote Quote  
  18. Mainly a little more fiddling with the color correction. New version dated 2020-11-05.
    Quote Quote  
  19. There's a new version of CropResize in the opening post dated 2021-01-31. Compared to the previous version there's just a few minor improvements and bug fixes, along with the addition of an ability to specify negative values for OutWidth and OutHeight, to prevent resizing of the width or height when possible. Details in the help file.
    There's also new wrapper functions labelled "CRCrop Functions". Usage details can be found at the top of that script.

    There's still a link for CropResize 2020-06-23 in the opening post. It's now labelled version 2 as it contains all the changes applied to the function up to 2021-01-31, with the exception of the old color conversion methods. I thought I'd update the old version to keep it alive for anyone who might still be using it.
    Last edited by hello_hello; 30th Jan 2021 at 16:45.
    Quote Quote  
  20. Sorry folks, but I discovered a mistake that was causing an error when the Frosty argument was enabled. I fixed it and updated the version numbers in the opening post to 2021-02-01 for the current CropResize and 2020-06-23 v3 for the older version.
    Quote Quote  
  21. I'm surprised nobody has mentioned it, but I just realised that for a while at least, I haven't been including the full wrapper functions script in the zip file, so even though the second post in this thread advertises the use of CR() rather than having to type CropResize(), with the wrong wrapper functions script the abbreviated function names couldn't have worked.

    I haven't changed the version dates, but for anyone who's downloaded CropResize 2021-02-01 or 2020-06-23 v3 from the opening post prior to my submitting this one (those versions were only uploaded about 8 hours ago), if you download the zip file again you'll find the full wrapper functions script is now included, and the help file has been updated under the "Wrapper Functions" sections near the end. The CropResize function itself is exactly the same.

    Sorry about that.
    Quote Quote  
  22. Member
    Join Date
    Mar 2008
    Location
    Singapore
    Search Comp PM
    Hi, I'm a novice user. Is there a tutorial on how to use this? I just want to append all videos and standardize all resolutions to 4K.
    Quote Quote  
  23. If you haven't used Avisynth before, try a program such as MeGUI, It's a GUI for a bunch of tools including Avisynth, and if you use the File/Open menu and follow the prompts, MeGUI will index a video and open it in a preview. It creates Avisynth scripts for you, but it's easy to edit them manually. It's one way to use Avisynth without having to know anything about it, and learn by looking at the scripts MeGUI creates.

    There's something of an Avisynth learning curve, but you'd need to understand it first. CropResize is very easy to use once you've got the hang of Avisynth. I'm not aware of any tutorials, but there's plenty of help here and MeGUI is a good place to start.
    Quote Quote  
  24. I've updated the link for CropResize in the opening post. The new version is dated 2021-10-15.

    There's a few improvements, amongst them the ability to specify float values for cropping. I hadn't seen the need for it until now, as the script does it's own sub-pixel cropping to prevent aspect error, but after playing around a bit with Avisynth's Animate function (due to a discussion on panning and scanning at Doom9) it seemed like a good idea.

    The CropResize cropping previews animate nicely, and if nothing else it makes simulating the "Ken Burns Effect" less of a chore, as there's no need to worry about distorting the picture. Here's a couple of quick samples, if anyone's interested.

    Code:
    CropResize(1280,720)
    
    v = Last.Trim(18900,18900).Loop(190)
    Animate(v, 10, 179, "pCropResize", 
    \    960,720, 0.0, 40.0, -400.0, -40.0,
    \  960,720, 745.0, 120.0, -250.0, -310.0)
    Animated Cropping Preview.mkv (996 kB)
    Animate - The Ken Burns Effect.mkv (2.9 MB)
    Last edited by hello_hello; 14th Oct 2021 at 13:29.
    Quote Quote  
  25. Fixed an unnecessary error message when using the Blend or TSoft arguments with FCropResize (adding frosty borders).

    There's a link for CropResize 2021-10-20 in the opening post.
    Quote Quote  
  26. Fixed another unnecessary error message when using Clone=3 with FCropResize (adding frosty borders) and the ResampleMT plugin wasn't loaded.
    Made Clone=3 play nice with YV411.

    There's a link for CropResize 2021-10-22 in the opening post.
    Quote Quote  
  27. I've updated both versions of CropResize in the opening post. There's no functional change aside from fixing an error the script produced when Borers=true and the border dimensions weren't identical.

    New versions CropResize 2022-01-28 and CropResize 2020-06-23 v7

    Hopefully the next update will eliminate the need for two versions as I intend to add the old color conversion methods back so there's only one script to update.
    Last edited by hello_hello; 28th Jan 2022 at 12:45.
    Quote Quote  
  28. There's a new version of CropResize dated 2022-09-22 in the opening post.

    The main change is to the way a plugin is specified for color correction to hopefully make it easier to use (only standard dynamic range color conversions). There's details of the changes in the zip file, but the highlights are:

    ------------------------------------------------

    A new "ColorConvert" argument has replaced "ColorCorrect" and it's a string.
    Color conversion now supports the AVSResize, ColorMatrix, DitherTools, FMTConv, HDRMatrix and HDRTools plugins.

    CropResize(1280,720, ColorConvert="FMTConv", ColorMode="601-709")

    The default conversions between HD and SD colorimetry are all matrix-only now, except for HDRTools. Specifying "NTSC" or "PAL" primaries for SD forces the color primaries to be converted too. Conversions to/from rec.2020 always convert the color primaries.

    CropResize(1280,720, ColorConvert="AVSResize", ColorMode="601N-709")

    ------------------------------------------------

    FMTConv is added as a "native" resizer, selected by preceding the resize kernel with "F_".

    CropResize(1280,720, Resizer="F_Spline36")

    ------------------------------------------------

    CropResize now includes ringing repair (taken from the Resize8 script). Unlike Resize8 though, it's disabled by default (partly because I use Resize8 quite a lot and there's no need to enable ringing repair twice).

    CropResize(1280,720, RingRepair=true)

    or to specify a fixed strength for ringing repair rather than the script calculating it based on the degree of resizing (range zero to one).

    CropResize(1280,720, RingRepair=0.75)

    ------------------------------------------------

    New wrapper functions added to the "Resizer Functions" script for linear light resizing.
    CR_AVSResizeLinear(), CR_DitherToolsLinear() and CR_FMTConvLinear().

    CropResize(960,540, Resizer="CR_DitherToolsLinear")

    ------------------------------------------------

    Plus a couple of obscure bug fixes and some other minor changes.
    Last edited by hello_hello; 29th Sep 2022 at 10:57.
    Quote Quote  
  29. There's a new version of CropResize dated 2022-09-29 in the opening post.

    A minor update. See the Changes text file for details.
    Quote Quote  



Similar Threads