View Full Version : Looking for simple resizer
Starduster
27th May 2021, 10:48
I have an application that combines slides (as movies) and videos from a variety of sizes and aspect ratios. There are so many resizers available to Avisynth that I really can't tell which one to use for what I want to do.
I would like a resizer that could be used like sld.magicResizer(1024,576) or sld.magicResizer(1024,768) and without having to know what the sld size actually was, it would return a video with the given size and put black bars on the top or sides or top/bottom as needed to maintain the aspect ratio within that given size?
hello_hello
27th May 2021, 11:20
I'm not familiar with MagicResizer, but I think CropResize should do what you want.
CropResize(1024,576, 10,8,-8,-4) would crop any picture to 16:9 dimensions, after first applying the specified cropping, then resize to 1024x576.
CropResize(1024,576, 10,8,-8,-4, Borders=true) would apply the specified cropping, then resize and add borders as required for 16:9 dimensions.
Specifying cropping yourself is optional.
CropResize supports an anamorphic input and/or an anamorphic output for calculating the cropping and resizing. There's pictures in the second post to illustrate usage.
https://forum.doom9.org/showthread.php?t=176667
PS. There's also a global function included for setting global variables, so you don't have to do as much typing, which might be handy if you're joining videos. Each CropResize instance can over-ride the variables though. The idea is to use it something like this.
A = SomeSourceFilter("SomeVideo1.mkv")
B = SomeSourceFilter("SomeVideo2.mkv")
C = SomeSourceFilter("SomeVideo3.mkv")
GCropResize(1024,576, Borders=true, Resizer="Spline64Resize")
A.Trim(0, 1245).CropResize() ++ \
B.Trim(689, 5472).CropResize() ++ \
C.Trim(0, 877).CropResize(Borders=false) ++ \
B.Trim(5473, 6257).CropResize() ++ \
A.Trim(3362, 4114).CropResize(Borders=false)
Starduster
27th May 2021, 11:36
LOL... MagicResizer is just a name I made up for illustration. CropResize(w,h,Borders=true) looks exactly like what I'm looking for. I'll download it and give it a try.
Starduster
27th May 2021, 11:52
That was perfect!.. Exactly what I needed! Thanks!
hello_hello
27th May 2021, 12:19
No problem.
I think I saw "old MagicResizer" the first time I read your post, rather than "sld.MagicResizer", and thought it was a real thing. Doh!
I added an example of using CropResize with multiple clips to my previous post, in case you missed it.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.