You can also follow this small tutorial:
Step 1: To combine movies using the concat demuxer, first compile a list of the videos you wish to combine into a text file. Here is a video.txt example file. You can add comments to the file, but the demuxer will not use them.
Eg. # videos.txt
file 'input1.mp4'
file 'input2.mp4'
file 'input3.mp4
Step 2: Once that is finished, you can execute the following command to merge the movies mentioned in that file in the order they are listed.
$ ffmpeg -f concat -i videos.txt -c copy output8.mp4