vikit.video.video_file_name

Overview

Classes

VideoFileName

Class for Video file name manipulation.

Classes

class vikit.video.video_file_name.VideoFileName(build_settings: vikit.video.video_build_settings.VideoBuildSettings, video_metadata: vikit.video.video_metadata.VideoMetadata, video_type: str = None, video_features: str = None, file_extension: str = 'mp4')

Class for Video file name manipulation.

A video file name is a string that represents the name of a video file. It respects a convention that is used to identify the video file easily

Complementary metadata may exist in additional stores, however, the file name is the primary identifier and the bare minimum is here to simplify processing even if the metadata store is not available

Overview

Methods

extract_features_as_string()

Extract the features from the video features string

from_file_name(file_name)

static Parse a file name to extract the metadata

infer_features()

Infer the features from the video features string

truncate(gap)

Truncate the file name to fit the file system’s limits

Members

VIDEO_TITLE_MAX_LENGTH = 20
extract_features_as_string()

Extract the features from the video features string

static from_file_name(file_name: str)

Parse a file name to extract the metadata

params:

file_name: The file name to parse

Returns:

The video file name object

Return type:

VideoFileName

infer_features()

Infer the features from the video features string

In case unknown features are found, a warning is logged

truncate(gap: int)

Truncate the file name to fit the file system’s limits

params: gap: The gap between the file name’s length and the file system’s limits

36 is the length of the UUID, 4 is the length of the file extension

returns: str: The truncated file name

Attributes

vikit.video.video_file_name.MANAGED_FEATURES = 'dogrvip'
vikit.video.video_file_name.split_separator = '__'