How can I convert an ogv file to mp4?

100,788

Solution 1

Arista Transcoder Install Arista Transcoder

or from command line

sudo apt-get install arista -y

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

Solution 2

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:

ffmpeg -i input.ogv \
   -c:v libx264 -preset veryslow -crf 22 \
   -c:a aac -b:a 128k -strict -2 \
   output.mp4

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:

  1. 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.
  2. Consider adding -movflags +faststart to the command line if you wish to present your video via simple HTTP(S) progressive download.
  3. Newer versions of FFmpeg (i.e. released after December 5th 2015) will not need the -strict -2 option but it is still needed for Xenial Xerus...

Solution 3

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:
100,788
jbeard4
Author by

jbeard4

Web front-end engineer based in Syracuse, NY. I develop SCION, an open source implementation of SCXML/Statecharts in JavaScript.

Updated on September 17, 2022

Comments

  • jbeard4
    jbeard4 almost 2 years

    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.

  • tshepang
    tshepang over 13 years
    maybe also mention the Nautilus plugin?
  • DrKenobi
    DrKenobi over 13 years
    @Tshepang, I've never used the Nautilus plugin. How is it called? I want to try it now!
  • tshepang
    tshepang over 13 years
    nautilus-arista
  • DrKenobi
    DrKenobi over 13 years
    @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!
  • lebatsnok
    lebatsnok over 10 years
    It says there are missing plugins that can't be installed so I can't use it for converting ogv to mp4.
  • Lonnie Best
    Lonnie Best over 9 years
    Install arista like this (all one line): sudo add-apt-repository ppa:mc3man/trusty-media ; sudo apt-get update ; sudo apt-get install arista gstreamer0.10-ffmpeg
  • Luís de Sousa
    Luís de Sousa about 9 years
    On Ubuntu 14.04 this command fails with the error message: Invalid encoder type 'libmp3lame'.
  • andrew.46
    andrew.46 about 9 years
    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.
  • llogan
    llogan almost 8 years
    Some players, such as WMP and QuickTime, have trouble decoding some MP4 files that use MP3 audio (for WMP it depends on audio sample rate).
  • andrew.46
    andrew.46 almost 8 years
    @LordNeckbeard Thanks for the tip, I have updated the answer, feel free to correct anything in it :)
  • hlovdal
    hlovdal about 7 years
    This was an excellent program, with up to date version in RPM Fusion repo.
  • jrg
    jrg over 6 years
    Looks like Arista is no longer available in the repositories :(
  • jmunsch
    jmunsch about 5 years
    also for "File for preset" errors : stackoverflow.com/a/11384886/2026508
  • Mona Jalal
    Mona Jalal almost 4 years
    E: Unable to locate package arista
  • Mona Jalal
    Mona Jalal almost 4 years
    the webpage also is not available anymore
  • lefterav
    lefterav over 3 years
    It didn't work!
  • andrew.46
    andrew.46 over 3 years
    @lefterav What is the error message?
  • llogan
    llogan over 2 years
    @andrew.46 Recommend removing libmp3lame altogether: too many potential issues. Adding -movflags +faststart might help the few users using this to present their videos via simple HTTP(S) progressive download.
  • andrew.46
    andrew.46 over 2 years
    @llogan Thanks for your suggestions which I have incorporated fully :)