<!--
{
  "availability" : [

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

# Sample size atom ('stsz')

An atom you use to specify the size of each sample in the media.

## Overview

Sample size atoms have an atom type of `'stsz'`.

The sample size atom contains the sample count and a table giving the size of each sample. This allows the media data itself to be unframed. The total number of samples in the media is always indicated in the sample count. If the default size is indicated, then no table follows.

The layout of a sample size atom is as follows.

|Sample size atom data field                                                                    |Bytes   |
|-----------------------------------------------------------------------------------------------|--------|
|``doc://com.apple.qtff/documentation/quicktime-file-format/Sample_size_atom/Size``             |4       |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Sample_size_atom/Type`` = `'stsz'`  |4       |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Sample_size_atom/Version``          |1       |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Sample_size_atom/Flags``            |3       |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Sample_size_atom/Sample_size``      |4       |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Sample_size_atom/Number_of_entries``|4       |
|``doc://com.apple.qtff/documentation/quicktime-file-format/Sample_size_atom/Sample_size_table``|Variable|

## Topics

### Data fields

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

A 32-bit integer that specifies the number of bytes in this sample size atom.

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

A 32-bit integer that identifies the atom type.

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

A 1-byte specification of the version of this sample size atom.

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

A 3-byte space for sample size flags.

[`Sample size`](/documentation/quicktime-file-format/Sample_size_atom/Sample_size)

A 32-bit integer specifying the sample size.

[`Number of entries`](/documentation/quicktime-file-format/Sample_size_atom/Number_of_entries)

A 32-bit integer containing the count of entries in the sample size table.

[`Sample size table`](/documentation/quicktime-file-format/Sample_size_atom/Sample_size_table)

A table containing the sample size information.



---

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)