A file extension is the label at the end of a filename. A codec is the technology that compresses or decodes the media inside the file.
.mp4 does not tell you everything inside the file.
A container can hold video, audio, subtitles, and metadata.
The codec determines how the media was compressed.
| Thing | Plain-English meaning | Examples |
|---|---|---|
| File extension | The visible suffix on the filename | .mp4, .mkv, .m4a, .wav |
| Container | The package that holds streams and metadata | MP4, MKV, WebM, MOV |
| Codec | The method used to encode or decode audio/video | H.264, H.265, AV1, AAC, Opus |
| Format | A broad word people use for any of the above | MP3, FLAC, MP4, WAV |
Two files can both end in .mp4 but contain different video or audio codecs. One MP4 might use H.264 video and AAC audio, while another might use H.265 video and a different audio setup.
That is why a file can have the “right” extension but still fail to play on an older TV, browser, or app. The device has to support the codecs inside the container.
Usually no. MP4 is normally a container format that can hold video, audio, subtitles, and metadata.
No. MKV is a container format. The video inside an MKV file might be H.264, H.265, AV1, VP9, or another codec.
No. M4A is usually a container or file extension, while AAC is an audio codec commonly stored inside M4A files.
Sometimes it gives a clue, but it does not always identify the exact codec inside the file.
The device or app may support the container extension but not the specific audio or video codec inside it.