FFmpeg convert video format: MOV, MKV, MP4 and WebM
To convert MOV or MKV to MP4, try a remux first: -c copy rewrites the container and does not touch the video. On our 10 s test file it took 0.08 s and gave a 4.10 MB MP4 with the same h264 video. A VP9 WebM encode of the same file took 52.6 s and gave 2.40 MB.
What to choose
A remux changes the container only. It is quick and has no quality loss, but it works only when the target container accepts the codecs inside. A re-encode works for anything and costs time and some quality.
| Job | Method | Result on our 10 s file |
|---|---|---|
| MOV to MP4 | Remux (-c copy) | 4.10 MB in 0.08 s, video h264, audio aac |
| MKV to MP4 | Remux (-c copy) | 4.10 MB in 0.09 s, video h264, audio aac |
| MOV to MP4, new encode | libx264, crf 23 | 2.83 MB in 6.76 s |
| MOV to WebM | libvpx-vp9 and libopus | 2.40 MB in 52.6 s |
MOV or MKV to MP4
Our test input in.mov was 4.10 MB, h264 video and aac audio, 240 frames. We made in.mkv from it with -c copy. Both remuxed to MP4 with all 240 frames.
ffmpeg -i in.mov -c copy out_remux.mp4ffmpeg -i in.mkv -c copy out_mkv.mp4ffmpeg -i out_remux.mp4 -c copy back.movThe MKV remux reported a container length of 10.031 s, against 10.000 s for the MOV remux. Check the length after a remux.
Re-encode when you need to
A re-encode gives you a standard H.264 and AAC MP4. See the compress page for how CRF changes size and quality.
ffmpeg -i in.mov -c:v libx264 -crf 23 -c:a aac out_enc.mp4A raw H.264 stream has no container, so give FFmpeg the frame rate when you wrap it. We pulled the stream out of in.mov (3.93 MB) and wrapped it again. The new MP4 had 238 frames, against 240 in the source.
ffmpeg -i in.mov -an -c:v copy -bsf:v h264_mp4toannexb raw.h264ffmpeg -framerate 24 -i raw.h264 -c copy from_raw.mp4WebM with VP9
WebM holds VP8, VP9 or AV1 video and Vorbis or Opus audio. -crf with -b:v 0 gives constant quality in VP9. -row-mt 1 allows multi-threaded rows. On our file this took 52.6 s for a 10.0 s clip.
ffmpeg -i in.mov -c:v libvpx-vp9 -crf 33 -b:v 0 -row-mt 1 -c:a libopus out.webmGoing back, the VP9 and Opus streams copied into MP4 without a re-encode (2.41 MB). FFmpeg printed this warning: "[mp4 @ ...] track 1: codec frame size is not set". A re-encode to H.264 and AAC gave 2.62 MB.
ffmpeg -i out.webm -c copy webm_copy.mp4ffmpeg -i out.webm -c:v libx264 -crf 23 -c:a aac webm_enc.mp4When -c copy fails
Copy fails when the container cannot hold the codec. These two failed on our files, with the exit code and message FFmpeg printed.
| Command | Exit code | Message |
|---|---|---|
| ffmpeg -i in.mov -c copy bad.webm | -22 | [webm @ ...] Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM. |
| ffmpeg -i pro.mov -c copy pro_copy.mp4 | -22 | [mp4 @ ...] Could not find tag for codec prores in stream #0, codec not currently supported in container |
Fix: encode to a codec the container accepts. For the first, use VP9 and Opus as above. For the ProRes file (26.62 MB for 3.0 s), an H.264 encode gave 1.04 MB.
ffmpeg -i pro.mov -c:v libx264 -crf 20 -pix_fmt yuv420p -c:a aac pro_h264.mp4Method and limits
All commands ran on FFmpeg 8.1.2 (a full Windows build) on a Windows 11 laptop, Ryzen 7 7735U, CPU only, on 2026-11-06. We added -y and -threads 4 to every run; they are left out of the commands shown. In quoted FFmpeg messages the hex address after @ changes on every run, so we replaced it with ...
in.mov is a 10 s cut from second 20 of tos.mp4, made with the command below. tos.mp4 is a copy of Tears of Steel clip tos_a_0020_60s.mp4 (60 s, 1280x534, 24 fps), (c) Blender Foundation, licensed CC-BY 3.0. We credit it here as the licence asks.
ffmpeg -ss 20 -t 10 -i tos.mp4 -c:v libx264 -crf 20 -c:a aac in.movffmpeg -i in.mov -c copy in.mkvffmpeg -t 3 -i in.mov -c:v prores_ks -profile:v 3 -c:a pcm_s16le pro.movLimits: one run of each command, so the sizes and times are single measurements and not averages. Times were taken on a laptop that was doing other work. Results depend on the input file and the FFmpeg version, so check yours. We did not test other cameras, HEVC, AV1 or variable frame rate files.
Related: FFmpeg for video editors, FFmpeg compress video: CRF and presets, measured with VMAF, Join videos with FFmpeg without errors, FFmpeg trim video: accurate cuts by time and FFmpeg command builder.
Page checked on Nov 4, 2026.