I want to merge videos in batch size of twenty (20) each. I'm running a Linux machine. The videos are in mp4 format and moderate quality. Some even have the audio stream missing. So far I've tried ffmpeg, mencoder, cvlc/vlc and MP4Box. I want to write a command line script to achieve this, since I'm doing batch processing.
The main issue is that some of the solutions I tried work well for two videos, some work well for videos with audio stream and yet others work well for some other subset of my video set. However, I have not been able to find a comprehensive solution for this task.
FFmpeg is the best way to accomplish this from the command line using the concat filter. I tried 20+ different ways before I found this and it works like a charm. If the videos are without audio, your command would be:
If the videos have audio, your command would be:
You can obviously substitute the audio bitrate, channels, etc. for other numbers, but these are very standard.