How to convert .mkv file into .mp4 file using Avidemux
Avidemux is available for Linux, BSD, Mac OS X and Microsoft Windows under the GNU GPL license. The program was written from scratch by Mean, but code from other people and projects has been used as well.
We have already discussed How to install avidemux in ubuntu.
Procedure to follow
1) Open the mkv file in avidemux and Select safe mode if prompted.
2) Leave the video as copy.
3) Choose File-> Properties. Check if the audio codec is aac.
4) If audio codec is NOT aac, select aac(faac).
Otherwise, leave it as copy. (Sometimes using this option the audio may be out of sync or distorted, in that case select aac(faac) instead.)
Select mp4 for format.
5) Select save, choose location and type a filename with .mp4 as the extension.