Communitygithub.com

Jianying Subtitle Fixer

Fixes misrecognized proper nouns in CapCut/Jianying subtitles using a term glossary and AI-powered correction pipeline.

What is Jianying Subtitle Fixer?

This skill automates the correction of speech-to-text errors in CapCut (Jianying) subtitles, particularly for proper nouns like Agent, Claude Code, and MCP that are frequently misrecognized. It works by decrypting the draft file, applying a two-layer correction (exact term replacement plus batch LLM error correction via ZhiPu glm-4-flash), then re-encrypting and writing back the corrected subtitles. The entire process preserves timestamps, styles, and track layouts—users simply close CapCut, run the script, and reopen to see fixed subtitles ready for manual trimming. Includes a growing term glossary (saved to `config/terms.json`) that learns from each correction run. Supports dry-run preview, pure rule-based mode, and automatic backups for safety. Designed for content creators who use CapCut's free speech recognition but spend excessive time manually fixing technical terms.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add jun7799/jianying-subtitle-fixer

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Jianying Subtitle AI Fixer

What Problem Does It Solve?

CapCut's speech recognition is fast and free, but proper nouns (Agent, Claude Code, MCP, WorkBuddy…) are often misrecognized, requiring half an hour of manual corrections per video. This tool automates the process: decrypt draft → double-layer correction → re-encrypt and write back, leaving timelines and styles unchanged. After running, reopen CapCut and start editing right away.

Prerequisites (One-time – see references/setup.md)

  1. Place jy-draftc.exe in the tools/ directory (download from GitHub wenshui330/jy-draftc)
  2. CapCut desktop installed (auto-detected; or set JY_INSTALL_DIR to the version directory containing videoeditor.dll)
  3. ZhiPu API key (environment variable ZHIPU_API_KEY; if you run Claude Code via ZhiPu, it can auto-read settings.json)

Standard Workflow

1. In CapCut: Create a new draft → add video → run "Text → Smart Subtitles" until recognition completes
2. Completely exit CapCut (including system tray) – the script checks this and refuses to write back if CapCut is open
3. Run the script (dry-run first to preview):
   python scripts/fix_subtitles.py "DraftName" --dry-run
4. Show the user workspace/<DraftName>/changes.md comparison table and confirm changes
5. Write back for real (remove --dry-run)
6. User reopens CapCut → subtitles are fixed → manually trim / add speed changes → export

Command Templates

& "<skill-directory>/scripts/fix_subtitles.py" "DraftName" --dry-run   # Preview
& "<skill-directory>/scripts/fix_subtitles.py" "DraftName"             # Write back
& "<skill-directory>/scripts/fix_subtitles.py" "DraftName" --no-llm    # Rule-only, instant

Parameters

ParameterDescription
--dry-runOutput comparison table + SRT without writing back (works even if CapCut is open)
--no-llmOnly apply term table rule replacements, no API calls
--batch NNumber of subtitles per LLM batch, default 30

Term Glossary Maintenance (Core! Gets Better with Use)

config/terms.json:

  • terms: Authoritative writing style (force-checked before write-back, e.g., api→API)
  • fix: Certain "wrong → correct" mappings (e.g., 克劳德扣→Claude Code, engine→Agent)

After each run, if new misrecognitions are found, actively ask the user whether to add them to the glossary. The user is a content creator; terms in the same series of videos repeat heavily, making the glossary the most valuable asset. Note: Longer phrase mappings (e.g., "hand injection→hand-crafted Agent") may be overridden by shorter existing mappings ("hand→manual") – prefer adding a mapping for the target word itself (e.g., "injection→Agent").

Double-Layer Correction Mechanism

  • Rule Layer (primary): Exact term table replacements – instant, zero cost, 100% controllable
  • LLM Layer (fallback): Batch homophone/typo correction using glm-4-flash (30 subtitles per batch, 4 concurrent pipes). Before write-back, passes through term validation + length mutation detection (prevents hallucinated rewrites)

Safety Mechanisms

  • Refuses to write back if CapCut is running; each run automatically creates a backup in workspace/<DraftName>/backups/
  • Only modifies text fields; timestamps, styles, and tracks remain untouched; rollback by overwriting draft_content.json with backup

Known Limitations

  • Depends on jy-draftc's support for the CapCut version (currently supports versions 10.3–11.5; watch that project after major CapCut updates)
  • Manually added title text in the draft will also be corrected (visible in comparison table; generally harmless)
  • glm-4-flash occasionally makes minor oversteps (removes filler words/adds characters); the prompt enforces a "better to miss a fix than make a wrong fix" constraint; always verify with the comparison table.

Related Skills