Knowledge Base

What Is A Codec Type?

codec-type

Certain files can be encoded using a so-called codec. Next to other information, the Codec Type can be interesting when looking at audio or video encoding. Read more about Codec Type.

Codec Type tells you what kind of content one stream inside your file holds: picture, sound, subtitles or something else. A codec is the piece of software that packs content up when a file is made and unpacks it again when the file is played.

Which files carry it, and where it comes from

You see it in media files: video files such as MP4, MOV, MKV, AVI and WebM, and audio files such as MP3, M4A, FLAC and WAV. A media file is a container that can hold several streams side by side, and a report lists a Codec Type for each of them. A clip from a phone normally shows two rows, one video and one audio. Image files inspected with the same kind of tool report a single video stream, because one still picture is treated as a video that happens to be one frame long.

The value is written by the software that assembled the file and is read straight back out of the file's structure. It is not something a person fills in.

The values you can see

Codec Type comes from a small fixed set of lowercase words:

  • video - moving pictures, and also still images and embedded cover art
  • audio - sound
  • subtitle - timed text, or subtitles stored as small images
  • data - a stream the player is not meant to show, such as timecode or sensor readings
  • attachment - a whole file carried inside the container, for example a font the subtitles need

It normally sits right next to the codec name for the same stream, so a report reads Codec Type audio with a codec name of aac, or Codec Type video with h264. Because the type describes the stream rather than the container, an MP4 file and an MKV file can show exactly the same list of types.

Why it matters

A file can only be decoded with the same codec it was encoded with. If that codec is missing, the file will not open, play or display. Codec Type is what narrows the problem down: a file that plays sound but shows a black picture has a video stream your player cannot decode, which is a very different fix from a container it cannot read at all.

It also tells you what is really in a file before you spend time on it. A video with no audio row will be silent in every player, so there is no point hunting for a sound setting. A subtitle row explains where the text on screen is coming from, and an attachment or data row can explain a file that is bigger than you expected, or one that a simple editor refuses to import.

The value itself says nothing about you. It can, though, point at a stream worth a closer look: action cameras and drones often record position and sensor readings in a data stream, and that content stays in the file even after the picture has been trimmed.