SWHL/RapidVideOCR

🎦 Extract video hard subtitles and automatically generate corresponding srt files.

What it solves

Videos with burned-in (hard) subtitles can't be searched, edited, or translated directly. RapidVideOCR automatically recognizes those subtitle texts and converts them into standard subtitle files (SRT, ASS, TXT), making it easier to reuse, index, or retime the content.

How it works

RapidVideOCR combines two main stages:

  1. Key-frame extraction – It works together with the external tool VideoSubFinder, which pulls out the frames where subtitles actually appear from the video.
  2. OCR recognition – RapidVideOCR feeds those key frames through RapidOCR, an OCR engine that supports many languages, to read the text in each subtitle frame. After recognition, the tool assembles the recognized text into timed subtitle files (SRT, ASS, TXT). You can use it either from the command line (rapid_videocr -i RGBImages) or via a Python script with the RapidVideOCR class.

Who it's for

This is aimed at anyone who deals with videos that have hardcoded subtitles – for example, video editors, content creators, translators, or developers who need to process large amounts of subtitle-bearing footage. It's also useful for building datasets for training speech or language models.

Highlights

  • Faster extraction when used alongside VideoSubFinder, which isolates subtitle frames before OCR.
  • More accurate recognition because it leverages RapidOCR, a well-tested OCR library.
  • Easy installation via pip, with a simple command-line interface and a Python API.
  • Supports all languages that RapidOCR supports, making it multilingual.
  • Outputs three common subtitle formats (SRT, ASS, TXT) in one go.
  • Available as an online demo on Hugging Face and as a desktop EXE version (RapidVideOCRDesktop).

Related

  • Project
  • Project
  • Project
  • Project