Repository navigation
fix: retry corrupt trailing video frames in resample_video - #5795
Merged
Samoed merged 1 commit intoOct 27, 2026
Merged
Conversation
Samoed
reviewed
Oct 27, 2026
Samoed
left a comment
Member
There was a problem hiding this comment.
Dug into why this video "worked" originally. The file really is corrupt, so the dataset isn't the problem.
- beckham_70_yard_goal/ab12206048207553294916664d0ebf1cd9e81ef6.flv reports 1151 frames. Frames 0–1149 decode fine, but the last one fails (Could not push packet to decoder: Invalid data found when processing input). PyAV hits the same packet after 1150 frames, so it's the file's tail rather than a torchcodec quirk. I checked this at the pinned dataset revision 61bcc06a….
- The stats generation and cache hashing go through hash_video (mteb/_content_hashes.py), which uses num_frames - 1 and so never touches the last frame. That is probably why the stats and the original contribution looked fine. I couldn't check what the original run did, so this is an inference.
- Evaluation reads the frames in resample_video (mteb/models/modality_collators.py). It already retries by dropping trailing frames, but only when the error contains "no more frames". This file raises "Invalid data found…", so the error propagates. Whether a model hits it depends on whether it samples the last frame index.
Because the file is only bad at the very end, I'd rather not drop the video and change the benchmark data. Instead, could we extend the retry in resample_video to also catch "Invalid data found"?
7 of 22 tasks
AdnanElAssadi
force-pushed
the
fix/vcdb-broken-video
branch
from
October 27, 2026 20:51
ff8b393 to
13d8112
Compare
Samoed
approved these changes
Oct 27, 2026
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.
VCDBCoreRetrievalandVCDBCoreAudioVideoRetrievalcrash during evaluation withRuntimeError: decode_av_frame ... Invalid data found when processing input. One video,beckham_70_yard_goal/ab12206048207553294916664d0ebf1cd9e81ef6.flv, has a corrupt last frame: frames 0–1149 decode, frame 1150 doesn't.resample_videoalready retries with fewer trailing frames, but only when the error says "no more frames". This also retries on "Invalid data found", so the video is read without its last frame and the dataset stays as it is.microsoft/xclip-base-patch32facebook/pe-av-small