I would like to take several subsections of a video and concatenate them using the concat ffmpeg filter. It's just like the the example in the FFmpeg documentation, except that all of the clips are from the same source video.
Here is what I am trying:
ffmpeg \ -ss 1.0 -frames:v 20 -i myInput.mp4 \ -ss 2.0 -frames:v 20 -i myInput.mp4 \ -ss 3.0 -frames:v 20 -i myInput.mp4 \ -filter_complex '[0:0][0:1][1:0][1:1][2:0][2:1]concat=n=3:v=1:a=2[v][a1][a2]' \ -map '[v]' -map '[a1]' -map '[a2]' myOutput.mp4
When I try this, I get the following error (full output here):
Stream specifier ':0' in filtergraph description [0:0][0:1][1:0][1:1][2:0][2:1]concat=n=3:v=1:a=2[v][a1][a2] matches no streams.
A few things:
- What's with the error? According to the stderr output, those streams do exist. What am I missing?
- Shouldn't the -ss (and -frames:v) be reflected in the "Duration: ... start: ... " line of the stderr output when the inputs are listed?
- Will the "-frames:v" option even work to specify the duration of an input? (apparently -t is only for output??) Is there a way to specify the duration of an input with seconds instead of frames?
Help me LordNeckbeard -- you're my only hope!