79543604

Date: 2025-03-29 17:08:55
Score: 0.5
Natty:
Report link

I've created a command-line tool called subscan that does exactly what you're looking for. It combines all the steps you mentioned into a single pipeline:

  1. Crop video to subtitle area
  2. Extract frames at specified frame rate
  3. OCR the frames (using Apple's Vision framework for better accuracy)
  4. Remove duplicates and empty lines

Here's how to use it:

# Install via Homebrew
brew tap vangie/formula
brew install subscan

# Basic usage (read from file)
subscan -i video.mp4 -a 600x50+210+498 -o subtitles.txt

# Using pipe with custom frame rate (2 fps)
cat video.mp4 | subscan -a 600x50+210+498 -r 2 > subs.txt

# Use fast mode with specific languages
subscan -i video.mp4 -a 600x50+210+498 -f -l "en-US,zh-CN" -o subs.txt

Key features:

The tool is open source and available at: https://github.com/vangie/subscan

Requirements:

Reasons:
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: vangie