Skip to main content

VideoDataCSV

VideoDataCSV Objects

class VideoDataCSV(CSVParser.CSVParser)

ApertureDB Video Data.

This class loads the Video Data which is present in a CSV file, and converts it into a series of ApertureDB queries.

Is backed by a CSV file with the following columns:

filename, PROP_NAME_1, ... PROP_NAME_N, constraint_PROP1, format

OR

url, PROP_NAME_1, ... PROP_NAME_N, constraint_PROP1, format

OR

s3_url, PROP_NAME_1, ... PROP_NAME_N, constraint_PROP1, format

OR

gs_url, PROP_NAME_1, ... PROP_NAME_N, constraint_PROP1, format

Example CSV file::

filename,id,label,constraint_id
/home/user/file1.mp4,321423532,dog,321423532
/home/user/file2.mp4,42342522,cat,4234252
...

Example usage:


data = VideoDataCSV("/path/to/VideoData.csv")
loader = ParallelLoader(client)
loader.ingest(data)

or


adb ingest from-csv /path/to/VideoData.csv --ingest-type VIDEO
info

In the above example, the constraint_id ensures that an Video with the specified id would be only inserted if it does not already exist in the database.