Severity: Critical (silent data loss — produces 0-byte SRT)
Description
When running in fast or auto mode with a subtitle area rectangle drawn on the video, the output .srt file is 0 bytes. The log output shows all frames processed but every result is dropped:
× Confidence: 99.7% Result: 好烫 Drop reason: Out of selection
× Confidence: 99.9% Result: 来看我的旷世神作 Drop reason: Out of selection
The OCR is working correctly (99-100% confidence), but the subtitle area filter rejects everything.
Root cause
The extract_frame_by_vsf method in backend/main.py crops frames to the subtitle area before sending them to the OCR worker. The OCR's extract_subtitles function then compares detection coordinates (relative to the cropped image, e.g., y=0..150) against the original full-frame subtitle area (e.g., ymin=562, ymax=713). The coordinate systems don't match, so the AABB intersection check always fails.
Reproduction
- Open any video with subtitles
- Draw a subtitle area rectangle on the preview
- Run in
fast or auto mode (default)
- Output SRT is empty
Workaround
Set subtitle area to "Full Screen" (no rectangle), or use accurate mode.
Fix
In start_subtitle_ocr_async, don't pass sub_area for filtering when VSF is used — VSF already handles filtering by cropping. Pass None for VSF mode, keep the subtitle area for DET/FPS modes.
Severity: Critical (silent data loss — produces 0-byte SRT)
Description
When running in
fastorautomode with a subtitle area rectangle drawn on the video, the output.srtfile is 0 bytes. The log output shows all frames processed but every result is dropped:The OCR is working correctly (99-100% confidence), but the subtitle area filter rejects everything.
Root cause
The
extract_frame_by_vsfmethod inbackend/main.pycrops frames to the subtitle area before sending them to the OCR worker. The OCR'sextract_subtitlesfunction then compares detection coordinates (relative to the cropped image, e.g., y=0..150) against the original full-frame subtitle area (e.g., ymin=562, ymax=713). The coordinate systems don't match, so the AABB intersection check always fails.Reproduction
fastorautomode (default)Workaround
Set subtitle area to "Full Screen" (no rectangle), or use
accuratemode.Fix
In
start_subtitle_ocr_async, don't passsub_areafor filtering when VSF is used — VSF already handles filtering by cropping. PassNonefor VSF mode, keep the subtitle area for DET/FPS modes.