---
title: "MLHandActionClassifier.DataSource.directoryWithVideosAndAnnotation(at:annotationFile:videoColumn:labelColumn:startTimeColumn:endTimeColumn:)"
framework: createml
role: symbol
role_heading: Case
path: "createml/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.

## Declaration

```swift
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.

## See Also

### Creating a data source

- [MLHandActionClassifier.DataSource.labeledDirectories(at:)](createml/mlhandactionclassifier/datasource/labeleddirectories(at:).md)
- [MLHandActionClassifier.DataSource.labeledFiles(at:)](createml/mlhandactionclassifier/datasource/labeledfiles(at:).md)
- [MLHandActionClassifier.DataSource.labeledVideoDataFrame(_:videoColumn:labelColumn:startTimeColumn:endTimeColumn:)](createml/mlhandactionclassifier/datasource/labeledvideodataframe(_:videocolumn:labelcolumn:starttimecolumn:endtimecolumn:).md)
- [MLHandActionClassifier.DataSource.labeledVideoData(table:videoColumn:labelColumn:startTimeColumn:endTimeColumn:)](createml/mlhandactionclassifier/datasource/labeledvideodata(table:videocolumn:labelcolumn:starttimecolumn:endtimecolumn:).md)
- [MLHandActionClassifier.DataSource.labeledKeypointsDataFrame(_:sessionIdColumn:labelColumn:featureColumn:)](createml/mlhandactionclassifier/datasource/labeledkeypointsdataframe(_:sessionidcolumn:labelcolumn:featurecolumn:).md)
- [MLHandActionClassifier.DataSource.labeledKeypointsData(table:sessionIdColumn:labelColumn:featureColumn:)](createml/mlhandactionclassifier/datasource/labeledkeypointsdata(table:sessionidcolumn:labelcolumn:featurecolumn:).md)
