How to Convert MOV to MP4 With FFmpeg: Stream-Copy When the Codec Already Matches, and Re-Encode Only When It Doesn't
Short answer: to turn a QuickTime .mov into an .mp4 , start with -c copy . If the file is already H.264 video plus AAC audio, stream copy remuxes the packets, the first-frame RGB24 md5 stays the same, and the duration does not change. If the video is ProRes, DNxHR, or another codec that MP4 players will not handle, you have to re-encode. The five pytest checks below were run on a real…
To convert a QuickTime .mov file to an .mp4 using FFmpeg, begin by using the -c copy option. If the file already contains H.264 video along with AAC audio, stream copying simply remuxes the packets, keeping the first-frame RGB24 md5 and duration unchanged. However, if the video is encoded with ProRes or another codec not supported by MP4 players, re-encoding is necessary.
The following five pytest checks were performed on a real 12.064-second 720×1280 fixture (grey-hoodie-v2.mp4, md5 a50e13313b71a76dbd179dcdc2c2b6bf), which confirms this process is reproducible and not a product walkthrough.
An optional CTA suggests checking out Voor's Tiny Desk AI page for an example of current image-to-video formats once you have a portable MP4. Changing the file extension from .mov to .mp4 does not convert the video; it merely swaps the container without altering the underlying codec. This is beneficial when the bitstream is already in H.264 or H.265 format and requires merely a more widely accepted wrapper.
Conversely, if the bitstream is encoded with ProRes, stream copying to MP4 won't suffice, and re-encoding is required.
In this test, a short ProRes MOV was created from the same fixture and then converted to an H.264 MP4 with AAC audio. The re-encoding process changes the codec from ProRes to H.264, resulting in a 720×1280 MP4 with a duration of approximately two seconds. Attempting to stream copy the ProRes MOV into an MP4 container fails because FFmpeg reports that ProRes isn't supported in the MP4 container, thus yielding an unplayable file.
The pytest file runs five checks against the fixture and the two commands used, ensuring the results are consistent and reliable. After successfully creating a portable MP4, you can upload, edit, or send the file without worrying about the container type. If you later need to transform an image into a short video clip, Voor's Tiny Desk AI page offers a current image-to-video solution without needing to use the aforementioned FFmpeg commands.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.