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

# AVCaptureConnection

An object that represents a connection from a capture input to a capture output.

```
class AVCaptureConnection
```

## Overview

Capture inputs have one or more input ports (instances of [`AVCaptureInput.Port`](/documentation/AVFoundation/AVCaptureInput/Port)). Capture outputs can accept data from one or more sources (for example, an [`AVCaptureMovieFileOutput`](/documentation/AVFoundation/AVCaptureMovieFileOutput) object accepts both video and audio data).

You can add an `AVCaptureConnection` instance to a session using the [`addConnection(_:)`](/documentation/AVFoundation/AVCaptureSession/addConnection(_:)) method only if the [`canAddConnection(_:)`](/documentation/AVFoundation/AVCaptureSession/canAddConnection(_:)) method returns <doc://com.apple.documentation/documentation/Swift/true>. When using the [`addInput(_:)`](/documentation/AVFoundation/AVCaptureSession/addInput(_:)) or [`addOutput(_:)`](/documentation/AVFoundation/AVCaptureSession/addOutput(_:)) method, the session forms connections automatically between all compatible inputs and outputs. You only need to add connections manually when adding an input or output with no connections. You can also use connections to enable or disable the flow of data from a given input or to a given output.

## Topics

### Creating a connection

[`init(inputPorts:output:)`](/documentation/AVFoundation/AVCaptureConnection/init(inputPorts:output:))

Creates a capture connection that represents a connection between multiple input ports and an output.

[`connectionWithInputPorts:output:`](/documentation/AVFoundation/AVCaptureConnection/connectionWithInputPorts:output:)

Returns a capture connection that represents a connection between multiple input ports and an output.

[`init(inputPort:videoPreviewLayer:)`](/documentation/AVFoundation/AVCaptureConnection/init(inputPort:videoPreviewLayer:))

Creates a capture connection that represents a connection between an input port and a video preview layer.

[`connectionWithInputPort:videoPreviewLayer:`](/documentation/AVFoundation/AVCaptureConnection/connectionWithInputPort:videoPreviewLayer:)

Returns a capture connection that represents a connection between an input port and a video preview layer.

### Enabling a connection

[`isEnabled`](/documentation/AVFoundation/AVCaptureConnection/isEnabled)

Turns the connection on and off.

[`isActive`](/documentation/AVFoundation/AVCaptureConnection/isActive)

Indicates whether the connection is active.

### Inspecting a connection

[`inputPorts`](/documentation/AVFoundation/AVCaptureConnection/inputPorts)

An array of the connection’s input ports.

[`output`](/documentation/AVFoundation/AVCaptureConnection/output)

The connection’s output port, if applicable.

[`videoPreviewLayer`](/documentation/AVFoundation/AVCaptureConnection/videoPreviewLayer)

The video preview layer associated with the connection.

[`audioChannels`](/documentation/AVFoundation/AVCaptureConnection/audioChannels)

An array of audio channels that the connection provides.

### Rotating a video

[`isVideoRotationAngleSupported(_:)`](/documentation/AVFoundation/AVCaptureConnection/isVideoRotationAngleSupported(_:))

Returns a Boolean value that indicates whether the connection supports a rotation angle.

[`videoRotationAngle`](/documentation/AVFoundation/AVCaptureConnection/videoRotationAngle)

A rotation angle the connection applies to a video flowing through it.

### Mirroring a video

[`isVideoMirroringSupported`](/documentation/AVFoundation/AVCaptureConnection/isVideoMirroringSupported)

A Boolean value that indicates whether the connection supports video mirroring.

[`isVideoMirrored`](/documentation/AVFoundation/AVCaptureConnection/isVideoMirrored)

A Boolean value that indicates whether the connection horizontally flips the video flowing through it.

[`automaticallyAdjustsVideoMirroring`](/documentation/AVFoundation/AVCaptureConnection/automaticallyAdjustsVideoMirroring)

