[FFmpeg-user] Concat MTS problems

Alexander Gribanov sunrisecoder at gmail.com
Sun Feb 12 17:50:09 EET 2023


вс, 12 февр. 2023 г. в 01:41, Anatoly <anatoly at kazanfieldhockey.ru>:

> On Sat, 11 Feb 2023 20:56:44 +0300
> Alexander Gribanov <sunrisecoder at gmail.com> wrote:
>
> > Hello!
> >
> > 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 MPC-HC...
> >
> > 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 :)
> I think that in case of MTS format this may be not 100% correct,
> but may work for some uses:
>  cat 2022-12-30_* > output.mts (on *nix)
> But because you obviously on Windows, then probably:
>  type 2022-12-30_* > output.mts ('type' is a windows command)
> (not sure 'type' is bug free reading large files, note 'cat for
> windows' exist too somewhere):
>

Yes! This was the winner :)
I couldn't even imagine that the solution could be so simple...
But still I will test it a little bit in the editor.
Thank You very very much for the help! :)


> Also may try 'avidemux' http://www.avidemux.org
> (File->open, File->Append)
> Also, surfing the net, one day I came across this:
> https://www.avdshare.com/join-mts-files
> But I just bookmarked it and never downloaded/tested, so be aware of
> possible malware-like features e.t.c.
>
I tried, but unfortunately it is proprietary and allows me to deal with
5-minute videos only...


> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list