Metadata
Metadata includes technical and contextual information about each video uploaded to the platform. By default, all the videos have the following metadata associated with them:
duration: The duration of the video, expressed in secondsfilename: The filenamefps: The number of frames per secondheight: The height of the videosize: The size of the video file, expressed in KBvideo_title: The title of the video (defaults to the file name)width: The width of the video
Custom metadata allows you to add more data to your videos, providing more detailed, specialized, or context-specific information.
The values you provide must be of the following types: string, integer, float or boolean. If you want to store other types of data such as objects or arrays, you must convert your data into string values.
Provide custom metadata
Once the platform has finished indexing your videos, you can provide custom metadata by invoking the update method of the indexes.videos object with the following parameters:
index_id: A string representing the unique identifier of the index containing the video for which you want to provide custom metadata.video_id: A string representing the unique identifier of the videouser_metadata: A dictionary containing your custom metadata. In this example, themetadatadictionary has four keys:views,downloads,languageandcountry. Theviewsanddownloadskeys are integers, and thecreation_dateandcountrykeys are strings.
Filter on custom metadata
Once you’ve added custom metadata to your videos, you can use it to filter your search results.
The example code below filters on a custom field named views of type integer. The platform will return only the results found in the videos for which the value of the views field equals 120000.
For more details on filtering search results, see the Filtering page.