Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using FFMPEG to join two MTS files together

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.

like image 751
Reado Avatar asked Aug 24 '10 08:08

Reado


1 Answers

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
like image 58
Myke Carter Avatar answered Oct 12 '22 09:10

Myke Carter