Join videos through concatenation
From FFmpeg FAQ:


  A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow to
  concatenate video by merely concatenating the files containing them.


Hence you may concatenate your multimedia files by first transcoding them to these privileged formats, then using cat command (or copy under Windows), and finally transcoding back to your format of choice.

ffmpeg -i input1.avi -qscale:v 1 intermediate1.mpg
ffmpeg -i input2.avi -qscale:v 1 intermediate2.mpg
cat intermediate1.mpg intermediate2.mpg &gt; intermediate_all.mpg
ffmpeg -i intermediate_all.mpg -qscale:v 2 output.avi