Repository navigation
fix(media-local): report an ExtractFrame time past the end of the stream - #429
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
An ExtractFrame whose
atistime:<seconds>past the end of the selected video stream fails with a raw filesystem error that names a temporary file:frame:Nis checked against the stream's frame count when the Producer plans the Need ("Frame N is outside the selected stream"), but a time is not. ffmpeg'sselect=gte(t,…)matches no frame, ffmpeg exits successfully without writing an image, andreadFileon the missing output is what fails. The message does not say that the requested time was the problem.When the output image is missing, the execution now reports
Frame extraction found no frame at <seconds>s; the time is past the end of the selected stream(or a general "found no frame" for other selections), with the original error ascause. Other read failures are rethrown unchanged. This changes only the error message: no extraction that succeeds today behaves differently.The new
packages/media-local/test/extract-frame.test.tsmakes a 1-second clip, extracts at 0.5 s, and checks the message for 5 s. It needs ffmpeg and skips without it, like the other media-local tests. It fails on main (FFmpeg 8.0 locally) and passes with the change.Checks run:
node --import tsx --test packages/media-local/test/extract-frame.test.ts packages/media-local/test/alpha.test.ts