Resize with only one value
Resize with only one value
Hello,
it's it posible to use the resize tool and give only the width a value? so that the computer itself determines the height based on the aspect ratio?
Thank in advance!
Kr,
Mkz
it's it posible to use the resize tool and give only the width a value? so that the computer itself determines the height based on the aspect ratio?
Thank in advance!
Kr,
Mkz
Re: Resize with only one value
If by "resize tool" you mean the resize filter that you can use after the A/V decoder, that's not aspect ratio aware (unless something changed in the last few years), so if you put an arbitrary resolution, it will always shrink. On the other hand, the resize inside the encoding nodes goes through the filter builder and it's aspect ratio aware.
Anyway, to accomplish this, instead of the resizing node, I can easily write a custom Avisynth Script for you.
I'm currently on my mobile 'cause I'm in the UK and not in the office, but if you can wait till the end of the week, I'll come back with one.
Out of curiosity, do you have a particular resolution in mind?
Anyway, to accomplish this, instead of the resizing node, I can easily write a custom Avisynth Script for you.
I'm currently on my mobile 'cause I'm in the UK and not in the office, but if you can wait till the end of the week, I'll come back with one.
Out of curiosity, do you have a particular resolution in mind?
Re: Resize with only one value
Hi video_m,
You can sort of easily do the computation yourself by storing the calculated width or height in a variable.
For example, if you want to resize 1080 video to 720 you can do the following in the Populate node.
%i_my_digit% = (%i_width%/%i_height%)*720
The result of this would be 1280 if source was 1920x1080. %i_my_digit% being just some arbitrary variable you create yourself and you use it as input for the resize width in the Resize node.
Hope this helps.
-steinar
You can sort of easily do the computation yourself by storing the calculated width or height in a variable.
For example, if you want to resize 1080 video to 720 you can do the following in the Populate node.
%i_my_digit% = (%i_width%/%i_height%)*720
The result of this would be 1280 if source was 1920x1080. %i_my_digit% being just some arbitrary variable you create yourself and you use it as input for the resize width in the Resize node.
Hope this helps.
-steinar
Re: Resize with only one value
Additionally i want to mention that using the resize processor (in combination with the A/V decoder) is only needed in certain special cases e.g. you want to select the resize algorithm or you want to do further filtering after the resize. You could instead just specify the new width and height in each and every encoder processor directly.
If @momocampo answers as well, you have repsone from the whole team, congrats
If @momocampo answers as well, you have repsone from the whole team, congrats
emcodem, wrapping since 2009 you got the rhyme?
Re: Resize with only one value
Thank you, For now have i a special project where everything must be 800px with.FranceBB wrote: ↑Mon Aug 01, 2022 7:32 pm Anyway, to accomplish this, instead of the resizing node, I can easily write a custom Avisynth Script for you.
I'm currently on my mobile 'cause I'm in the UK and not in the office, but if you can wait till the end of the week, I'll come back with one.
Out of curiosity, do you have a particular resolution in mind?
Thank you @steinar and emcodem. i will try your solution!
Re: Resize with only one value
Hello Steinar,admin wrote: ↑Mon Aug 01, 2022 8:26 pm Hi video_m,
You can sort of easily do the computation yourself by storing the calculated width or height in a variable.
For example, if you want to resize 1080 video to 720 you can do the following in the Populate node.
%i_my_digit% = (%i_width%/%i_height%)*720
The result of this would be 1280 if source was 1920x1080. %i_my_digit% being just some arbitrary variable you create yourself and you use it as input for the resize width in the Resize node.
populate.jpg
resize.jpg
Hope this helps.
-steinar
I have try this solution but i get back a error back. "Could not get value for %i_my_digit%!
Did you know what i do wrong?
Thank you.
Kr,
Re: Resize with only one value
Here also me template
Last edited by video_m on Mon Aug 08, 2022 8:17 pm, edited 1 time in total.
Re: Resize with only one value
Aye Kr,
sorry but i cannot imagine how you come to the error message "Could not get value for %i_my_digit%"!
Aside from that, you need to insert a stills decoder processor after the monitor or better before the resize.
sorry but i cannot imagine how you come to the error message "Could not get value for %i_my_digit%"!
Aside from that, you need to insert a stills decoder processor after the monitor or better before the resize.
emcodem, wrapping since 2009 you got the rhyme?
Re: Resize with only one value
i found the mistake. i forgot the av-media deencode
Re: Resize with only one value
Hello All,
I will change the workflow to a another computer. but now get i the error: Watermark@DESKTOP-LG01KEO: Validate: Unknown error occured.
Did somebody what i can do?
Kind regards,
MKZ
I will change the workflow to a another computer. but now get i the error: Watermark@DESKTOP-LG01KEO: Validate: Unknown error occured.
Did somebody what i can do?
Kind regards,
MKZ