콘텐츠로 이동

Video API

Retrieve video information.


get_video

Retrieve information for a single video.

Function Signature

def get_video(uuid: str) -> Optional[Dict[str, Any]]

Description

Retrieves the latest information for a specific video via the Feast API.

Parameters

Parameter Type Default Description
uuid str required Unique identifier for the video to retrieve

Returns

{
    "uuid": str,        # Unique identifier for the video
    "file_size": int,   # Video file size (bytes)
    "duration": float,  # Total video duration (seconds)
    "mp4_source": str   # Path to the video file
}

Example

video = get_video(uuid="f2c99e03-8415-4926-bf3d-60ec8c2ddab4")

print(f"Duration: {video['duration']}s")
print(f"File size: {video['file_size']} bytes")

Output:

Duration: 120.5s
File size: 13355607 bytes


get_all_videos

Retrieve information for all videos.

Function Signature

def get_all_videos(
    simple: bool = False
) -> Union[pd.DataFrame, List[str]]

Description

Retrieves information for all videos registered in the Feature Store. Only returns videos registered in the metadata store.

Parameters

Parameter Type Default Description
simple bool False If True, returns only a list of UUIDs.
If False, returns a DataFrame with full information.

Returns

Case 1: simple=Falsepd.DataFrame (uuid, file_size, duration, mp4_source)

Case 2: simple=TrueList[str] (List of UUIDs)

Example

# Full information
videos = get_all_videos()
print(f"Total: {len(videos)}")

# UUIDs only
uuids = get_all_videos(simple=True)
print(uuids[:5])

Output:

Total: 140
['f2c99e03-8415-4926-bf3d-60ec8c2ddab4', '1d0f4f13-f79b-448b-b176-cbcc4f38e911', ...]