Skip to content

vision: VFR-accurate video frame timestamps, area-bounded decode scale, declared min/max pixels (ported from Enntity) - #233

Merged
AzeezIsh merged 4 commits into
mainfrom
stack/video-timestamps
Oct 29, 2026
Merged

AzeezIsh merged 4 commits into
mainfrom
stack/video-timestamps

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

Stack: … ← #231 ← #232 ← this.

Summary

Test plan (vs parent #232)

  • video 54/54, processor_pixels 10/10, msg_entry 20/20, qwen3vl 3/3 (reiner)
  • not run: the ffmpeg-gated decode tests (an_h264_mp4_*, a_128_frame_plan_*); there's no ffmpeg on our pair, so the showinfo path still needs a host with ffmpeg
  • pair (job J39): vision-fidelity ×2, greedy C1 == serial refs

Tracking: #220.

Generated with Devin

@AzeezIsh

Copy link
Copy Markdown
Contributor Author

Pair check vs parent (binary from e0bf6ee83, two GB10s, rc16 resident):

@AzeezIsh

Copy link
Copy Markdown
Contributor Author

With ffmpeg now on reiner (static 7.0.2, user-space), the ffmpeg-gated decode tests run, and 3 frame-count tests fail on this PR's head: a_128_frame_plan_keeps_the_late_tail, an_h264_mp4_preserves_every_frame, a_capped_clip_selects_actual_frames (left == right frame counts). Investigating whether it's the showinfo timestamp path or this static ffmpeg build (no ffprobe).

@AzeezIsh

Copy link
Copy Markdown
Contributor Author

Fixed. The 3 failures were this PR's own (on the parent, 342ca7e15, all 14 ffmpeg tests pass):

  • The new showinfo + -v info stderr was never drained concurrently, so ffmpeg blocked mid-decode once the pipe filled (6 of 30 frames). Fix: 42ee0a3ee reads stderr on its own thread.
  • Sparse selections were duplicated and retimed. Fixes: 5eed0265b (a source-PTS select, plus taking the whole clip when the cap holds it) and 17fe9a23a (-fps_mode passthrough). Both follow Enntity's d0cead1 shapes.

video_decode_ffmpeg is now 17/17 on reiner (static ffmpeg 7.0.2). Head 17fe9a23a; #234, #236 and #237 are rebased on top (force-with-lease).

@AzeezIsh
AzeezIsh force-pushed the stack/video-timestamps branch from 17fe9a2 to 24e509f Compare October 29, 2026 07:12
@AzeezIsh
AzeezIsh force-pushed the stack/video-timestamps branch from 24e509f to e6386f6 Compare October 29, 2026 07:19
@AzeezIsh
AzeezIsh force-pushed the stack/video-timestamps branch from e6386f6 to 6b2cf43 Compare October 29, 2026 07:20
@AzeezIsh
AzeezIsh force-pushed the stack/video-timestamps branch from 6b2cf43 to ea4e068 Compare October 29, 2026 07:29
@AzeezIsh
AzeezIsh force-pushed the stack/video-timestamps branch from ea4e068 to 53e9c2d Compare October 29, 2026 07:30
@AzeezIsh
AzeezIsh marked this pull request as ready for review October 29, 2026 07:39
…video bounds

Port of Enntity/atlas 6f3d0a7 + 95d20a2 + 170540e + 0eef403
(AGPL-3.0-only), on top of #202's already-landed expansion machinery.

- decode_with_plan returns each emitted frame's real PTS from ffmpeg's
  showinfo instead of the plan's assumed positions — identical on CFR,
  materially different on VFR.
- The decoded scale bounds by pixel AREA, not per-side (a 1xN strip has a
  huge side inside any per-side bound).
- read_declared_pixels reads both bounds of one modality from whichever
  processor file declares the max: image min_pixels beside longest_edge,
  video_processor's from video_preprocessor_config.json or
  processor_config.json [video_processor]. Startup installs them on
  VisionConfig (min_pixels, video_pixels) next to max_pixels; the
  operator's --vision-max-pixels still overrides the image max only.

#202 already covered: the per-group timestamp expansion machinery
(qwen3vl_vision.rs), QwenVisionPlaceholder.timestamps, the explicit
timestamp sample plan, and the decode_frames/decode_with_plan shape.

Their tests ported where our surface matches (the frames.rs-dependent
cases are Enntity's separate refactor and stay out).
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