<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "QuickTime File Format",
  "identifier" : "/documentation/quicktime-file-format/Media_header_atom",
  "metadataVersion" : "0.1.0",
  "role" : "Atom",
  "symbol" : {
    "kind" : "Atom",
    "modules" : [
      "QuickTime File Format"
    ],
    "preciseIdentifier" : "__docc_universal_symbol_reference_$Media_header_atom"
  },
  "title" : "Media header atom ('mdhd')"
}
-->

# Media header atom ('mdhd')

An atom that specifies the characteristics of a media, including time scale and duration.

## Overview

The media header atom specifies the characteristics of a media, including time scale and duration. The media header atom has an atom type of `'mdhd'`.

The layout of a media header atom is as follows.

|Media header atom                                                                               |Bytes|
|------------------------------------------------------------------------------------------------|-----|
|``doc://com.apple.qtff/documentation/quicktime-file-format/Media_header_atom/Size``             |4    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Media_header_atom/Type``             |4    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Media_header_atom/Version``          |1    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Media_header_atom/Flags``            |3    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Media_header_atom/Creation_time``    |4    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Media_header_atom/Modification_time``|4    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Media_header_atom/Time_scale``       |4    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Media_header_atom/Duration``         |4    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Media_header_atom/Language``         |2    |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Media_header_atom/Quality``          |2    |

## Topics

### Data fields

[`Size`](/documentation/quicktime-file-format/Media_header_atom/Size)

A 32-bit integer that specifies the number of bytes in this media header atom.

[`Type`](/documentation/quicktime-file-format/Media_header_atom/Type)

A 32-bit integer that identifies the atom type.

[`Version`](/documentation/quicktime-file-format/Media_header_atom/Version)

One byte that specifies the version of this header atom.

[`Flags`](/documentation/quicktime-file-format/Media_header_atom/Flags)

Three bytes of space for media header flags.

[`Creation time`](/documentation/quicktime-file-format/Media_header_atom/Creation_time)

A 32-bit integer that specifies the creation date for the media atom.

[`Modification time`](/documentation/quicktime-file-format/Media_header_atom/Modification_time)

A 32-bit integer that specifies the last modification date for the media atom.

[`Time scale`](/documentation/quicktime-file-format/Media_header_atom/Time_scale)

A time value that indicates the time scale for this media.

[`Duration`](/documentation/quicktime-file-format/Media_header_atom/Duration)

The duration of this media in units of its time scale.

[`Language`](/documentation/quicktime-file-format/Media_header_atom/Language)

A 16-bit integer that specifies the language code for this media.

[`Quality`](/documentation/quicktime-file-format/Media_header_atom/Quality)

A 16-bit integer that specifies the media’s playback quality.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)