Skip to main content
Vane Data / Reference

video_metadata

video_metadata reads stream metadata within a probe byte limit. It selects the first video stream without the attached_pic flag, skipping cover art and other attached pictures.

Signature

example.py
vane.video_metadata(value, *, max_bytes=8388608) -> Expression

SQL: video_metadata(file [, max_bytes]). Expression method: expr.video_metadata(...).

Parameters

NameTypeDescriptionDefault
valueVIDEOFILE value or ExpressionEncoded video object to inspectRequired
max_bytesInteger or ExpressionBounded metadata probe budget8 MiB (maximum 64 MiB)

Returns and errors

Returns a STRUCT with width, height, fps, duration, container_duration, frame_count, and time_base. duration describes only the selected video stream; container_duration describes the whole container. Unknown durations and frame counts stay NULL.

Example

example.py
import vane


con = vane.connect()
con.sql("SELECT video_metadata(video_file('clip.mp4'))").show()