How cavalia88/hardsubextract works
HardSubExtract is a command-line utility that samples video frames, recognizes hardcoded subtitles, merges similar detections, and writes an SRT file. Its principal workflow includes a six-frame region preview and user confirmation before OCR; a separate frame-scroller GUI helps users determine region percentages, which they enter into the CLI. The source excerpts show these runtime stages and calls. The documented handoff of region values is user-mediated, not an automatic data transfer.
Main entry points: HardSubExtract.py CLI workflow · Video_Frame_Scroller.py Frame navigation
Components 14
Subtitle extraction
- CLI workflow
HardSubExtract.py - Sample frames
HardSubExtract.py - Preview display
HardSubExtract.py - Frame OCR
HardSubExtract.py - PaddleOCR
- Subtitle merging
HardSubExtract.py - SRT writer
HardSubExtract.py
Region scroller
- Scroller GUI
Video_Frame_Scroller.py - Video selection
Video_Frame_Scroller.py - Frame navigation
Video_Frame_Scroller.py - Region selection
Video_Frame_Scroller.py
Video and output
- Video file
- SRT file
Other components
- User
Connections 21
- User → CLI workflow: runs with options
README.md - CLI workflow → Sample frames: samples frames
HardSubExtract.py - Sample frames → Video file: reads frames
HardSubExtract.py - CLI workflow → Preview display: displays samples
HardSubExtract.py - CLI workflow → User: requests confirmation
HardSubExtract.py - CLI workflow → Frame OCR: starts extraction
HardSubExtract.py - Frame OCR → Video file: reads frames
HardSubExtract.py - Frame OCR → PaddleOCR: recognizes cropped frames
HardSubExtract.py - Frame OCR → Subtitle merging: merges detections
HardSubExtract.py - Frame OCR → SRT writer: writes subtitles
HardSubExtract.py - SRT writer → SRT file: creates file
HardSubExtract.py - User → Scroller GUI: opens scroller
README.md - Scroller GUI → Video selection: opens video
Video_Frame_Scroller.py - Video selection → Video file: reads video
Video_Frame_Scroller.py - Video selection → Frame navigation: shows first frame
Video_Frame_Scroller.py - Scroller GUI → Frame navigation: navigates frames
Video_Frame_Scroller.py - Frame navigation → Video file: seeks and reads
Video_Frame_Scroller.py - Frame navigation → Region selection: renders region
Video_Frame_Scroller.py - User → Region selection: draws boundaries
Video_Frame_Scroller.py - Region selection → User: shows percentages
Video_Frame_Scroller.py - User → CLI workflow: enters region values
README.md