[FFmpeg-user] Concat MTS problems

Alexander Gribanov sunrisecoder at gmail.com
Sat Feb 11 19:56:44 EET 2023


I have a camera which splits long recordings into files 2 Gb size...

How to concat them properly via ffmpeg?

I make text file files.txt like this:
file '2022-12-30_00002.MTS'
file '2022-12-30_00003.MTS'
file '2022-12-30_00004.MTS'
file '2022-12-30_00005.MTS'

And then use the following command:
ffmpeg -f concat -safe 0 -i files.txt -c copy output.mts

The problem is that it doesn't stitch them seamlessly, but instead I feel
like 1-2 seconds audio and video gap or so by playing concatenated video in

Is there any way to check, is it a concatenation problem or the files from
the camera are broken?

Thank You very much in advance :)

More information about the ffmpeg-user mailing list