FFMPEG Command to Convert OGV Video File to MP4 Video File in Windows 10 Full Tutorial For Beginners

 

This is an older question now but a modern FFmpeg (under Xenial Xerus and releases following this) would convert an ogv file in the following manner:

ffmpeg -i input.ogv \
       -c:v libx264 -preset veryslow -crf 22 \
       -c:a libmp3lame -qscale:a 2 -ac 2 -ar 44100 \
       output.mp4

and this should create an excellent file.

Extra Tweaks:

Some tweaks to these settings are more than possible. Here are some suggestions:

  1. If you wanted a set bitrate for the mp3 sound you would change the setting -qscale:a 2 to the setting -b:a 196k. (Use a higher or lower value for bitrate as you wish.)
  2. If you wanted to get a better quality video output decrease the crf setting to something like: -crf 18. Bear in mind that file size increases as the quality setting is lowered.
  3. Sometimes players such as WMP and Quicktime have trouble with mp3 audio in an mp4 container and in these cases it is sensible to use AAC sound instead:
    ffmpeg -i input.ogv \
       -c:v libx264 -preset veryslow -crf 22 \
       -c:a aac -b:a 160k -strict -2 \
       output.mp4

Leave a Reply