I have a large folder containing many ts video files as well as an equivalent number of aac audio files. So far, I am only capable of merging a single ts file with a single aac file to create a single mp4/ts output file using this command:
ffmpeg -i file1.ts -i file1.aac -c:v copy -c:a copy output1.mp4
Since I am working with many audio and video files, it is impractical to use the method above. Is there a way that I can perform the merging job for many audio and video files at once instead of doing one combination at a time i.e. e.g merging file2.ts and file2.aac to create output2.ts, file3.ts and file3.aac to create output3.ts and so on. How would I use say, a for loop, or any other looping statement to achieve this objective. Kindly assist. Thanks.