Video OCR: test current frame, editable results, double-click seek#12281
Merged
Conversation
Three quality-of-life improvements for the burn-in / video OCR window: - "Test current frame" button in the scan-area row: OCRs only the frame at the current preview position with the selected engine and shows the result in the status text - so scan area, engine choice, and brightness can be validated in seconds instead of scanning the whole video. The engine dispatch is factored out of RunOcr into OcrGroups() and shared by both paths; the test frame is extracted with a fast demuxer seek (-ss before -i). - Editable results: the text column in the result grid is now editable so OCR mistakes can be fixed in place, and Delete removes the selected lines (with renumbering) before accepting with OK. - Double-clicking a result line seeks the video preview to that line's start time, making it easy to check what the OCR actually saw. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Three quality-of-life improvements for the burn-in / video OCR window:
1. "Test current frame" button
New button in the scan-area row that OCRs only the frame at the current preview position with the selected engine and shows the result in the status text (
Test result: .../Test: no text found in the scan area). This lets you validate the scan area, engine choice, and brightness minimum in seconds instead of discovering a bad setting after scanning the whole video.RunOcrinto a sharedOcrGroups()so the test and the full scan run the exact same engine paths (Paddle standalone/Python, Ollama, llama.cpp, GLM).-ssbefore-i), so testing late in a long video is still instant.EnsureEngineIsAvailableas a full scan.2. Editable results + Delete
The text column in the result grid is now editable, so OCR mistakes can be fixed in place before pressing OK. The Delete key removes the selected lines (with renumbering); the keypress is ignored while a cell edit is in progress.
3. Double-click a line → seek preview
Double-clicking a result line moves the video preview to that line's start time, so you can eyeball exactly what the OCR saw.
New language strings (
testOcr,testOcrRunning,testOcrResultX,testOcrNoTextFound) added toLanguageVideoOcrandEnglish.json.Testing
dotnet build -c Debugsucceeds (0 warnings, 0 errors).🤖 Generated with Claude Code