What Is A Codec Tag?

The Codec Tag is another way to represent the codec used to encode a media file such as a video or music file. Usually, there is more information available for the codec used in a media file. One of them is the Codec Tag.

The value for the Codec Tag usually consists of a string of numbers. For example:

  • 0x31637661
  • 0x0000
  • 0x7634706d

These strings represent a so-called FOURCC, a four-character code that helps to identify video streams in particular. It was introduced by Microsoft and helps to link video frames to the used codec. The string itself gives information via Hex code. Consider the following examples:

If we look at 0x31637661, we can divide the code into four Hex code strings: 0x31, 0x63, 0x76, and 0x61. Translating those into ASCII characters, we get the corresponding codec:

  • 0x31 =1
  • 0x63 = c
  • 0x76 = v
  • 0x61 = a

Reading this code translation, we get the media codec avc1.

Likewise, 0x7634706d thus represents the mp4v codec:

  • 0x76 = v
  • 0x34 = 4
  • 0x70 = p
  • 0x6d = m