I`ve been trying to create a batch file that merges all files in a folder using avidemux. Ideally, it would be awesome if this works to do some changes as well (basically rescaling the video).

I have tried with this .bat file but it does not do what I intended:

set avidemux="C:\Program Files\Avidemux 2.7 VC++ 64bits\avidemux.exe"

set videocodec=mp4

for %%f in (*.mp4) do %avidemux% --video-codec %videocodec% --force-alt-h264 --load "%%f" --append "%%f" --save "%%f.avi" --quit

What this does is just open each file individually and save it individually, not actually merging them.

If there are any one-click solutions for this kind of issue it would be also appreciated.


Ok I have found a solution using ffmpeg instead of avidemux. I made the following batch file. In this case, I had to know the folder where the ffmpeg executable was, and also i managed to convert the resolution to a different one

for %%f in (*.mp4) do (
    echo file %%f >> list.txt
F:\ffmpeg\bin\ffmpeg.exe -f concat -safe 0 -i list.txt -vf scale=320:240 output.avi
del list.txt

This did the trick!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.