Command line to convert OGV to MP4 video files

Solution 1:

First, get ffmpeg, then:

For x264 encoded .mp4:

ffmpeg -i INPUT -vcodec libx264 "OUTPUT.mp4"

For VP8 .webm:

ffmpeg -i "INPUT" -vcodec libvpx -acodec libvorbis -f webm "OUTPUT.webm"

Here is a useful guide for encoding the video of the MP4.

Solution 2:

I came across this question when looking for the same advice. Following this process worked for me using Ubuntu 11.04:

  1. Use recordmydesktop open-source software to record a screencast. It will output a file called out.ogv but it needs to be transcoded before you can put it in Google Docs:
  2. Transcode the video to mp4: ffmpeg -i inputfile.ogv outfile.mp4 (may need to do sudo apt-get install ffmpeg first).
  3. Test it - sometimes the video and audio can get out of sync!
  4. Upload it as a file in Google Docs