3/16/2026

Convert video to MP4 with FFmpeg using stream copy when possible, or high quality H.264/AAC settings when re-encoding is required.

How to Convert Video to MP4 Without Losing Quality

The only truly lossless way to convert a video to MP4 is stream copy. That means FFmpeg changes the container to MP4 without re-encoding the video or audio. If the source codecs are not compatible with MP4, you need to re-encode, which can still look very close to the original with the right settings.

For a guided builder, use the Convert Video tool.

Try Lossless Stream Copy First

ffmpeg -i input.mov -c copy output.mp4

This is fast and does not reduce quality. It works when the input already contains streams that MP4 supports, such as H.264 video and AAC audio.

Use stream copy when:

  • You are converting MOV to MP4.
  • The source already uses MP4-compatible codecs.
  • You want the fastest conversion and no generation loss.

High-Quality MP4 Re-encode

If stream copy fails or the output does not play correctly, re-encode:

ffmpeg -i input.avi -c:v libx264 -crf 18 -preset slow -c:a aac -b:a 192k -pix_fmt yuv420p output.mp4

CRF 18 is a high-quality setting for H.264. It is not mathematically lossless, but it is often visually very close to the source.

Balanced MP4 Conversion

For everyday use, CRF 23 is a better balance:

ffmpeg -i input.mkv -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k -pix_fmt yuv420p -movflags +faststart output.mp4

This is a good default for web playback and sharing.

Stream Copy vs Re-encoding

Method Quality Speed Use when
-c copy No generation loss Very fast The existing codecs are MP4-compatible
CRF 18 Very high visual quality Slower You need compatibility but want minimal visible loss
CRF 23 Balanced Medium You want a practical MP4 for web or sharing

Common Problems

Stream copy fails.
The MP4 container may not support one of the source streams. Re-encode video and audio.

The MP4 plays without audio.
Use -c:a aac -b:a 128k instead of copying the audio.

The output file is larger than the source.
The source may already be compressed. Use CRF 23 or higher, or compress with the Compress Video tool.

Colors or playback look wrong on some devices.
Add -pix_fmt yuv420p for compatibility.

Related FFmpeg Pages

Related tool

Convert Video with FFmpeg

Convert video formats with FFmpeg while controlling codec, quality, and container.

Open the command generator