HardSubX
A professional video hard subtitle extraction tool with OCR. Extract hardcoded subtitles from any video and output SRT, VTT, ASS, JSON and more. Built with Tauri + Vue 3 + Rust.
Install / Use
/learn @Agions/HardSubXREADME
HardSubX
<div align="center"> <img src="logo.svg" width="120" height="120" alt="HardSubX" /> </div> <div align="center">Professional video hard subtitle extraction tool. Extract hardcoded subtitles from any video and output SRT, VTT, ASS, JSON and more. Built with Tauri + Vue 3 + Rust.
</div>Key Features
Frame-Accurate Extraction
Every subtitle maps to exact video frames. View source frames directly from the subtitle list.
Multi-Engine OCR
| Engine | Technology | Accuracy | Speed | Languages | |:---|:---|:---:|:---:|:---:| | PaddleOCR | PP-OCRv5 Deep Learning | Excellent | Fast | 80+ | | EasyOCR | PyTorch | Good | Medium | 80+ | | Tesseract.js | LSTM + WASM | Good | Fastest | 100+ |
Smart Post-Processing
- Multi-pass OCR: recognize multiple times, take the best result
- Text normalization: full-width to half-width punctuation, Chinese typo correction
- Confidence calibration: mixed language / short text / repeated chars auto-degraded
- Subtitle merge: Levenshtein similarity auto-deduplication
9 Export Formats
| Format | Frame-Mapped | Best For | |:---|:---:|:---| | SRT | No | Universal subtitle players | | WebVTT | No | Web video | | ASS | No | Anime fansub, advanced styling | | JSON | Yes | Frame-accurate editing | | CSV | Yes | Spreadsheet analysis | | TXT | No | Plain text | | LRC | No | Lyrics | | SBV | No | YouTube subtitles | | SSA | No | Legacy subtitle format |
Supported Input Video
MP4 · MKV · AVI · MOV · WebM
Quick Start
# Clone the repo
git clone https://github.com/Agions/HardSubX.git
cd HardSubX
# Install frontend dependencies
pnpm install
# Run in development mode
pnpm tauri dev
# Build production package
pnpm tauri build
CLI
# Basic extraction
hardsubx-cli extract video.mp4 --output ./subs
# Multi-format output
hardsubx-cli extract video.mp4 --format srt,vtt,json --output ./subs
# Specify ROI region + OCR engine
hardsubx-cli extract video.mp4 --roi bottom --ocr paddle --lang ch,en
# Custom confidence threshold
hardsubx-cli extract video.mp4 --confidence 80
# Preview a specific frame
hardsubx-cli preview video.mp4 --frame 1500
# Show video metadata
hardsubx-cli info video.mp4
# Display help
hardsubx-cli --help
Tech Stack
| Layer | Technology | |:---|:---| | Desktop Framework | Tauri 2.x | | Frontend | Vue 3 + TypeScript | | Backend | Rust | | OCR Engines | Tesseract.js (WASM), PaddleOCR (Native), EasyOCR | | State Management | Pinia | | Build Tool | Vite |
Project Structure
HardSubX/
├── src/ # Vue frontend
│ ├── components/ # Vue components
│ │ ├── common/ # Button, Modal, Tooltip
│ │ ├── layout/ # ToolBar, SidePanel, VideoPreview
│ │ ├── video/ # ROISelector, Timeline
│ │ └── subtitle/ # SubtitleList, ExportDialog
│ ├── composables/ # Vue composables
│ │ ├── useOCREngine.ts # OCR engine + post-processing
│ │ ├── useVideoPlayer.ts
│ │ └── useBatchProcessor.ts
│ └── stores/ # Pinia stores
│
├── src-tauri/ # Rust backend
│ └── src/commands/ # Tauri IPC commands
│ ├── video.rs
│ ├── ocr.rs
│ └── export.rs
│
├── docs/ # Documentation
│ ├── index.md
│ ├── getting-started.md
│ ├── cli.md
│ └── architecture.md
│
└── cli/ # Node.js CLI tool
License
Related Skills
himalaya
351.4kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
taskflow
351.4kname: taskflow description: Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layer
qqbot-channel
351.4kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
Writing Hookify Rules
110.7kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
