Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a screencast using recordmydesktop which produed a .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: Converting a video file in arbitrary file format into MPEG4/H.264?

ffmpeg -i demo.ogv \
       -s 352x288 -vcodec libx264 -vpre default \
       -acodec libmp3lame -ab 192k -ac 2 -ar 44100 -f 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.

share|improve this question
Here's a tutorial how to compile ffmpeg x264: – Enissay Oct 27 '12 at 2:01
Just want to mention that I successfully uploaded an ogv video to Youtube. I guess one could follow that path and then use an online Youtube to mp4 converter. – eyalev Feb 19 '14 at 13:53
up vote 25 down vote accepted

Arista Transcoder Install Arista Transcoder

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.

alt text

share|improve this answer
This totally did the trick. – jbeard4 Nov 9 '10 at 1:58
maybe also mention the Nautilus plugin? – Tshepang Nov 9 '10 at 23:03
@Tshepang, I've never used the Nautilus plugin. How is it called? I want to try it now! – DrKenobi Nov 10 '10 at 0:42
nautilus-arista – Tshepang Nov 10 '10 at 0:49
@Tshepang, I can't try it now :( I'm using 10.04 LTS and the plugin is available for 10.10 and 11.04. I'll have to wait for my new laptop to try it. Thanks for the info! – DrKenobi Nov 10 '10 at 2:51

This is an older question now but a modern FFmpeg, early 2014, would convert in the following manner:

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

and this should create an excellent file....

share|improve this answer
On Ubuntu 14.04 this command fails with the error message: Invalid encoder type 'libmp3lame'. – Luís de Sousa Apr 28 '15 at 18:38
For 14.04 try installing libavcodec-extra-54 and this should fix the issue... If compiling you will need the -dev file for lame: libmp3lame-dev. – andrew.46 May 1 '15 at 21:57

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.

enter image description here

Audio/Video formats:

aac, ac3, afc, aiff, amr, asf, au, avi, dvd, flac, flv, mka, mkv, mmf, mov, mp3, mp4, mpg, ogg, ogv, psp, rm, spx, vob, wav, webm, wma, wmv

And any other format supported by ffmpeg.

Image formats:

bmp, cgm, dpx, emf, eps, fpx, gif, jbig, jng, jpeg, mrsid, p7, pdf, picon, png, ppm, psd, rad, tga, tif, webp, xpm

And any other format supported by ImageMagick.

Document file formats:

doc  -> odt, pdf
html -> odt
odp  -> pdf, ppt
ods  -> pdf
odt  -> doc, html, pdf, rtf, sxw, txt, xml
ppt  -> odp
rtf  -> odt
sdw  -> odt
sxw  -> odt
txt  -> odt
xls  -> ods
xml  -> doc, odt, pdf

Installing on Ubuntu - [Stable release]

To add the ppa to your system resources and install ffmulticonverter, open a terminal and type:

sudo add-apt-repository ppa:ffmulticonverter/stable
sudo apt-get update
sudo apt-get install ffmulticonverter

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:

sudo apt-get install --no-install-recommends ffmulticonverter

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

share|improve this answer

protected by Community Apr 18 '14 at 12:55

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.