I assume you have you have ffmpeg Installed on your machine.
The first thing you do, is calling the Terminal and changing to the path where to the Media you want to convert is .
I chose the home directory :
cd ~
Now we can convert by performing this command (I n this example I have converted Ogv tp Mp4)
ffmpeg -i input.ogv -vcodec libx264 output.mp4
input.ogv = the original video.
output.mp4 = the changed video format (You can change the name also as you see here, and the path as well) .
ffmpeg -i input.ogv -vcodec libx264 ~/Desktop/output.mp4
In this example, I changed also the path.