Hello to all,
I need to resize a group of videos so that they have:
%i_height% = 256px
Ex.: if I have a video 1920x1080p I will have a video 456x256.
Important
455 is correct but there need be rounded to 456 obviously
Thank you!
Ps
I need to mimic ffmpeg option: -vf scale=-2:256
all videos with %i_height% equal 256px
Re: all videos with %i_height% equal 256px
You can use s_options just as in my other example i posted to you before with nvenc.
It goes like: disable encoding - calculate the encoding cmd - modify the encoding cmd - execute encoding in a cmd proc
When you replace stuff in the internally calculated encoding cmd, you must make sure that it works in all cases, e.g. in this case i replace
by
Note the comma after 256, it is because other filter already exist in the encoding cmd.
Why did i choose this? Because -vf is always there, independent of the source file, the internally calculated ffastrans encoding cmd will always have carry exactly one "-vf" character.
Real life example:
The internally calculated encoding cmd looks like this. it does not have any scale filter because the h264 processor was set to encode to the same resolution as input has.
Now we can safely replace -vf as stated above, resulting in this filter cmd:
voila, we successfully inserted your desired scale filter into the internally calculated encoding command, from here we just need to execute the encoding in a cmd processor, see attached workflow example.
Of course, nothing speaks against combining this exapmle with the nvenc one and replacing libx264 by h264_nvenc (along with the profile settings)
It goes like: disable encoding - calculate the encoding cmd - modify the encoding cmd - execute encoding in a cmd proc
When you replace stuff in the internally calculated encoding cmd, you must make sure that it works in all cases, e.g. in this case i replace
Code: Select all
-vf
Code: Select all
-vf scale=-2:256,
Why did i choose this? Because -vf is always there, independent of the source file, the internally calculated ffastrans encoding cmd will always have carry exactly one "-vf" character.
Real life example:
Code: Select all
-vf sidedata=delete,metadata=delete,setrange=tv,scale=interl=1,format=yuv422p,bwdif=mode=0:parity=0,format=yuv420p,setfield=prog,setsar=r=1:max=1
Now we can safely replace -vf as stated above, resulting in this filter cmd:
Code: Select all
-vf scale=-2:256,sidedata=delete,metadata=delete,setrange=tv,scale=interl=1,format=yuv422p,bwdif=mode=0:parity=0,format=yuv420p,setfield=prog,setsar=r=1:max=1
Of course, nothing speaks against combining this exapmle with the nvenc one and replacing libx264 by h264_nvenc (along with the profile settings)
emcodem, wrapping since 2009 you got the rhyme?