---
title: "Metadata header atom ('mhdr')"
framework: quicktime-file-format
role: symbol
role_heading: Atom
path: quicktime-file-format/metadata_header_atom
---

# Metadata header atom ('mhdr')

An atom that holds the integer value for the next unique item identifier to assign.

## Overview

Overview The metadata format optionally assigns unique identifiers to metadata items for such purposes as defining stable identifiers for external references into the set of metadata items. This is accomplished by including an item information atom in added metadata item atoms contained by the metadata item list atom. Such unique identifiers must be guaranteed to be unique. To make the assignment of unique item identifiers more efficient, the metadata atom may contain a metadata header atom holding the integer value for the next unique item identifier to assign stored in the nextItemID field. In general it holds a value one greater than the largest identifier used so far. important: The metadata header atom must exist if there are metadata item atoms containing an item information atom indicating the item’s unique ID. Upon assigning the identifier to a metadata item, if the value of the nextItemID field is less than 0xFFFFFFFF, it should be incremented to the next unused value. If the value of nextItemID is equal to 0xFFFFFFFF, it should not be changed: in that case, a search for an unused item identifier value in the range from 0 to 0xFFFFFFFF is needed for all additions. The metadata header atom is a full atom with an atom type of ‘mhdr’. note: If the last metadata item with an item information atom is removed and value of nextItemID is 0xFFFFFFFF, an implementation may reset the metadata header atom’s nextItemID value to 0 so that new assignments are again efficient (that is, they do not require a search for unused identifiers).

## Topics

### Data fields

- [Size](quicktime-file-format/metadata_header_atom/size.md)
- [Type](quicktime-file-format/metadata_header_atom/type.md)
- [Version](quicktime-file-format/metadata_header_atom/version.md)
- [Flags](quicktime-file-format/metadata_header_atom/flags.md)
- [nextItemID](quicktime-file-format/metadata_header_atom/nextitemid.md)

## See Also

### Metadata structure

- [Metadata atom ('meta')](quicktime-file-format/metadata_atom.md)
- [Metadata handler atom ('hdlr')](quicktime-file-format/metadata_handler_atom.md)
