Convert mov to mp4

By | July 5, 2020

This post shows you how you can use the free ffmpeg tool to convert files: mov to mp4, either single files or whole folders. These days if you make a video with your phone or camera, the chances are it records it as an mp4. Older devices might store videos in mov format, which is not always compatible with modern software – particularly on windows machines.

Get ffmpeg

ffmpeg is a free, open source tool for working with video files. Ffmpeg itself is command-line based, so might take a bit of getting used to if you are not familiar with it. The ffmpeg documentation is dense, but comprehensive – you can read the generic file conversion documentation here.

Download ffmpeg for your platform

See how you can use ffmpeg to turn a series of still images into a movie

Convert mov to mp4 – single file

To convert a single mov to mp4 you can use the commands described in this stackoverflow answer:

ffmpeg -i output.mp4

If you want to output to a different folder you can just include that in the output filename, like this:

ffmpeg -i mp4/output.mp4

This is fine if you only have a single file, but you may also have a whole folder full over mov-formatted movies that you want to convert. ffmpeg can help you with that too.

Convert mov to mp4 – many files

Converting one mov to mp4 at a time is fine for a few files, but if you have whole folder full (or more!) then it makes sense to batch process them in one go. The trick here is to associate the filename of the input file with the filename of the output file.

To do this we will use the scripting tools available on different platforms – shell for Linux/mac and Powershell for windows.

Windows (Powershell)

This works by:

  1. Listing the contents of the current directory

  2. Filtering the contents of that directory to only include mov files

  3. For each one of those files, convert with ffmpeg and change the filename’s extension from ‘mov’ to ‘mp4’ (note this is case-sensitive, so you may need to swap ‘mov’ with ‘MOV’ for example)

ls | Where { $_.Extension -eq ".mov" } | ForEach { ffmpeg -i $_.FullName $_.Name.Replace(".mov", ".mp4") }

With a small modification we can output to a specified folder:

ls | Where { $_.Extension -eq ".mov" } | ForEach { ffmpeg -i $_.FullName "output_folder/$($_.Name.Replace(".mov", ".mp4"))" }

For Linux/mac users, you can install powershell for linux, if you like, or check the commands for linux below.


For Linux or mac it is probably easier to use shell scripting rather than powershell:

for i in *.mov; do ffmpeg -i "$i" "mp4/${i%.*}.mp4"; done

If you are a windows user you can use this method if you install the Windows Subsystem for Linux.

You can read more discussion of batch processing on this StackOverflow answer.