Additionally, you can use the concat protocol instead of cat or copy which will avoid creation of a potentially huge intermediate file.

ffmpeg -i input1.avi -qscale:v 1 intermediate1.mpg
ffmpeg -i input2.avi -qscale:v 1 intermediate2.mpg
ffmpeg -i concat:"intermediate1.mpg|intermediate2.mpg" -c copy intermediate_all.mpg
ffmpeg -i intermediate_all.mpg -qscale:v 2 output.avi
Hence you may concatenate your multimedia files by first transcoding them to these privileged formats, then using the humble cat command (or the equally humble 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 > intermediate_all.mpg
ffmpeg -i intermediate_all.mpg -qscale:v 2 output.avi
Another option is usage of named pipes, should your platform support it:

mkfifo intermediate1.mpg
mkfifo intermediate2.mpg
ffmpeg -i input1.avi -qscale:v 1 -y intermediate1.mpg < /dev/null &
ffmpeg -i input2.avi -qscale:v 1 -y intermediate2.mpg < /dev/null &
cat intermediate1.mpg intermediate2.mpg |\
ffmpeg -f mpeg -i - -c:v mpeg4 -c:a libmp3lame output.avi

Recommend

FFMPEG FFmpeg FAQ 3 Usage 3.14 How can I concatenate video files? 3.14.3 Concatenating using the concat protocol (file level)

FFMPEG FFmpeg FAQ 3 Usage 3.12 How can I read DirectShow files?

FFMPEG FFmpeg FAQ 3 Usage 3.3 How do I encode movie to single pictures?

FFMPEG FFmpeg FAQ 3 Usage 3.2 How do I encode single pictures into movies?

FFMPEG FFmpeg FAQ 2 Compilation 2.4 How do I use pkg-config when cross-compiling?

FFMPEG FFmpeg FAQ 2 Compilation 2.3 How do I make pkg-config find my libraries?

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.43 zmq

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.42 unix

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.41 udp 3.41.1 Examples

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.41 udp

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.40 tls

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.39 tcp

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.38 tee

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.37 subfile

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.35 srt

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.34 sctp

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.33 sap 3.33.2 Demuxer

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.33 sap 3.33.1 Muxer

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.32 rtsp 3.32.1 Examples

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.32 rtsp

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.30 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.29 libssh

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.22 rtmp

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.20 prompeg

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.19 pipe

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.18 md5

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.17 mmsh

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.15 Icecast

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.14 http 3.14.1 HTTP Cookies

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.14 http

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.13 hls

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.10 ftp

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.9 file

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.8 data

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.7 crypto

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.6 concatf

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.5 concat

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.4 cache

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.3 bluray

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.2 async

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.1 amqp

FFMPEG FFmpeg Formats Documentation 5 Metadata

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.35 webm_dash_manifest 4.35.2 Example

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.34 webm_chunk 4.34.2 Example

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.33 tee 4.33.2 Examples

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.30 segment, stream_segment, ssegment 4.30.2 Examples

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.30 segment, stream_segment, ssegment 4.30.1 Options

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.27 nut

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.26 null

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.24 mpegts 4.24.1 Options

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.23 mp3

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.22 mov, mp4, ismv 4.22.2 Example

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.21 md5 4.21.1 Examples

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.20 matroska 4.20.1 Metadata

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.19 image2 4.19.2 Examples

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.18 ico