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

# AVCaptureAncillaryDataEncoder

```
class AVCaptureAncillaryDataEncoder
```

## Overview

### inspecting the user defined data

- [`currentUserDefinedAncillaryData`](/documentation/AVFoundation/AVCaptureAncillaryDataEncoder/currentUserDefinedAncillaryData)

## Topics

### Instance Properties

[`var currentUserDefinedAncillaryData: [AVCaptureAncillaryDataUserKey : Any]`](/documentation/AVFoundation/AVCaptureAncillaryDataEncoder/currentUserDefinedAncillaryData)

This is a representation of the user defined anacillary data.

[`var isEnabled: Bool`](/documentation/AVFoundation/AVCaptureAncillaryDataEncoder/isEnabled)

Indicates whether ancillary data should be encoded and transmitted.

[`var userDefinedAncillaryDataSizeRemaining: Int16`](/documentation/AVFoundation/AVCaptureAncillaryDataEncoder/userDefinedAncillaryDataSizeRemaining)

Allows users to track how much data in bytes can be added to the userDefinedAncillaryData.

### Instance Methods

[`func removeRDD18AncillaryData(forTag: UInt16)`](/documentation/AVFoundation/AVCaptureAncillaryDataEncoder/removeRDD18AncillaryData(forTag:))

Allows the user to remove the ancillary data associated with the tag.

[`func setRDD18AncillaryData(Data, forTag: UInt16) throws`](/documentation/AVFoundation/AVCaptureAncillaryDataEncoder/setRDD18AncillaryData(_:forTag:))

Allows the user to add their own data to be encoded and transmitted using SMPTE RDD 18 standards.

[`func setRDD18AncillaryDataString(String, forTag: UInt16) throws`](/documentation/AVFoundation/AVCaptureAncillaryDataEncoder/setRDD18AncillaryDataString(_:forTag:))

Allows the user to add their own string to be encoded as data and transmitted using SMPTE RDD 18 standards.

[`func setUserInstanceUID(UUID, forUserUDAMVersion: NSNumber)`](/documentation/AVFoundation/AVCaptureAncillaryDataEncoder/setUserInstanceUID(_:forUserUDAMVersion:))

Set the UID and Version number for the user data.

## See Also

[`class AVCaptureBroadcastVideoOutput`](/documentation/AVFoundation/AVCaptureBroadcastVideoOutput)

[`AVCaptureBroadcastVideoOutput`](/documentation/AVFoundation/AVCaptureBroadcastVideoOutput) is a subclass of [`AVCaptureOutput`](/documentation/AVFoundation/AVCaptureOutput) that delivers broadcast-quality video and ancillary data through the device’s DisplayPort hardware interface (USB-C DP Alt Mode)

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)