If you can play it with mplayer, then you should be able to re-encode it using mencoder (which is usually packaged with mplayer).
http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html
I think you can directly merge MPEG videos by simply concatenating them. I'm not sure if that's technically acceptable, but mplayer seems to cope with it:
Code:
cat file1.mpeg file2.mpeg > merged.mpeg