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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th May 2021, 10:48   #1  |  Link
Starduster
Registered User
 
Starduster's Avatar
 
Join Date: Jun 2007
Location: Ann Arbor, MI
Posts: 124
Looking for simple resizer

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?
__________________
Life is more interesting viewed upside down
Starduster is offline   Reply With Quote
Old 27th May 2021, 11:20   #2  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
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.

Code:
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)

Last edited by hello_hello; 27th May 2021 at 12:32.
hello_hello is offline   Reply With Quote
Old 27th May 2021, 11:36   #3  |  Link
Starduster
Registered User
 
Starduster's Avatar
 
Join Date: Jun 2007
Location: Ann Arbor, MI
Posts: 124
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.
__________________
Life is more interesting viewed upside down
Starduster is offline   Reply With Quote
Old 27th May 2021, 11:52   #4  |  Link
Starduster
Registered User
 
Starduster's Avatar
 
Join Date: Jun 2007
Location: Ann Arbor, MI
Posts: 124
That was perfect!.. Exactly what I needed! Thanks!
__________________
Life is more interesting viewed upside down
Starduster is offline   Reply With Quote
Old 27th May 2021, 12:19   #5  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
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.
hello_hello is offline   Reply With Quote
Reply

Tags
resize

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.