Repository navigation
fix: cap sample_frames output with maxFrames (#80) - #131
Merged
Merged
Conversation
fps mode probes the duration first and lowers a rate that would exceed maxFrames (default 100, max 1000) so frames still span the whole video, reporting requestedFps and a capNote. -frames:v is a backstop when the duration is unknown. Too many timestamps is rejected with a clear error. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #80.
What
sample_frameshad no frame limit:fps: 30on an hour-long recording wrote ~108k PNGs and listed every path in one response.maxFrames(default 100, max 1000).planFpsSampling(pure, inmedia.ts) lowers a rate that would exceed the cap so the frames still span the whole video. The result reportsrequestedFpsand acapNote. That seemed more useful than writing the first 100 frames and stopping.buildSampleByFpsArgsalways passes-frames:v <maxFrames>, so a video whose length can't be probed still stops at the cap (and says so).maxFramesis rejected with an actionable error.I left the optional on-disk
maxWidthfrom the issue out: inline images (#79) are already downscaled, and on-disk frames stay full resolution on purpose.Tests
-frames:v.capNote/requestedFpsthrough the real server, and that too many timestamps is an error.Version 0.11.1, CHANGELOG, README, ROADMAP,
mcp-tools.jsonupdated.🤖 Generated with Claude Code