Converting .mov files to .mp4 using FFmpeg

25,059

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...

Solution 3

Under Ubuntu 16.04 I used kdenlive to convert Vitamania*.mov to Vitamania.mp4 (7Gb -> 0.5Gb) as follows:

  • Project / Add clip
  • Drag the clip to the video 1 timeline
  • Project / Render (mp4, H264/ACC fast, video quality 20, audio quality 160)

It took 1.5 hours.

Share:
25,059

Related videos on Youtube

Roadrawts
Author by

Roadrawts

Updated on September 18, 2022

Comments

  • Roadrawts
    Roadrawts almost 2 years

    The conversion answers that I have seen on the web suggest using a -c option in the command line using FFmpeg. However using Ubuntu 14.04 the -c option does not exist in FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1.

    Is there a newer version? If so how can I get it. Using apt-get it says that this is the newest version.

  • DK Bose
    DK Bose over 8 years
    Instead of compiling, what about deb http://ppa.launchpad.net/mc3man/trusty-media/ubuntu trusty main?
  • andrew.46
    andrew.46 over 8 years
    Indeed another great choice that I shall add in to my answer....
  • llogan
    llogan over 5 years
    I doubt anyone wants MP2 audio in MP4. Use aac instead.
  • Antonio
    Antonio over 2 years
    Well your command line is working however it is re-encoding the video and in my case I got 5 Mb/s instead of th 10 M b/s from the original. The solution is the following : $ ffmpeg -i input.mov -codec copy -acodec mp2 output.mkv which preserve the original video bit rate ...