Codecs vs. Containers: Understanding the Difference
A codec (coder-decoder) defines how video and audio data is compressed and decompressed. A container (also called a wrapper or file format) is the package that holds one or more codec-compressed streams along with metadata. Understanding this distinction is fundamental: the same codec can be stored in different containers, and the same container can hold content compressed with different codecs.
For example, H.264 video with AAC audio can be packaged in an MP4 container, a MOV container, or an MKV container. The video and audio quality is determined by the codec and encoding settings, not the container. The container determines compatibility, metadata capabilities, and feature support like chapter markers or multiple subtitle tracks.
When someone asks "what format is this video?" the answer has two parts: the container (which you can see from the file extension) and the codec (which requires examining the file with a tool like MediaInfo). A ".mov" file could contain ProRes, H.264, DNxHD, or several other codecs. Knowing both is essential for troubleshooting compatibility issues.