[FFmpeg-user] Multiple parts of a video

Michael Koch astroelectronic at t-online.de
Sun May 29 14:17:55 EEST 2022

Am 28.05.2022 um 21:17 schrieb Cecil Westerhof via ffmpeg-user:
> Paul B Mahol <onemda at gmail.com> writes:
>> On Sat, May 28, 2022 at 4:28 PM Cecil Westerhof via ffmpeg-user <ffmpeg-user at ffmpeg.org> wrote:
>>   When I just want to have a certain part of a video, I can do something
>>   like:
>>       ffmpeg -y -i input.MTS     \
>>              -ss 00:08           \
>>              -to 00:17           \
>>              -acodec copy        \
>>              -vcodec libx264     \
>>              -preset veryfast    \
>>              output.mp4
>>   But what if I want several parts of a video in my video?
>>   Do I need to cut the different parts out of the video and concatenate
>>   them, or is it possible to do it with one command?
>> Using concat filter.
> That is exactly what I already know: cutting the different parts.
> Probably one command for each part and then concatenate them.
> So n + 1 commands.
> My question was: can it be done with one command?

Please have a look at

"Concat demuxer", "Concat protocol" and "Concat filter" are three 
different things.
You did use the concat demuxer. Now if you want to do all in one line, 
you must use the concat filter.


More information about the ffmpeg-user mailing list