[FFmpeg-user] Multiple parts of a video

Michael Koch astroelectronic at t-online.de
Tue May 31 20:06:54 EEST 2022


Am 31.05.2022 um 18:43 schrieb Cecil Westerhof via ffmpeg-user:
> Michael Koch <astroelectronic at t-online.de> writes:
>
>> I have a short example in chapter 2.57 of my book:
>> http://www.astro-electronic.de/FFmpeg_Book.pdf
> Just to make sure I understand it, I should do something like:
>      ffmpeg -ss %S1% -t %L1% -i %I1%     \
>             -ss %S2% -t %L2% -i %I1%     \
>             -ss %S3% -t %L3% -i %I1%     \
>             -lavfi "concat=n=3:v=1:a=0"  \
>             -an %OUT%
>
> But if I understand it well, this works on the iframes, would it not
> be better (but longer) to use:
>      ffmpeg -i %I1% -ss %S1% -t %L1%     \
>             -i %I1% -ss %S2% -t %L2%     \
>             -i %I1% -ss %S3% -t %L3%     \
>             -lavfi "concat=n=3:v=1:a=0"  \
>             -an %OUT%

I think that won't work. If you write the options after the input file, 
then they are applied to the next input file, and the options in the 
third line are applied to the output file.
The concat filter does also work with audio. I just didn't need audio in 
my example.

  Michael


More information about the ffmpeg-user mailing list