Skip to content

Video OCR: test current frame, editable results, double-click seek#12281

Merged
niksedk merged 1 commit into
mainfrom
feature/video-ocr-test-frame-edit
Jul 8, 2026
Merged

Video OCR: test current frame, editable results, double-click seek#12281
niksedk merged 1 commit into
mainfrom
feature/video-ocr-test-frame-edit

Conversation

@niksedk

@niksedk niksedk commented Jul 8, 2026

Copy link
Copy Markdown
Member

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.

  • The engine dispatch is factored out of RunOcr into a shared OcrGroups() so the test and the full scan run the exact same engine paths (Paddle standalone/Python, Ollama, llama.cpp, GLM).
  • The test frame is extracted with a fast demuxer seek (-ss before -i), so testing late in a long video is still instant.
  • Engine availability (download prompts, llama.cpp server start) goes through the same EnsureEngineIsAvailable as 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 to LanguageVideoOcr and English.json.

Testing

  • dotnet build -c Debug succeeds (0 warnings, 0 errors).
  • UI flow not driven headlessly; worth a quick manual smoke test (test button with each engine, cell edit, Delete key, double-click seek).

🤖 Generated with Claude Code

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>
@niksedk niksedk merged commit 783c4b2 into main Jul 8, 2026
1 of 3 checks passed
@niksedk niksedk deleted the feature/video-ocr-test-frame-edit branch July 8, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant