Canon cameras (and maybe others) split MTS files at 2 GB boundaries. This causes audio/video glitches since the break between files gets interpreted by playback programs as invalid frames at the end/beginning of the consecutive files.
To fix this, simply concatenate the files together… e.g.
$ cat 00002.MTS 00003.MTS 00004.MTS 00005.MTS > act1.MTS $ cat 00006.MTS 00007.MTS 00008.MTS > act2.MTS
Editing the MTS files directly seems to cause problems because the files aren't particularly suited to seeking. (While it does work, it's quite slow.) To get around this, we can (losslessly) copy the files to a Matroska container:
$ ffmpeg -i act1.MTS -vcodec copy -acodec copy -sn act1.mkv $ ffmpeg -i act2.MTS -vcodec copy -acodec copy -sn act2.mkv
Untested: It looks like it should be possible to combine these two actions together:
$ cat 00002.MTS 00003.MTS 00004.MTS 00005.MTS | ffmpeg -i pipe:0 -vcodec copy -acodec copy -sn act1.mkv $ cat 00006.MTS 00007.MTS 00008.MTS | ffmpeg -i pipe:0 -vcodec copy -acodec copy -sn act2.mkv
Now we can edit the files in Kdenlive. Note that the files are still highly compressed, so this will take a decently fast computer.