Join AVCHD MTS files with FFmpeg

Simple ways to get AVCHD spans joined.


Many AVCHD video cameras write large video in many MTS fragments. For example, there are typical flash card files from a Sony NEX camera:

00123.MTS	1905 MB
00124.MTS	2026 MB
00125.MTS	2026 MB
00126.MTS	 783 MB
00127.MTS	2003 MB

Here 00125.MTS, 00126.MTS and 00127.MTS are parts of the same recording session.

To use these spans in any video editor or media player you should join them together.

The Simplest Way using Copy

Use a Windows batch command:

copy /b 00125.MTS + 00126.MTS + 00127.MTS out.mts

In some cases this way may not work, so use next methods:

Join MTS Files with no AC3 Recode using FFmpeg

ffmpeg.exe -i "concat:00125.MTS|00126.MTS|00127.MTS" -vcodec copy -acodec ac3 -sn

AC3 is not supported by DaVinci Resolve, so you can use next method:

Join MTS Files for DaVinci Resolve using FFmpeg

ffmpeg.exe -i "concat:00125.MTS|00126.MTS|00127.MTS" -vcodec copy -acodec pcm_s16be -sn

Please note that very long sequences may not be placed in MOV container. You can try MKV instead. Or make MP4 with a near-lossless AAC encoding:

Join MTS Files to MP4 using FFmpeg

ffmpeg.exe -i "concat:00125.MTS|00126.MTS|00127.MTS" -vcodec copy -acodec aac -ab 512k -cutoff 22050 -sn out.mp4

Please note that AAC encoder from FFmpeg has very poor quality, so we use 512k. You can try 320k or less if your audio record is not important. For old FFmpeg versions add -strict experimental.

Using Video Artifact

Extended editions of Video Artifact can join camera source files when importing using third party FFmpeg.exe. They select required spans automatically. But a manual joining is required if you use a Basic edition.