Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataFrame
  • PyFlink Multimodal
    • Image
    • Video
    • Utilities
  • PyFlink DataStream
  • PyFlink Common

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 within start_time_ms and end_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. None emits all selected frames.

  • on_error – Error handling policy. "raise" propagates failures; "null" drops unreadable inputs.

  • container_options – Optional PyAV av.open options.

  • 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. 0 disables block caching.

  • read_ahead_blocks – Optional number of blocks to prefetch after a cache miss. 0 disables read-ahead.

  • concurrency – Optional UDTF operator parallelism.

Returns

IMAGE and VIDEO_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"))

previous

pyflink.multimodal.operators.video_split

next

pyflink.multimodal.operators.video_extract_frames

Show Source

Created using Sphinx 4.5.0.