<!--
{
  "availability" : [
    "iOS: 18.2.0 -",
    "iPadOS: 18.2.0 -",
    "macCatalyst: 18.2.0 -",
    "macOS: 15.2.0 -",
    "tvOS: 18.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureFileOutputRecordingDelegate/fileOutput(_:didStartRecordingTo:startPTS:from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVCaptureFileOutputRecordingDelegate(im)captureOutput:didStartRecordingToOutputFileAtURL:startPTS:fromConnections:"
  },
  "title" : "fileOutput(_:didStartRecordingTo:startPTS:from:)"
}
-->

# fileOutput(_:didStartRecordingTo:startPTS:from:)

```
optional func fileOutput(_ output: AVCaptureFileOutput, didStartRecordingTo fileURL: URL, startPTS: CMTime, from connections: [AVCaptureConnection])
```

## Parameters

`output`

The capture file output that started writing the file.

`fileURL`

The file URL of the file that is being written.

`startPTS`

The timestamp of the first buffer written to the file, synced with AVCaptureSession.synchronizationClock

`connections`

An array of AVCaptureConnection objects attached to the file output that provided the data that is being written to the file.

## Discussion

\abstract Informs the delegate when the output has started writing to a file.
\discussion This method is called when the file output has started writing data to a file. If an error condition prevents any data from being written, this method may not be called. captureOutput:willFinishRecordingToOutputFileAtURL:fromConnections:error: and captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error: will always be called, even if no data is written.

If this method is implemented, the alternative delegate callback -captureOutput:didStartRecordingToOutputFileAtURL:fromConnections will not be called.

Clients should not assume that this method will be called on a specific thread, and should also try to make this method as efficient as possible.

---

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)