Format & codec problems
MP4 won't play even though it's supported? What to check
Short answer
MP4 is a container, so a file named .mp4 can hold codecs a player cannot decode, such as HEVC in an older player, 10-bit video or unusual audio. It can also be damaged, for example from an interrupted export that left no index. Read it with ffprobe, then remux or re-encode to H.264 and AAC with the moov index at the start (-movflags +faststart).
Key takeaways
- Supported container does not mean supported contents.
- A cut-off export can leave an MP4 without its index and unplayable.
- -movflags +faststart moves the index to the start so players can begin playback early.
- Re-encoding to H.264 and AAC fixes nearly every compatibility case.
Which codec goes in which container
Container and codec are two different things: the container (MP4, MOV, WebM, MKV) is the box, the codec (H.264, HEVC, AAC, Opus) is what is inside. A player or platform can accept the box and reject the contents.
| Container | Video codecs commonly used | Audio codecs commonly used | Source |
|---|---|---|---|
| MP4 | H.264, H.265 (HEVC) | AAC | YouTube recommends MP4 with H.264 and AAC-LC or Opus |
| MOV | H.264, H.265 | AAC, PCM | Pinterest accepts MOV in its apps with H.264 or H.265 |
| WebM | VP8, VP9, AV1 | Vorbis, Opus | The WebM Project: Vorbis or Opus audio |
| MKV | Almost anything | Almost anything | Convert before uploading |
Find your case
| What you see | What it usually means | Do this |
|---|---|---|
| Plays on one device, not another | Codec or profile the second device cannot decode | Re-encode to H.264 8-bit (step 2) |
| Does not open at all | Damaged or unfinished file | Re-export from the project (step 3) |
| Plays without sound | Unsupported audio codec | Re-encode audio to AAC (step 2) |
| Starts only after a long wait online | Index at the end of the file | Add +faststart (step 4) |
Fix it step by step
Inspect it
ffprobe -hide_banner file.mp4shows codecs, pixel format and duration. An error such as moov atom not found means the file is incomplete.Re-encode to a safe profile
ffmpeg -i file.mp4 -c:v libx264 -profile:v high -pix_fmt yuv420p -c:a aac -b:a 160k fixed.mp4.Re-export if the file is damaged
If ffprobe reports a missing moov atom, the export was interrupted; export again from the original project.
Move the index to the start
ffmpeg -i fixed.mp4 -c copy -movflags +faststart web.mp4rewrites the file so the index comes first, without re-encoding.
A repair order that works
- ffprobe the file.
- If it reads, re-encode to H.264 and AAC.
- If it does not read, re-export from the source.
- Add +faststart before uploading to the web.
Check your file
Extension and MIME type are labels, not proof of the container. Dimensions and duration come from this browser's media reader. This does not detect codecs, bitrate, corruption or platform upload compatibility. Files and measurements are not sent anywhere.
Frequently asked questions
Why won't my MP4 play?
The codec inside may be unsupported by that player, the file may be incomplete, or the audio codec may be unusual.
What does moov atom not found mean?
The MP4's index is missing, usually because the export was interrupted. The file cannot be repaired reliably; export again.
What does faststart do?
It moves the index to the start of the file so streaming can begin before the whole file downloads.
Sources
- FFmpeg Wiki: Encode/H.264 (CRF, presets) (official, checked 2026-10-06)
- FFmpeg Documentation: Automatic stream selection and -map (official, checked 2026-10-06)
- YouTube Help: Recommended upload encoding settings (official, checked 2026-10-06)
Reviewed 2026-10-06. Steps not attributed to a source are general video practice or computed above.