A Boolean value that indicates whether you can enable mirroring based on a session’s configuration.

### Stabilizing video

[`isVideoStabilizationSupported`](/documentation/AVFoundation/AVCaptureConnection/isVideoStabilizationSupported)

A Boolean value that indicates whether this connection supports video stabilization.

[`activeVideoStabilizationMode`](/documentation/AVFoundation/AVCaptureConnection/activeVideoStabilizationMode)

The connection’s current stabilization mode.

[`preferredVideoStabilizationMode`](/documentation/AVFoundation/AVCaptureConnection/preferredVideoStabilizationMode)

The stabilization mode that’s the most appropriate for a video connection.

### Delivering camera calibration settings

[`isCameraIntrinsicMatrixDeliverySupported`](/documentation/AVFoundation/AVCaptureConnection/isCameraIntrinsicMatrixDeliverySupported)

A Boolean value that indicates whether the capture connection currently supports delivering camera intrinsics information.

[`isCameraIntrinsicMatrixDeliveryEnabled`](/documentation/AVFoundation/AVCaptureConnection/isCameraIntrinsicMatrixDeliveryEnabled)

A Boolean value that indicates whether the connection can configure the capture pipeline to deliver camera intrinsics information.

### Configuring a video’s frame rate

[`isVideoMinFrameDurationSupported`](/documentation/AVFoundation/AVCaptureConnection/isVideoMinFrameDurationSupported)

A Boolean value that indicates whether the connection supports a minimum frame duration.

[`videoMinFrameDuration`](/documentation/AVFoundation/AVCaptureConnection/videoMinFrameDuration)

The smallest time interval the connection can apply between consecutive video frames.

[`isVideoMaxFrameDurationSupported`](/documentation/AVFoundation/AVCaptureConnection/isVideoMaxFrameDurationSupported)

A Boolean value that indicates whether the connection supports a maximum frame duration.

[`videoMaxFrameDuration`](/documentation/AVFoundation/AVCaptureConnection/videoMaxFrameDuration)

The largest time interval the connection can apply between consecutive video frames.

### Scaling a video

[`videoMaxScaleAndCropFactor`](/documentation/AVFoundation/AVCaptureConnection/videoMaxScaleAndCropFactor)

The connection’s maximum video scale and crop factor.

[`videoScaleAndCropFactor`](/documentation/AVFoundation/AVCaptureConnection/videoScaleAndCropFactor)

The current scale and crop factor the video output uses.

### Interlacing video

[`isVideoFieldModeSupported`](/documentation/AVFoundation/AVCaptureConnection/isVideoFieldModeSupported)

A Boolean value that indicates whether the connection supports setting a video field mode.

[`videoFieldMode`](/documentation/AVFoundation/AVCaptureConnection/videoFieldMode)

A setting that tells the connection how to interlace video flowing through it.

[`AVVideoFieldMode`](/documentation/AVFoundation/AVVideoFieldMode)

Constants that indicate which interlacing modes the connection applies to video flowing through it.

### Deprecated

[`isVideoStabilizationEnabled`](/documentation/AVFoundation/AVCaptureConnection/isVideoStabilizationEnabled)

A Boolean value that indicates whether video stabilization is active for the connection.

[`enablesVideoStabilizationWhenAvailable`](/documentation/AVFoundation/AVCaptureConnection/enablesVideoStabilizationWhenAvailable)

A Boolean value that indicates whether the system enables video stabilization when it’s available.

[`isVideoOrientationSupported`](/documentation/AVFoundation/AVCaptureConnection/isVideoOrientationSupported)

A Boolean value that indicates whether the connection supports changing the orientation of the video.

[`videoOrientation`](/documentation/AVFoundation/AVCaptureConnection/videoOrientation)

An orientation that tells the connection how to rotate a video flowing through it.

[`AVCaptureVideoOrientation`](/documentation/AVFoundation/AVCaptureVideoOrientation)

Constants indicating video orientation.



---

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)