fix(screenshots): retry timestamp offsets on FFmpeg black frame detection - #328
fix(screenshots): retry timestamp offsets on FFmpeg black frame detection#328Aerglonus wants to merge 2 commits into
Conversation
…tion Prevents failed screenshot generations by retrying frame extraction with slight timestamp offsets when FFmpeg renders a solid black image.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughScreenshot capture retries black frames at configured timestamp offsets. It skips negative timestamps and stops on non-black errors. Successful captures preserve libplacebo status. Final errors wrap underlying runner errors when available. ChangesScreenshot capture
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant captureFrame
participant captureFrameSingle
participant ffmpegRunner
captureFrame->>captureFrameSingle: Capture frame at timestamp
captureFrameSingle->>ffmpegRunner: Run frame command
ffmpegRunner-->>captureFrameSingle: Return frame or execution error
captureFrameSingle-->>captureFrame: Report black frame
captureFrame->>captureFrameSingle: Retry with timestamp offset
Poem Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
internal/services/screenshots/ffmpeg_test.go (1)
154-159: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueFormat the composite literal.
Run
make fmt-gobefore commit. It will apply the repository formatter to this keyed composite literal.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/services/screenshots/ffmpeg_test.go` around lines 154 - 159, Format the color.RGBA composite literal assigned to validPayload in testPNGBytes using the repository’s Go formatter, make fmt-go, so its keyed fields follow the project’s standard indentation and spacing.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/services/screenshots/ffmpeg_test.go`:
- Around line 171-180: Update the test using timestampSensitiveRunner to record
each parsed -ss timestamp, then assert that the attempted timestamps are exactly
1.000 followed by 2.000. Keep the existing output-file and non-empty assertions,
and apply the same verification to the additional test block noted in the
comment.
---
Nitpick comments:
In `@internal/services/screenshots/ffmpeg_test.go`:
- Around line 154-159: Format the color.RGBA composite literal assigned to
validPayload in testPNGBytes using the repository’s Go formatter, make fmt-go,
so its keyed fields follow the project’s standard indentation and spacing.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 6223d58c-d32d-4af0-af32-55b6d7cf44f8
📒 Files selected for processing (2)
internal/services/screenshots/ffmpeg.gointernal/services/screenshots/ffmpeg_test.go
Summary by CodeRabbit