[FFmpeg-user] join two video files portions

Liam Condron-Farnos 23liam at googlemail.com
Sat Feb 2 15:52:43 CET 2013

>It's ok also in more steps.
>It could be:
>1) determine actual duration of video file
>2) subtract 5sec from it and use it as a start position for -ss
>If needed I could use a c++ prog for it.

c++ would probably be overkill, you could just write it up in a bash/batch
script invoking ffprobe and ffmpeg.

ffprobe input.mp4 2>&1 | sed -n '/Duration:/s/.*:

...will get you the duration of a video, assuming your system has sed.
Actually working this into a script is off-topic for this mailing list, of

More information about the ffmpeg-user mailing list