Update task task-86

This commit is contained in:
Dylan Knutson
2025-08-14 18:14:28 +00:00
parent 66e97ba5c7
commit 981bea5016

View File

@@ -1,7 +1,7 @@
---
id: task-86
title: Fix WebmOrMp4 frame extraction near end of video
status: In Progress
status: Done
assignee:
- '@assistant'
created_date: '2025-08-14'
@@ -23,3 +23,7 @@ The WebmOrMp4 class fails to extract frames near the end of videos due to imprec
## Implementation Plan
1. Analyze the current frame seeking logic and identify the root cause\n2. Research alternative approaches for seeking near the end of videos\n3. Implement a more robust seeking strategy\n4. Test the fix with the failing MP4 test case\n5. Verify no regressions with existing webm tests
## Implementation Notes
Fixed the WebmOrMp4 frame extraction issue by simplifying the seeking logic. The previous implementation used complex logic to determine whether to seek from the beginning (-ss) or from the end (-sseof) of the video, but seeking from the end was causing failures when trying to extract frames near the end of short videos. The fix removes this complexity and always seeks from the beginning with a small safety margin (0.01s) for the last frame to prevent seeking beyond the video duration. This approach is more reliable and the performance difference is negligible. All tests now pass including both MP4 and webm functionality.