Search code examples
shellcommand-lineffmpegconcatenation

How do I resolve ffmpeg concat command error "unknown keyword..."?


I am trying to concatenate two video files using ffmpeg, and I am receiving an error.

To eliminate compatibility issues between the two videos, I have been concatenating the same video with itself, and the same error persists.

ffmpeg \
  -f concat \
  -safe 0 \
  -i intro_prepped.avi intro_prepped.avi \
  -c copy \
  concat.avi  

And the error output I receive is....

[concat @ 0x220d420] Line 1: unknown keyword 'RIFFf�?' intro_prepped.avi: Invalid data found when processing input

I have tried various combinations of concat flags and have not been able to get it to work. Has anyone seen this error before?


Solution

  • Docs for several ways of concatenating files: https://trac.ffmpeg.org/wiki/Concatenate

    Here's a command I use to concatenate videos:

    ffmpeg \
      -i "concat:input1.avi|input2.avi|input3.avi" \
      -c:a copy \
      -c:v copy \
      output.avi