Being a versatile media player, VLC has the ability to transcode a media file from one format to one another. Here is how you can convert from .ogg (or .ogm) format to mp4.
First, install VLC media player
sudo apt-get install vlc
Open VLC (Applications -> Sound & Video -> VLC media player)
Click Trancode/save to a file
Select a stream: point to the movie file that you want to convert
Check Transcode Video. Choose the format that you want to convert to. If you want to transcode the sound, check Transcode Audio and choose the format.
Set the encapsulation format. If you are not sure, leave it as RAW
Determine the output filename
Click Finish. VLC will start to transcode the file.