The FFmpeg video handling utility can be used to join videos together into one larger video. If the video files are MPEG-1, MPEG-2, MPEG Program Stream (PS) , or Digital Video (DV) files, you can use a Direct Stream copy method, by issuing a command in the form
ffmpeg -i "concat:input1.mpg|input2.mpg" -c copy
output.mpg. Using ffmpeg for the concatenation operation ensures that
file headers and timestamps are handled correctly, whereas using operating
system commands such as cat on a Linux system or
copy /b on a Microsoft Windows system may produce payback issues.
This method can not be used for
MPEG-4 files, however.
Another method that can be used for MP4 files, as well as the above file types is the Concat Demuxer method, if the files use the same codecs and parameters, such as resolution, framerate, etc. If the files have the same characteristics, you can use a command of the form:
ffmpeg -f concat -safe 0 -i inputFileList.txt
-c copy output.mp4
[ More Info ]
