Converting .mov files to .mp4 using FFmpeg

Solution 1:

For Ubuntu 16 (and higher?):

ffmpeg -i input.mov -vcodec h264 -acodec mp2 output.mp4

I realize the question referred to Ubuntu 14. But since this is the top Google result I got when searching "mov to mp4 ubuntu", I figure it would be worth adding here.

Source: https://mrcoles.com/convert-mov-mp4-ffmpeg/

Solution 2:

Unfortunately Ubuntu 14.04 does not have FFmpeg at all in the standard repositories, an issue that has been rectified in subsequent Ubuntu releases. If you are keen to use default 14.04 offerings you would be using avconv from libav-tools. Use the following:

sudo apt-get install libav-tools libavcodec-extra-54

And then to simply change containers from mov to mp4:

avconv -i input.mov -codec copy output.mp4

If you would prefer a modern version of FFmpeg that fits in well with Trusty Tahr 14.04 (and I would recommend this path) there are 2 good choices:

  1. Use Doug McMahon's great Trusty Multimedia PPA
  2. Compile your own bleeding edge FFmpeg from FFmpeg trac instructions

Lots of good choices! For FFmpeg the command line is only slightly different:

ffmpeg -i input.mov -codec copy output.mp4

And that should solve your issue...

Note: In some cases it may be necessary to actually convert the audio and video codecs contained within the .mov container to fit better in the .mp4 container. Depends entirely on the makeup of the .mov file, in most cases -codec copy should suffice...