Skip to content

[python] Import videos without explicit frame metadata - #10889

Open
XiaoHongbo-Hope wants to merge 11 commits into
apache:masterfrom
XiaoHongbo-Hope:codex/video-auto-frame-metadata
Open

XiaoHongbo-Hope wants to merge 11 commits into
apache:masterfrom
XiaoHongbo-Hope:codex/video-auto-frame-metadata

Conversation

@XiaoHongbo-Hope

@XiaoHongbo-Hope XiaoHongbo-Hope commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Import local or remote videos without preparing frame rows or descriptors:

table.add_video("oss://bucket/example.mp4", metadata={"episode_id": 42})
table.add_video("oss://bucket/example.h265", source_fps=30)
  • Generate zero-based frame_index and relative timestamps in seconds; metadata supplies per-video constants.
  • Preserve containerized video bytes and actual PTS, including variable frame timing. Raw HEVC uses the supplied fixed frame rate and is remuxed to MP4 without re-encoding; temporary files are cleaned up automatically.
  • Require PyAV, one video stream, frame_index: int64, timestamp: float64 and a configured video column. Validate decoding/timestamps before writing; keep the source immutable during import. Capture-time synchronization is not inferred.

Discovery decodes the video; indexing may decode it again. Explicit-frame APIs and the .video format are unchanged.

Tests

179 passed, 1 skipped (PyAV 15.1 / PyArrow 19); seven HEVC/duration tests also pass on PyAV 12.0 and 18.0. Coverage includes B-frames, variable/fractional timing, pixel preservation, indexed reads, HTTP import and failure cleanup. OSS and Windows paths are simulated.

Flake8, Python 3.6 syntax and git diff --check passed.

@XiaoHongbo-Hope XiaoHongbo-Hope changed the title [python] Import local videos without explicit frame metadata [python] Import videos without explicit frame metadata Oct 30, 2026
@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as ready for review October 30, 2026 13:47
@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as draft October 30, 2026 14:05
@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as ready for review October 30, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant