Windows batch joining

Questions involving a Windows version of FFmpeg.
Post Reply
KC5SDY
Posts: 2
Joined: Thu May 11, 2017 5:00 am

Windows batch joining

Post by KC5SDY » Thu May 11, 2017 5:10 am

Forgive me if I did not find a post asking the same thing. This is my issue. I am trying to combine audio and video files to make 1 whole mpg. I want to run a batch that will do each one in a folder. Both the audio and video files have the same mp4 extension. Because of this, I have "FILE NAME 1 DESCRIPTION - VIDEO" and "FILE NAME 1 DESCRIPTION - AUDIO". The next file in the series would be "FILE NAME 2 ANOTHER DESCRIPTION - VIDEO" and "FILE NAME 2 ANOTHER DESCRIPTION - AUDIO". I have several hundred files I want to combine, I just do not want to do them one by one.

Doing them one by one, I am able to run this command and it works just fine:
ffmpeg -i FILE NAME 1 DESCRIPTION - VIDEO.mp4 -i FILE NAME 1 DESCRIPTION - AUDIO.mp4 -c:v copy -c:a copy FILE NAME 1 DESCRIPTION.mp4

Is there a way to run a batch of them?

KC5SDY
Posts: 2
Joined: Thu May 11, 2017 5:00 am

Re: Windows batch joining

Post by KC5SDY » Fri Jun 02, 2017 3:46 am

With no replies yet, I am guessing I am SOL.

CoRoNe
Posts: 24
Joined: Thu Aug 22, 2013 5:14 pm
Contact:

Re: Windows batch joining

Post by CoRoNe » Thu Jul 13, 2017 4:22 pm

Code: Select all

FOR /L %%A IN (1,1,100) DO ffmpeg -i "FILE NAME %%A DESCRIPTION - VIDEO.mp4" -i "FILE NAME %%A DESCRIPTION - AUDIO.mp4" -c copy "FILE NAME %%A DESCRIPTION.mp4"
I think this should work for you. Change the '100' to the amount of files you have.

Post Reply