Images & Video

MP4 is not a codec: containers, codecs and why a file will not play

Renaming a file to .mp4 changes nothing about what is inside it. The extension names the box; the thing that fails to play is the contents.

5 minute readUpdated 29 September 2026

Someone sends you a video. It downloads, it has a sensible size, and your player shows a black rectangle with working audio. Someone else opens the same file and it is fine.

Nothing is corrupt. The file is carrying something your player cannot decode, and the extension gave you no warning because the extension does not describe that.

Three separate things in one file

A video file is a container holding streams:

  • The container: MP4, MKV, MOV, WebM, AVI. It stores the streams, their timing, chapter marks and metadata. Think of it as the box and the packing list.
  • The video codec: H.264, HEVC (H.265), VP9, AV1. This is the compression scheme the picture is stored in.
  • The audio codec: AAC, MP3, Opus, FLAC, AC-3.

"MP4" tells you about the box. It tells you almost nothing about whether the contents will play, because an MP4 can legally hold H.264 or HEVC or AV1, and the same goes for the audio. This is the same gap between a file's name and its actual contents that makes MIME types and magic bytes worth understanding: the extension is a claim, not a description.

This is why "convert to MP4" is an incomplete instruction. If the file is already an MP4 with HEVC inside and the target device only decodes H.264, converting it to another MP4 with the same codecs achieves nothing.

The combinations that actually matter

H.264 video + AAC audio in an MP4. The safe default. Every browser, phone, TV and editing program made in the last fifteen years decodes it. It is not the most efficient option any more, and that is the price of it working everywhere.

HEVC (H.265). Roughly half the bit rate of H.264 for the same quality, which is why phones record in it. Patent licensing kept it out of some browsers, so a clip that plays perfectly on the phone that shot it can fail on a laptop.

VP9 and AV1 in WebM or MP4. Royalty-free, very efficient, widely supported in browsers and increasingly in hardware. AV1 encoding is slow, so the win is on the delivery side rather than the working side.

MKV. A capable container that holds almost anything, including multiple audio tracks and subtitle tracks. Browsers do not play it and some TVs refuse it, which is why a perfectly good MKV often needs to be remuxed into an MP4.

Remux versus re-encode

These are different operations and the difference is worth minutes of your life.

Remuxing takes the existing streams and writes them into a different container. No pixels are decoded, nothing is re-compressed, quality is untouched and it takes seconds. This is the right operation when MKV-to-MP4 is the whole problem.

Re-encoding decodes every frame and compresses it again with a different codec or different settings. It takes real time, and it is lossy: the second encode cannot recover detail the first one discarded. This is what you need when the codec itself is the incompatibility.

The practical rule: change the container when the player rejects the file outright, change the codec when the player opens the file but cannot draw it.

Frame rate, resolution and bit rate

Three numbers get conflated constantly.

Resolution is how many pixels per frame: 1920×1080, 3840×2160. Lowering it is the single biggest lever on file size, because the pixel count falls with the square.

Frame rate is frames per second: 24, 30, 60. Halving it halves the frames to encode but makes motion visibly less smooth, which is obvious on screen recordings and sport, and barely noticeable on a talking head.

Bit rate is bits per second of playback, and it is the one that actually determines file size: file size ≈ bit rate × duration. A "1080p" file can be 2 Mbps or 20 Mbps, and those look very different.

When a file is too large for an upload limit, the order to try is: lower the bit rate, then the resolution, then the frame rate. Converting the file with an explicit target rather than a vague "compress" setting is how you land near a limit on the first attempt.

Audio has the same structure

The same container-and-codec split applies to audio-only files. An .m4a is a container that usually holds AAC. An .ogg usually holds Vorbis or Opus. MP3 is unusual in being both a container and a codec, which is part of why it is the format people assume everything works like.

Converting between them is a re-encode unless you are only rewrapping, so going MP3 → WAV does not restore anything that MP3 threw away; it just stores the same degraded audio without compression. An audio converter is the right tool for producing the format something demands, not for improving quality that has already gone.

A short diagnostic

  1. Read the file's streams. Container, video codec, audio codec.
  2. Picture missing, sound fine → the video codec is unsupported.
  3. Sound missing, picture fine → the audio codec is unsupported, often AC-3 in a browser.
  4. Nothing opens at all → the container is unsupported. Remux; do not re-encode.
  5. Plays but is too big → bit rate, then resolution, then frame rate.

When the diagnosis points at the container, MOV to MP4 and WebM to MP4 turn the two most common problem files into MP4, and the video converter covers the other combinations between MP4, WebM, MOV and MKV. To read a file's stream list first, a player or a local inspector such as ffprobe, MediaInfo or VLC's codec panel will tell you in seconds.

Further reading

Do it hereVideo ConverterConvert videos between MP4, WebM, MOV and MKV using your device's video encoderOpen

Written for NextTool. Every statement about a tool is checked against that tool's code, and corrections are dated above. How guides are written

videocodecsmp4formats