I am trying to concat a few .mp4 files. I first create intermediate .mpg clips, and then merge them together with 'cat' command; then convert it to .mp4 files
for example,
ffmpeg -i input1.mp4 -qscale:v 1 intermediate1.mpg
ffmpeg -i input2.mp4 -qscale:v 1 intermediate2.mpg
// Now merge them together
cat intermediate1.mpg intermediate2.mpg > intermediate_all.mpg
ffmpeg -i intermediate_all.mpg -qscale:v 2 output.mp4
Now, I would like to merge all .mpg files within a directory the following command works if I have max 9 .mpg files
cat folder/*.mpg > intermediate_all.mpg
But, if I got more then 9 .mpg files, the movie sequence breakes, meaning no. 10 clip shows up after no. 1 clip which I do not want. Is there any naming convention that I can follow with ffmpeg. In imagemagick, I can easily use the following syntax and it works, but in ffmpeg it is not working.
cat folder/%d.mpg or cat folder/%d.mpg[0-10]