pyflink.multimodal.operators.video_explode_frames#
- video_explode_frames(*columns, frame_selector='keyframe', sample_interval_ms=None, max_frames=None, on_error='raise', container_options=None, read_chunk_size=None, max_cached_blocks=None, read_ahead_blocks=None, concurrency=None)[source]#
Expand selected video frames into one output row per frame.
Use the returned UDTF with
Table.join_lateral/flat_map. URI inputs read the full video; segment refs only emit frames withinstart_time_msandend_time_ms.- Parameters
*columns – Optional URI or segment column. When provided, the UDTF is applied directly instead of returning a factory.
frame_selector – Frame selection mode,
"keyframe","sample", or"all_frames".sample_interval_ms – Sampling interval for
frame_selector="sample".max_frames – Optional safety limit for emitted frames per input row.
Noneemits all selected frames.on_error – Error handling policy.
"raise"propagates failures;"null"drops unreadable inputs.container_options – Optional PyAV
av.openoptions.read_chunk_size – Optional Java-backed file read chunk size in bytes. Must not exceed the 16 MiB Java bridge read range limit.
max_cached_blocks – Optional per-file cache block count.
0disables block caching.read_ahead_blocks – Optional number of blocks to prefetch after a cache miss.
0disables read-ahead.concurrency – Optional UDTF operator parallelism.
- Returns
IMAGEandVIDEO_FRAME_METADATA.- Return type
A UDTF producing two columns
- Example::
>>> frames = table.join_lateral( ... video_explode_frames(frame_selector="keyframe")( ... col("uri")).alias("frame", "metadata"))