<!--
{
  "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/isVideoMirrored",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureConnection(py)videoMirrored"
  },
  "title" : "isVideoMirrored"
}
-->

# isVideoMirrored

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

```
var isVideoMirrored: Bool { get set }
```

## Discussion

You can apply a mirror-image effect to a video flowing through the connection by setting the value to <doc://com.apple.documentation/documentation/Swift/true>. The mirroring effect only applies to video or depth connections, similar to [`videoRotationAngle`](/documentation/AVFoundation/AVCaptureConnection/videoRotationAngle), and if [`isVideoMirroringSupported`](/documentation/AVFoundation/AVCaptureConnection/isVideoMirroringSupported) is <doc://com.apple.documentation/documentation/Swift/true>.

Not all capture connections mirror each frame. For example, a video connection to an [`AVCaptureMovieFileOutput`](/documentation/AVFoundation/AVCaptureMovieFileOutput) or [`AVCapturePhotoOutput`](/documentation/AVFoundation/AVCapturePhotoOutput) instance applies the mirror effect with a QuickTime track matrix or with EXIF tags, respectively.

Capture connections to [`AVCaptureVideoDataOutput`](/documentation/AVFoundation/AVCaptureVideoDataOutput) and [`AVCaptureDepthDataOutput`](/documentation/AVFoundation/AVCaptureDepthDataOutput) instances mirror video frames they provide to their [`captureOutput(_:didOutput:from:)`](/documentation/AVFoundation/AVCaptureVideoDataOutputSampleBufferDelegate/captureOutput(_:didOutput:from:)) and [`depthDataOutput(_:didOutput:timestamp:connection:)`](/documentation/AVFoundation/AVCaptureDepthDataOutputDelegate/depthDataOutput(_:didOutput:timestamp:connection:)) delegate methods, respectively. Each [`AVCaptureVideoDataOutput`](/documentation/AVFoundation/AVCaptureVideoDataOutput) instance uses hardware acceleration to mirror every frame.

> Tip:
> Avoid potential performance issues by only mirroring video with a capture connection when necessary.

You can mirror the video of a movie file you record with an [`AVAssetWriter`](/documentation/AVFoundation/AVAssetWriter) instance by applying a scale factor to the [`transform`](/documentation/AVFoundation/AVAssetWriterInput/transform) property of its [`AVAssetWriterInput`](/documentation/AVFoundation/AVAssetWriterInput). For example, you can horizontally flip an image by scaling the x-axis by `-1`. This approach avoids the performance costs that come with rotating each video frame.

```swift
func horizontallyFlipInput(_ assetInput: AVAssetWriterInput) {
    let horiztonalFlip = CGAffineTransform(scaleX: -1.0, y: 1.0)

    assetInput.transform = assetInput.transform.concatenating(horiztonalFlip)
}
```

---

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)