[FFmpeg-user] How to split and then concatenate a video file?

Žygimantas Bruzgys un1x0nly at gmail.com
Tue Feb 19 12:40:33 CET 2013


On Tue, Feb 19, 2013 at 10:40 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Žygimantas Bruzgys <un1x0nly <at> gmail.com> writes:
>
>> Is there a way I could split the video into segments
>> and later join them together back into a single
>> _smooth_ video file using ffmpeg?
>
> Did you test the segment muxer?

Do you mean it's when you 'force format' with '-f segment'? if so,
yes, I'v tried it. It cuts the video quite nicely. However, '-f
concat' then have troubles joining them:
- reports negative STTS errors
- ffprobe reports shorter duration of an concatenated video (it also
reports STTS errors)
- the actual video is longer than the original clip, because
- there are slight pauses in between split points

I think there might be a bug in this '-f segment' that has to do with
timestamp calculation, but I'm not sure about that.

I've uploaded the concatenated video to youtube for a demonstration:
http://www.youtube.com/watch?v=D-rTWzrnIwU
This video was firstly split into segments of roughly 2 seconds.

Regards,
Žygimantas


More information about the ffmpeg-user mailing list