GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(video): pin output framerate on rendered analyzer clips by Abdullah-Builds · Pull Request #53 · google/artemis

Conversation

@Abdullah-Builds

@Abdullah-Builds Abdullah-Builds commented Sep 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Fix analyzer clip output framerate

Fixes #52

What

render_timeline_clip() never set an explicit output frame rate on the final ffmpeg encode, so the encoder fell back to a default 25fps and duplicated frames to preserve real duration — every analyzer clip was silently encoded at ~25fps instead of the requested fps (default 15), with ~40% duplicate frames.

Why it matters

This function's one job is to keep a frame index mappable back to a real recording timestamp (start_time + frame_offset). UnifiedMobileController.render_timeline_clip calls it on the production path for every analyzer clip the agent renders, so the framerate drift was live in every such clip, not just this test fixture.

Fix

Add -r {fps} to the output stage of the ffmpeg command so the encoder has an explicit target framerate instead of guessing:

             "-filter_complex", ";".join(filter_parts),
             "-map", "[outv]",
+            "-r", str(fps),
             "-c:v", "libx264",

Testing

tests/unit/test_unified_controller_video.py::test_analyzer_clip_keeps_timeline_time_across_restart_gap was failing on main (assert 77 <= 47); now passes — frame count drops from 77 → 46, inside the expected 43–47 range.
Full file: uv run pytest tests/unit/test_unified_controller_video.py -q → 22 passed.
ruff format --check, ruff check, pyright --project pyright-core.json clean on the changed file.
Reproduced independently of pytest (raw ffmpeg command + cv2.VideoCapture frame count) to confirm this isn't a test-fixture artifact — the ffmpeg log shows the fallback explicitly: frame=77 ... time=00:00:03.00 ... dup=31 drop=0.

Scope

One-line change, single file (artemis/utils/video.py), no behavior change to segment planning or gap handling — only the output encode step.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Abdullah-Builds
Fix analyzer clip framerate by explicitly setting ffmpeg output -r to…
f07cf1e
… requested fps
@basil-k-aji-dev basil-k-aji-dev mentioned this pull request Sep 14, 2026
fix(video): pin the output frame rate on rendered analyzer clips #92
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Fix analyzer clip framerate

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Abdullah-Builds
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.