If you are simply trying to circumvent doing each file individually just stack the commands, merging some is a bit more confusing though...
To concatenate video files you could use an additional text file that contains paths to each file you want to merge.
I will be using a file path to the windows videos folder for all examples, you will need to replace this with the actual path. So the txt file should contain something like this:
Code: Select all
file 'C:\Users\[Username]\Videos\DVD\input1.vob'
file 'C:\Users\[Username]\Videos\DVD\input2.vob'
Each file must be separated by line breaks and formated just like I did above.
Save that to where ever you want, but for this example lets say we save it to the Documents folder within windows as "concatenate.txt"
You now need another command that reads that file with the concat function:
Code: Select all
ffmpeg -f concat -safe 0 -i C:\Users\[Username]\Documents\concatenate.txt c:v copy c:a copy C:\Users\[Username]\Videos\DVD\output1+2.mp4
concat is the function, -safe 0 just tells FFMPEG that is safe to read from the input file, now lets put everything together.
First you would need to make
multiple concatenate.txt files for each time you concatenate videos. You could do it with just one concatenate text file editing and saving it between runs, but you'd like to do it all at once no? Something like this:
concatenate1.txt:
Code: Select all
file 'C:\Users\[Username]\Videos\DVD3\input1.vob'
file 'C:\Users\[Username]\Videos\DVD3\input2.vob'
concatenate2.txt:
Code: Select all
file 'C:\Users\[Username]\Videos\DVD6\input1.vob'
file 'C:\Users\[Username]\Videos\DVD6\input2.vob'
So now lets say you want to do multiple DVD files at once while concatenating some here and there using the files we just created, it should look something like this:
Code: Select all
ffmpeg -i C:\Users\[Username]\Videos\DVD1\input.vob c:v copy c:a copy C:\Users\[Username]\Videos\DVD1\output.mp4 ^
-i C:\Users\[Username]\Videos\DVD2\input.vob c:v copy c:a copy C:\Users\[Username]\Videos\DVD2\output.mp4 ^
-f concat -safe 0 -i C:\Users\[Username]\Documents\concatenate1.txt c:v copy c:a copy C:\Users\[Username]\Videos\DVD3\output1+2.mp4 ^
-i C:\Users\[Username]\Videos\DVD4\input.vob c:v copy c:a copy C:\Users\[Username]\Videos\DVD4\output.mp4 ^
-i C:\Users\[Username]\Videos\DVD5\input.vob c:v copy c:a copy C:\Users\[Username]\Videos\DVD5\output.mp4 ^
-f concat -safe 0 -i C:\Users\[Username]\Documents\concatenate2.txt c:v copy c:a copy C:\Users\[Username]\Videos\DVD6\output1+2.mp4 ^
-i C:\Users\[Username]\Videos\DVD7\input.vob c:v copy c:a copy C:\Users\[Username]\Videos\DVD7\output.mp4
The carrot symbol (^) represents line breaks when using CMD in windows. If you are using Linux I'm not sure what represents a line break but I'm sure there is something, I like to use line breaks to keep everything clean.
concat documentation:
https://trac.ffmpeg.org/wiki/Concatenate