Author Topic: Batch to Resize an avi file.  (Read 384 times)


  • Newbie
  • *
  • Posts: 1
Batch to Resize an avi file.
« on: August 25, 2017, 02:12:31 PM »
Hello people,

I have a batch file with below code:

set avidemux="C:\Program Files\Avidemux 2.5\avidemux2.exe"
set videocodec=x264
set audiocodec=AAC
set outputformat=mp4
for %%f in (*.avi) do %avidemux% --force-alt-Xvid --load "%%f" --output-format MP4 --video-codec %videocodec% --audio-normalize --audio-codec %audiocodec% --save "%%f.mp4" --quit

And I was wondering if there is a way to resize the file in the convert process.

Could anyone have an idea how to do this?


Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 5888
Re: Batch to Resize an avi file.
« Reply #1 on: August 26, 2017, 04:30:19 AM »
Not certain this will work with 2.5 branch? If you don't have special reason to stay on 2.5 branch, move onwards to 2.7 branch.
Load a video type you want to resize with batch.
Set the filter for resizing. (this mostley only works with video of the same resolution).
Save as project file "" (XXX could be (640, 720, ....) to give you future reference what script does.

Edit "" and remove the reference to the video used to set the filter.
when edited addapt your commandline:
Code: [Select]
for %%f in (*.avi) do %avidemux% --force-alt-Xvid --load "%%f" --output-format MP4 --video-codec %videocodec% --audio-normalize --audio-codec %audiocodec% --save "%%f.mp4" --quitand now insert "--run ""
Code: [Select]
for %%f in (*.avi) do %avidemux% --force-alt-Xvid --load "%%f" --output-format MP4 --video-codec %videocodec% --audio-normalize --audio-codec %audiocodec% --run "" --save "%%f.mp4" --quit
More details can be found here:
Simple Command line usage with Tinpy Project
« Last Edit: August 26, 2017, 05:55:28 AM by Jan Gruuthuse »