Skip to content

daft.functions.video_metadata#

video_metadata #

video_metadata(file_expr: Expression) -> Expression

Get metadata for a video file.

Parameters:

Name Type Description Default
file_expr VideoFile Expression

The video file to get metadata for.

required

Returns:

Name Type Description
Expression Struct Expression

A struct containing the metadata (width, height, fps, frame_count, time_base)

Source code in daft/functions/video.py
44
45
46
47
48
49
50
51
52
53
54
55
def video_metadata(
    file_expr: Expression,
) -> Expression:
    """Get metadata for a video file.

    Args:
        file_expr (VideoFile Expression): The video file to get metadata for.

    Returns:
        Expression (Struct Expression): A struct containing the metadata (width, height, fps, frame_count, time_base)
    """
    return video_metadata_fn(file_expr)