콘텐츠로 이동

Video API

비디오 정보 조회


get_video

단일 비디오 정보 조회

Function Signature

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

Description

특정 비디오의 최신 정보를 Feast API를 통해 조회합니다.

Parameters

Parameter Type Default Description
uuid str required 조회할 비디오 고유 식별자

Returns

{
    "uuid": str,        # 비디오 고유 식별자
    "file_size": int,   # 비디오 파일 크기 (bytes)
    "duration": float,  # 비디오 전체 길이 (초)
    "mp4_source": str   # 비디오 파일 경로
}

예시

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

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

출력:

Duration: 120.5s
File size: 13355607 bytes


get_all_videos

모든 비디오 정보 조회

Function Signature

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

Description

Feature Store에 등록된 모든 비디오 정보를 조회합니다. metadata에 등록된 비디오만 반환합니다.

Parameters

Parameter Type Default Description
simple bool False True이면 UUID 리스트만 반환
False이면 전체 정보 DataFrame 반환

Returns

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

Case 2: simple=TrueList[str] (UUID 리스트)

예시

# 전체 정보
videos = get_all_videos()
print(f"Total: {len(videos)}")

# UUID만
uuids = get_all_videos(simple=True)
print(uuids[:5])

출력:

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