<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMSampleBufferAttachmentKeyDefinitions/trimDurationAtStart",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "s:9CoreMedia38CMSampleBufferAttachmentKeyDefinitionsO19trimDurationAtStart0A5Video012CVAttachmentF21DefinitionWithDefaultVyAE0M29ModePreferenceShouldPropagateOSo6CMTimeaGvpZ"
  },
  "title" : "trimDurationAtStart"
}
-->

# trimDurationAtStart

The duration that should be removed at the beginning of the sample buffer, after decoding.

```
static let trimDurationAtStart: CVAttachmentKeyDefinitionWithDefault<CMSampleBufferAttachmentKeyDefinitions.ShouldPropagate, CMTime>
```

## Discussion

The getter returns the default value of [`zero`](/documentation/CoreMedia/CMTime/zero) (nothing removed) if this attachment is not present. In
cases where all the output after decoding the sample buffer is to be discarded (for example, the samples are
only being decoded to prime the decoder) the usual convention is to set [`trimDurationAtStart`](/documentation/CoreMedia/CMSampleBufferAttachmentKeyDefinitions/trimDurationAtStart) to the whole
duration and not to set a [`trimDurationAtEnd`](/documentation/CoreMedia/CMSampleBufferAttachmentKeyDefinitions/trimDurationAtEnd) attachment.

---

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)