I created a screencast using recordmydesktop which produced an .ogv file. I believe this is an OGG file encoded using the Theora codec. I'm wondering how can I convert this to MPEG4/H.264? I've tried to use FFmpeg in a naive way, as follows:
ffmpeg -i demo.ogv -f mp4 demo.mp4
However this produces an evil blob of dark greens and grays when trying to play it again in MPlayer. I then tried to get more sophisticated, using the command-line flags specified here:
ffmpeg -i demo.ogv \
-s 352x288 -vcodec libx264 -vpre default \
-acodec libmp3lame -ab 192k -ac 2 -ar 44100 -f mp4 \
demo.mp4
But, the result was the same.
If anyone has any insight into what might be the best way to accomplish this task, I'd appreciate it if you could let me know.
This is an older question now but a modern FFmpeg (under Xenial Xerus and releases following this) would successfully convert an ogv file in the following manner:
and this should create an excellent file with great quality playback!
Extra Tweaks:
Some tweaks to these settings are more than possible. Here are some of my suggestions:
-crf 18
. Bear in mind that file size increases as the quality setting is lowered.-movflags +faststart
to the command line if you wish to present your video via simple HTTP(S) progressive download.-strict -2
option but it is still needed for Xenial Xerus...Arista Transcoder
or from command line
You can use this software, that I always use and I think it's really good. To convert an ogv file to mp4 you should choose any Sony device.
FF Multi Converter is another great choice, not only for successful
.ogv
to.mp4
conversation. Simple, user-friendly and elegant interface, gives a complete log of conversion details, supports a huge list of formats (see below), gets the job done quickly.Audio/Video formats:
And any other format supported by ffmpeg.
Image formats:
And any other format supported by ImageMagick.
Document file formats:
Installing on Ubuntu - [Stable release]
To add the ppa to your system resources and install ffmulticonverter, open a terminal and type:
By default ffmulticonverter will bring all of its optional dependencies (ffmpeg, pythonmagick, unoconv) as well.
If you wish, you can install ffmulticonverter alone and then install only the optional dependencies you like manually:
Then you can install the rest of the dependencies separately, depending on what you want to convert:
If you wish to convert videos, install ffmpeg:
sudo apt-get install ffmpeg
If you wish to convert documents, install unoconv:
sudo apt-get install unoconv
If you wish to convert images, install python imagemagick:
sudo apt-get install python-pythonmagick