<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLHandActionClassifier/DataSource/directoryWithVideosAndAnnotation(at:annotationFile:videoColumn:labelColumn:startTimeColumn:endTimeColumn:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML22MLHandActionClassifierV10DataSourceO32directoryWithVideosAndAnnotationyAE10Foundation3URLV_AIS3SSgAJtcAEmF"
  },
  "title" : "MLHandActionClassifier.DataSource.directoryWithVideosAndAnnotation(at:annotationFile:videoColumn:labelColumn:startTimeColumn:endTimeColumn:)"
}
-->

# MLHandActionClassifier.DataSource.directoryWithVideosAndAnnotation(at:annotationFile:videoColumn:labelColumn:startTimeColumn:endTimeColumn:)

Creates a data source from a folder that contains videos and an annotation file.

```
case directoryWithVideosAndAnnotation(at: URL, annotationFile: URL, videoColumn: String, labelColumn: String, startTimeColumn: String? = nil, endTimeColumn: String? = nil)
```

## Parameters

`at`

A URL to a folder in the file system that contains hand action videos.

`annotationFile`

A URL to a JSON or CSV file that contains annotations for the hand action videos.

`videoColumn`

The name of the column or key name in the annotation file that contains the video
filenames.

`labelColumn`

The name of the column or key name in the annotation file that contains the hand action
label names.

`startTimeColumn`

The name of the column or key name in the annotation file that contains the hand
action’s starting-time index in the video file. Otherwise `nil`, if every video example starts at the
beginning of the video file.

`endTimeColumn`

The name of the column or key name in the annotation file that contains the hand
action’s ending-time in the video file. Otherwise `nil`, if every video example ends at the end of the
video file.

---

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)