How to Get Media Info and Identify Codecs

The Analyze API, Audio Diagnose API, and the Analyze Speech API can all be used to get information about the media format including details on the container, audio, and video codecs.

See the Analyzing Media tutorial to learn how to call the API and then look for the media_info section of the results.

  "media_info": {
    "audio": {
      "bitrate": 256001,
      "channel_order": "L R",
      "channels": 2,
      "codec": "aac",
      "duration": 97.685,
      "sample_rate": 48000
    "container": {
      "bitrate": 1651700,
      "duration": 97.685,
      "kind": "mp4",
      "size": 20168287
    "video": {
      "bitrate": 1391583,
      "codec": "h264",
      "duration": 97.685,
      "frame_rate": 25,
      "height": 720,
      "width": 1280

The Supported Media Formats lists the types of media formats that can be analyzed.