Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question

migrated from Mar 31 '13 at 0:16

This question came from our site for professional and enthusiast programmers.

ffmpeg.exe -f concat -safe 0 -i "D:\Clips\concatepath.txt" -c copy "D:\Clips\ConcatinatedVideo.mp4"

Where concatepath.txt file is containing all videos path. Here is an example

file 'D:\Clips\video1.mp4'
file 'D:\Clips\video2.mp4'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.