A codec is one of those concepts that quietly explains a lot of confusing video and audio behavior once it clicks — specifically, why a file with a perfectly standard extension like .mp4 can sometimes fail to play, while another file with the identical extension plays just fine.
Container vs. codec: two different things bundled together
A file extension like .mp4 or .mov describes a container format — essentially a wrapper that organizes video, audio, and other data (like subtitles) together into one file. The codec is a separate thing entirely: it's the specific method used to actually encode (compress) that video or audio data inside the container. The same container format can hold data encoded with several different possible codecs — which is why two .mp4 files can behave completely differently depending on what's actually encoded inside them.
Why this causes playback problems
A media player needs to understand the specific codec used inside a file, not just recognize the container extension, in order to actually decode and play it. A player with broad support for the most common codec used in MP4 files (H.264) will play the vast majority of MP4s without issue, but can fail on a file using a less common codec — despite both files sharing the identical .mp4 extension and looking, from the outside, exactly the same kind of file.
"Codec" literally means encoder-decoder
The word itself is a blend of "coder" and "decoder" — a codec is the specific pair of algorithms used to compress (encode) data down for storage or transmission, and then decompress (decode) it back into something playable. Different codecs make different tradeoffs between compression efficiency, quality, and how computationally demanding they are to encode and decode.
Why converting a file often fixes playback issues
When a file "won't play" due to a codec mismatch, converting it re-encodes the content using a different, typically more widely supported codec — which is why conversion resolves the majority of otherwise confusing playback failures, even when the file extension doesn't actually change in the process.
Convert Video and Convert Audio both re-encode files using broadly compatible codecs directly in your browser, which resolves the majority of codec-related playback issues.