<!--
{
  "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: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCompositionTrackSegment",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCompositionTrackSegment"
  },
  "title" : "AVCompositionTrackSegment"
}
-->

# AVCompositionTrackSegment

A track segment that maps a time from the source media track to the composition track.

```
class AVCompositionTrackSegment
```

## Overview

You typically use this class to save a low-level representation of a composition.

## Topics

### Creating a segment

[`compositionTrackSegmentWithTimeRange:`](/documentation/AVFoundation/AVCompositionTrackSegment/compositionTrackSegmentWithTimeRange:)

Returns a new object that presents an empty composition track segment.

[`init(timeRange:)`](/documentation/AVFoundation/AVCompositionTrackSegment/init(timeRange:))

Creates an object that presents an empty composition track segment.

[`compositionTrackSegmentWithURL:trackID:sourceTimeRange:targetTimeRange:`](/documentation/AVFoundation/AVCompositionTrackSegment/compositionTrackSegmentWithURL:trackID:sourceTimeRange:targetTimeRange:)

Returns a new an object that presents a segment of a media file that the specified URL references.

[`init(url:trackID:sourceTimeRange:targetTimeRange:)`](/documentation/AVFoundation/AVCompositionTrackSegment/init(url:trackID:sourceTimeRange:targetTimeRange:)-4rc2g)

Creates an object that presents a segment of a media file that the specified URL references.

### Accessing segment properties

[`sourceURL`](/documentation/AVFoundation/AVCompositionTrackSegment/sourceURL)

A URL of the container file whose media this track segment presents.

[`sourceTrackID`](/documentation/AVFoundation/AVCompositionTrackSegment/sourceTrackID)

An identifier of a track in the container file whose media this track segment presents.

[`isEmpty`](/documentation/AVFoundation/AVCompositionTrackSegment/isEmpty)

A Boolean value that indicates whether the segment is empty.



---

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)