<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureTimecodeGenerator",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureTimecodeGenerator"
  },
  "title" : "AVCaptureTimecodeGenerator"
}
-->

# AVCaptureTimecodeGenerator

Generates and synchronizes timecode data from various sources for precise video and audio synchronization.

```
class AVCaptureTimecodeGenerator
```

## Overview

The [`AVCaptureTimecodeGenerator`](/documentation/AVFoundation/AVCaptureTimecodeGenerator) class supports multiple timecode sources, including frame counting, system clock synchronization, and MIDI timecode input (MTC). Suitable for playback, recording, or other time-sensitive operations where precise timecode metadata is required.

Use the [`startSynchronization(source:)`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/startSynchronization(source:)) method to set up the desired timecode source.

## Topics

### Generating timecode

[`generateInitialTimecode()`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/generateInitialTimecode())

Generates an initial timecode intended to be the first in a sequence.

### Managing sources

[`currentSource`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/currentSource)

The active timecode source used by [`AVCaptureTimecodeGenerator`](/documentation/AVFoundation/AVCaptureTimecodeGenerator) to maintain clock synchronization for accurate timecode generation.

[`availableSources`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/availableSources)

An array of available timecode synchronization sources that can be used by the timecode generator.

[`frameCountSource`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/frameCountSource)

A frame counter timecode source that operates independently of any internal or external synchronization.

[`realTimeClockSource`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/realTimeClockSource)

A predefined timecode source synchronized to the real-time system clock.

[`startSynchronization(source:)`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/startSynchronization(source:))

Synchronizes the generator with the specified timecode source.

### Configuring the generator

[`synchronizationTimeout`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/synchronizationTimeout)

The maximum time interval allowed for source synchronization attempts before timing out.

[`timecodeAlignmentOffset`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/timecodeAlignmentOffset)

The time offset, in seconds, applied to the generated timecode.

[`timecodeFrameDuration`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/timecodeFrameDuration)

The frame duration that the generator will use to generate timecodes.

[`setDelegate(_:queue:)`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/setDelegate(_:queue:))

Assigns a delegate to receive real-time timecode updates and specifies a queue for callbacks.

### Handling delegate callbacks

[`delegate`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/delegate)

The delegate that receives timecode updates from the timecode generator.

[`delegateCallbackQueue`](/documentation/AVFoundation/AVCaptureTimecodeGenerator/delegateCallbackQueue)

The dispatch queue on which delegate callbacks are invoked.



---

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)