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:
- Use Doug McMahon's great Trusty Multimedia PPA
- 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.
Related videos on Youtube
Roadrawts
Updated on September 18, 2022Comments
-
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 over 8 yearsInstead of compiling, what about
deb http://ppa.launchpad.net/mc3man/trusty-media/ubuntu trusty main
? -
andrew.46 over 8 yearsIndeed another great choice that I shall add in to my answer....
-
llogan over 5 yearsI doubt anyone wants MP2 audio in MP4. Use
aac
instead. -
Antonio over 2 yearsWell 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 ...