Using FFMPEG to join two MTS files together

Reado picture Reado · Aug 24, 2010 · Viewed 14.2k times · Source

I have two MTS video files, each one 2 minutes long. I need to be able to join the files together and convert the format to MPEG4. I have a suitable command line for converting MTS to MP4 but don't know how to join the files together in the first place.

Some articles on the web suggest using the CAT command, like:

cat video1.mts video2.mts > whole_video.mts

However this doesn't work and according to FFMPEG, "whole_video.mts" is only 2 minutes long, not 4 minutes.

Does anyone know how to join the files together? Is FFMPEG the best program to use to do this? Thanks in advance.

Answer

Myke Carter picture Myke Carter · Aug 5, 2015

The following worked perfectly for me (i.e. resulting in seamless joins):

ffmpeg -i "concat:00019.MTS|00020.MTS|00021.MTS|00022.MTS" output.mp4