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
vane.video_metadata(value, *, max_bytes=8388608) -> ExpressionSQL: video_metadata(file [, max_bytes]). Expression method: expr.video_metadata(...).
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| value | VIDEOFILE value or Expression | Encoded video object to inspect | Required |
| max_bytes | Integer or Expression | Bounded metadata probe budget | 8 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
import vane con = vane.connect() con.sql("SELECT video_metadata(video_file('clip.mp4'))").show()