I had a need to join two files after some playing around I found the following command worked relatively well:
mencoder -oac copy -ovc copy -noodml -o ./outputfile.avi file1.avi file2.avi
As the files were in the same folder I didn’t use paths to the files, if they are located in other directories then use the full path name.
I did a check with avidemux afterwards and it informed me the index was out of date so I used avidemux to rebuild the index and saved the file. I did notice when watching the video sometimes sound would drop out occasionally.