News:

--

Main Menu

Batch Combining MP4 Files with the same name

Started by xrocker, January 29, 2018, 12:13:48 AM

Previous topic - Next topic

xrocker

Hi, I am looking for a way to loop several mp4 files that are in the folder, At the moment I just drag and drop the same mp4 file twice to loop it twice or as many times as I want to, and use mp4muxer to save it into new longer mp4 file.

Problem:
Videos are not cross-faded and is time consuming when working with 100s of mp4 files.

I am looking for a solution, if anyone can help me please to create .bat file or suggest me a way of doing this in a batch. Your help will greatly help me.
Thank you.

eumagga0x2a

As Avidemux cannot cross-fade, I doubt that any Avidemux-based solution would fit your requirements. Apart from that, Avidemux can both append new and copy/paste already loaded videos, sure (please use the latest nightly for better experience), both graphically and on command line. Depending on what you want to achieve, scripting might be much more time consuming than pressing Ctrl+V a couple of times in Avidemux.

If you just want a video with the same audio to be played in a loop, a lot of video players support this functionality.

xrocker

Thank you for your response. if crossfade is not possible. is there any script that can loop the video couple of times?
Ctrl+ V is not an option for me considering I have 100s of videos if not 1000s that I have to work on every now and often..
Thank you

Jan Gruuthuse

#3
the script would just need to parse through the directory
load in avidemux the found "video file name"  and append the same "video file name"
then re-encode the whole thing, key frame issues when the video does not end on keyframe.
I am not that fluent any more in scripting. Perhaps someone else could pick up on this.


not certain if this would be allowed or how to split this so you would have
for %%f in (*.avi) do %avidemux% --load "%%f" --append "%%f" --run "SomeSettings.py" --save "%%f.mp4" --quit

or how to split this so you would have something like in your script:
do (
%avidemux% --load "%%f"
%avidemux% --append "%%f"  --run "SomeSettings.py" --save "%%f.mp4"
)

xrocker

thank you for your answer... but is there no way to avoid reencoding.. This takes time.. and when I save looped video manually I use mp4muxer to copy th e2 video clips into 1 single video clip without encoding again.. This saves time and resources a lot..

Jan Gruuthuse

You could try using [copy] mode. If the video clip does not end on key frame, it will have issues when playing the 2nd part of the new video.

xrocker

Thank you, I will try this later tomorrow and report.