这一组提示词聚焦“字幕文件的格式转换与质量校验”。目标是让 AI 直接生成一个可部署的在线工具:支持 SRT/VTT/ASS 的互转、校验、规范化与批处理,并给出完整项目代码、文件结构、运行命令、部署与测试用例。
在线字幕互转工作台(SRT/VTT/ASS)
把不同来源的字幕统一到同一标准输出,避免播放器/平台兼容性问题。支持批量上传、统一编码与换行规范。
英文 Prompt:
You are to build a production-ready web app: "Sub Convert Workbench".
Category: Format conversion.
Goal: Convert sub files between SRT, WebVTT (VTT), and ASS while preserving timing accuracy.
Hard requirements (must satisfy):
- Output a complete, runnable project (frontend + backend) with file tree.
- Provide all source code.
- Provide run commands (dev + production) and deployment guide (Docker + non-Docker).
- Provide at least 8 automated tests OR at least 12 QA checklist items.
- No image generation features.
Tech stack:
- Frontend: React + Type + Vite.
- Backend: Node.js (Express) + Type .
- Use a robust parser approach; do not rely on regex-only parsing.
Features:
- Upload one or many sub files.
- Detect input format automatically.
- Convert to selected target format.
- Preserve data where possible (e.g., VTT cues, ASS styles as best-effort).
- Show a diff/preview before download.
- Batch download as ZIP.
Validation:
- Validate timecode ordering, overlapping cues warnings, zero/negative durations.
- Show warnings and allow user to continue.
Deliverables:
1) Project file tree.
2) Full code.
3) README with commands.
4) Dockerfile + docker-compose.
5) Tests and how to run them.
中文释义: 生成一个可直接运行与部署的在线字幕转换工具,支持 SRT/VTT/ASS 自动识别与互转,提供预览、批处理与质量校验,并附带测试与部署文档。
字幕时间轴偏移与帧率换算工具
针对剪辑导出、片源帧率变化导致的整体偏移/漂移问题,提供一键偏移与按帧率换算。
英文 Prompt:
Build a web tool "Sub Time Shift & FPS Convert".
Inputs:
- Sub file (SRT/VTT/ASS).
- Operation: shift all cues by +/-(ms), and/or convert timestamps between FPS (e.g., 23.976, 24, 25, 29.97, 30).
Requirements:
- Full project code, runnable.
- Backend must parse, transform, and re-emit sub s safely.
- Provide UI with preview and validation.
- Provide test cases covering edge timecodes, rounding rules, negative clamping, and ASS time format specifics.
Stack: Next.js (App Router) + Type .
- Implement API routes for conversion.
- Use a worker/thread or streaming approach for large files.
Deliverables:
- File tree, full code, commands.
- Deployment: Docker + Vercel-like instructions (without external secrets).
- 10 QA items minimum.
中文释义: 生成一个在线字幕时间轴处理工具:支持整体偏移与帧率换算,能在转换前后做预览与校验,并提供可部署的完整项目与测试/QA。
字幕规范化与风格指南检查器
统一换行、空格、标点、时长阈值、每行字数等规则,输出问题清单与修复后的版本。
英文 Prompt:
Create "Sub Lint & Normalize" web app.
Purpose:
- Lint sub s against a configurable style guide (max chars/line, max lines/cue, min/max cue duration, punctuation rules, whitespace normalization, forbidden characters).
- Auto-fix safe issues and keep an audit report.
Input/Output:
- Upload SRT/VTT/ASS.
- Output normalized sub in original format OR convert to a target format.
- Produce a JSON report + human-readable report.
Stack:
- Backend: Python FastAPI.
- Frontend: SvelteKit + Type .
Deliverables:
- Full code, file tree, commands.
- Docker compose.
- Tests: at least 6 unit tests + 4 integration tests.
- Security: basic upload limits, file type checks, no remote fetch.
中文释义: 生成一个在线字幕“规范化+风格校验”工具:可配置规则、自动修复部分问题,并输出报告与可下载结果,包含完整代码、部署与测试。
字幕重叠与可读性风险检测器
检测重叠、过短/过长、阅读速度过快等风险,给出可操作的修复建议与导出报告。
英文 Prompt:
Build "Sub QA Analyzer".
Core checks:
- Overlap detection between cues.
- Too-short duration, too-long duration.
- Reading speed (chars/sec) and severity levels.
- Large gaps and missing segments hints.
- Identify suspicious timestamp jumps.
Output:
- Table of issues with cue index, timestamps, and suggested fix.
- Export issues as CSV/JSON.
Stack: Vue 3 + Type frontend; Go backend (Gin).
- Provide API endpoints for analysis.
- Provide unit tests for the analyzer algorithms.
- Provide a sample dataset and e2e tests.
Deliverables: full code, file tree, commands, Docker.
中文释义: 生成一个在线字幕质量分析工具:输出重叠、可读性、时长与跳变风险清单,并支持报告导出与可部署代码。
双语字幕合并与对齐转换工具
把中英两份字幕按时间对齐合并(或输出双轨文本),用于发布双语版本或审校对照。
英文 Prompt:
Create "Bilingual Sub Merge" web tool.
Inputs:
- Sub A and Sub B (SRT/VTT/ASS, possibly different formats).
Behavior:
- Align cues by time overlap thresholds.
- Merge text as two lines (e.g., line1=Language A, line2=Language B), configurable order.
- Output SRT/VTT/ASS.
- Provide conflict resolution UI when alignment is ambiguous.
Stack: Remix + Type ; backend uses Node.js.
Must include:
- Full file tree and source.
- Commands for dev/prod.
- Docker deployment.
- At least 5 automated tests for alignment logic + 5 QA checklist items for UI.
中文释义: 生成一个在线双语字幕合并工具:按时间重叠对齐两份字幕并输出合并结果,遇到歧义可交互修正,提供完整工程与测试/部署。
字幕分段拆分与合并批处理工具
将过长字幕拆分、或将短碎字幕合并为更易读的节奏,同时保持时间码连续与合理。
英文 Prompt:
Build "Sub Split/Merge Batch".
Operations:
- Split long cues by punctuation/word boundaries into multiple cues with distributed timings.
- Merge consecutive short cues when gap < threshold.
- Preserve total timing coverage and avoid overlaps.
Constraints:
- Provide a deterministic algorithm and explain it.
- Provide preview + undo.
Stack: Angular + Type frontend; .NET 8 minimal API backend.
Deliverables:
- Full source, file tree, commands.
- Docker.
- Tests: 10 unit tests for split/merge logic.
中文释义: 生成一个支持拆分/合并的在线字幕批处理工具,包含可解释的算法、预览与撤销,并输出可部署项目与测试。
字幕编码检测与修复(UTF-8/GBK/Shift-JIS)
解决字幕乱码与平台字符集不一致的问题,自动检测编码并转换为目标编码,保持换行与时码不变。
英文 Prompt:
Create "Sub Encoding Fixer" web app.
Requirements:
- Upload sub files.
- Detect encoding (UTF-8, UTF-8 BOM, GBK/GB18030, Big5, Shift-JIS) and allow user override.
- Convert to UTF-8 without BOM by default.
- Ensure no timestamp corruption.
Stack: Python FastAPI backend (use chardet/charset-normalizer), React frontend.
Must include:
- Full project code + file tree.
- Run commands + Docker.
- Tests for encoding detection and conversion.
- QA checklist for edge cases (BOM, mixed newlines, invalid bytes).
中文释义: 生成一个在线字幕编码修复工具:自动检测/手动覆盖编码并转换为统一 UTF-8 输出,保证时码与格式不被破坏,附带测试与部署。
字幕版本差异对比与变更摘要生成器
对比两份字幕的时码与文本变化,输出“新增/删除/改动”摘要,方便审校与回归。
英文 Prompt:
Build "Sub Diff & Change Summary".
Inputs:
- Old sub and new sub (SRT/VTT/ASS).
Outputs:
- Visual diff by cue alignment (time overlap + text similarity).
- A change summary: added/removed/modified counts, biggest time shifts, and top changed lines.
- Export summary as Markdown + JSON.
Stack: Astro + React island frontend; Rust backend (Axum).
Deliverables:
- Full code, file tree.
- Commands.
- Docker.
- Tests: at least 8 unit tests for alignment/diff.
中文释义: 生成一个在线字幕差异对比工具:对齐两份字幕后做可视化差异与变更摘要导出,提供完整可部署工程与测试。
WebVTT 章节与注释生成/校验工具(非图片生成)
为长视频制作章节标记与注释,输出标准 WebVTT 结构,并校验 cue 设置与时间范围。
英文 Prompt:
Create "WebVTT Chapters & Notes Builder".
Notes:
- This is NOT image generation.
- The tool helps author and validate WebVTT chapters/ data cues.
Features:
- UI editor for chapters list (start time, , optional note).
- Export as WebVTT.
- Validate ordering, formatting, and time ranges.
Stack: SolidJS + Type ; Node.js backend.
Deliverables:
- Full project, file tree.
- Commands.
- Docker.
- Tests + QA checklist.
中文释义: 生成一个在线 WebVTT 章节/注释制作工具:可视化编辑与导出 WebVTT,并提供严格校验、完整项目代码与测试/部署说明。
字幕批量重编号与索引修复工具
修复 SRT 乱序编号、缺号与重复编号,保证序号与时间码一致,并可输出修复报告。
英文 Prompt:
Build "SRT Reindex & Repair".
Requirements:
- Accept SRT (and optionally VTT/ASS but focus on SRT).
- Fix common issues: missing indices, duplicate indices, non-increasing indices, stray blank lines.
- Keep timestamps unchanged.
- Output repaired SRT + a report of fixes.
Stack: Plain HTML/JS frontend + WebAssembly module (Rust) for parsing/repair.
Deliverables:
- Full source + file tree.
- Build instructions for WASM.
- Docker for serving.
- Tests: at least 12 unit tests for parser/repair.
中文释义: 生成一个在线 SRT 编号修复工具:用稳健解析与修复策略输出可下载结果和修复报告,包含完整源码、构建与测试。