# `Membrane.MP4.Container.Schema.Default`
[🔗](https://github.com/membraneframework/membrane_mp4_plugin/blob/v0.36.10/lib/membrane_mp4/container/schema_default.ex#L1)

MP4 structure schema used for parsing and serialization.

The schema definition is the following:
```
[
  ftyp: [
    fields: [
      major_brand: :str32,
      major_brand_version: :uint32,
      compatible_brands: {:list, :str32}
    ]
  ],
  moov: [
    mvhd: [
      version: 0,
      fields: [
        version: {:uint8, [store: :version]},
        flags: {:uint24, [store: :fo_flags]},
        creation_time: {:uint32, [when: {:version, [value: 0]}]},
        creation_time: {:uint64, [when: {:version, [value: 1]}]},
        modification_time: {:uint32, [when: {:version, [value: 0]}]},
        modification_time: {:uint64, [when: {:version, [value: 1]}]},
        timescale: :uint32,
        duration: {:uint32, [when: {:version, [value: 0]}]},
        duration: {:uint64, [when: {:version, [value: 1]}]},
        rate: :fp16d16,
        volume: :fp8d8,
        reserved: <<0, 0, 0, 0, 0, 0, 0, 0, 0, 0>>,
        matrix_value_A: :fp16d16,
        matrix_value_B: :fp16d16,
        matrix_value_U: :fp2d30,
        matrix_value_C: :fp16d16,
        matrix_value_D: :fp16d16,
        matrix_value_V: :fp2d30,
        matrix_value_X: :fp16d16,
        matrix_value_Y: :fp16d16,
        matrix_value_W: :fp2d30,
        quicktime_preview_time: :uint32,
        quicktime_preview_duration: :uint32,
        quicktime_poster_time: :uint32,
        quicktime_selection_time: :uint32,
        quicktime_selection_duration: :uint32,
        quicktime_current_time: :uint32,
        next_track_id: :uint32
      ]
    ],
    trak: [
      tkhd: [
        version: 0,
        fields: [version: {:uint8, [store: :version]}, flags: {...}, ...]
      ],
      ...
    ],
    ...
  ],
  ...
]
```

Useful resources:
- https://www.iso.org/standard/79110.html
- https://www.iso.org/standard/61988.html
- https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html
- https://github.com/DicomJ/mpeg-isobase/tree/eb09f82ff6e160715dcb34b2bf473330c7695d3b

# `schema`

```elixir
@spec schema() :: Membrane.MP4.Container.Schema.t()
```

# `schema_def`

```elixir
@spec schema_def() :: Membrane.MP4.Container.Schema.schema_def_t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
