<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/kCMSampleBufferAttachmentKey_SpeedMultiplier",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@kCMSampleBufferAttachmentKey_SpeedMultiplier"
  },
  "title" : "kCMSampleBufferAttachmentKey_SpeedMultiplier"
}
-->

# kCMSampleBufferAttachmentKey_SpeedMultiplier

The factor by which the sample buffer’s presentation should be accelerated (type `CFNumber`, default 1.0).

```
let kCMSampleBufferAttachmentKey_SpeedMultiplier: CFString
```

## Discussion

For normal playback the speed multiplier would be `1.0` (which is used if this attachment is not present);         for double-speed playback the speed multiplier would be `2.0`, which would halve the output duration.        Speed-multiplication factors take effect after trimming; see [`CMSampleBufferGetOutputDuration(_:)`](/documentation/CoreMedia/CMSampleBufferGetOutputDuration(_:)).        Note that this attachment principally provides information about the duration-stretching effect:        by default, it should be implemented by rate conversion, but other attachments may specify richer         stretching operations—for example, scaling without pitch shift, or pitch shift without changing duration.        Sequences of speed-multiplied sample buffers should have explicit time stamps        to clarify when each should be output (see [`CMSampleBufferSetOutputPresentationTimeStamp(_:newValue:)`](/documentation/CoreMedia/CMSampleBufferSetOutputPresentationTimeStamp(_:newValue:))).

---

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)