Communitygithub.com

Zorkxxx/bilingual-subtitles

为影视视频制作、校对或修复英文与简体中文双语字幕,校准时间轴并交付同名 SRT、ASS 和 ZIP;支持字体自选、剧情相关画面文字翻译及跨剧集俚语积累。

bilingual-subtitles 是什么?

bilingual-subtitles is a Claude Code agent skill that 为影视视频制作、校对或修复英文与简体中文双语字幕,校准时间轴并交付同名 SRT、ASS 和 ZIP;支持字体自选、剧情相关画面文字翻译及跨剧集俚语积累。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add Zorkxxx/bilingual-subtitles

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Creating and Proofreading Bilingual Subtitles for Video

Version 1.0.0. Default layout: English on top, Simplified Chinese on bottom. Applicable for single movies, batch episodes, old subtitle repairs, and resuming from breakpoints. First execute the user's confirmed preferences; when no specific requirements are given, use the current defaults from the Version Selection Record. Do not repeatedly interrupt work for options that have not been adjusted.

Starting and Continuing

Read the Task and Data Conventions, and use scripts/project.py to initialize or check progress in the task working directory. Task data, source videos, glossaries, and slang databases are stored outside the skill directory. Read input audio tracks, duration, resolution, subtitle streams, and version information; detect availability of Python, FFmpeg, audio-based tools, and OCR tools, record actual tools and parameters, and do not assume a specific model, GPU, or network service is present.

To continue a task, first compare the source fingerprint, configuration, recorded revision number, and interim artifacts; retain already-reviewed content. For font or encoding fixes, only redo the relevant export and acceptance steps. When the video source is changed, original text is modified, or timeline is adjusted, re-mark affected content as pending review based on dependencies. For parallel tasks, use stable entry IDs, base revision numbers, and conflict detection; do not rely on file name sorting to overwrite review results.

Dialogue, Translation, and Verification

The actual video content is the final source of truth. Read the Production and Review Workflow to select appropriate methods for reference, audio transcription, and timing calibration.

  • English: Preserve the actual wording, colloquialisms, character tone, and meaningful repetitions. Pay special attention to verifying accents, names, proper nouns, low-volume background dialogue, overlapping speech, and discrepancies between references.
  • Chinese: Translate naturally according to character relationships, context, and tone; handle slang, profanity, sarcasm, puns, and humor based on their actual meaning. Maintain work-level character references and terminology; do not use uniform fixed substitutions that obscure multiple meanings.
  • For each subtitle entry, distinctly record the verification status and basis for the original audio transcription, Chinese translation, timeline, and on-screen text. ASR consistency, coverage rate, number of references, and format checks do not equal having listened to or watched the video. When accessible audio is not available, continue with completed text review tasks and clearly document the scope of unverified audio segments.
  • For content that is not clearly audible or distinguishable, retain candidate text, timestamps, and reasons; do not confirm based on plot speculation. The final documentation must truthfully describe the actual verification scope.

Check the entire video for global offsets, gradual drift, and editing jumps; determine the timing correction method based on actual dialogue anchor points. Reasonably split sentences, handle line breaks, speaker transitions, and display duration. On-screen hints, credits, trailers, or missing segments from reference sources must be verified against the actual video; do not automatically treat blank subtitle ranges as silent.

Fonts and On-Screen Text

When selecting or changing fonts, or translating letters, text messages, documents, wall text, etc., read the Fonts and On-Screen Text. English, Chinese, and on-screen text fonts can be configured separately; use scripts/fonts.py to list fonts and check actual text glyph coverage, then check against real video frames for line wrapping, occlusion, and safe areas.

Prioritize translating on-screen text that affects plot, character actions, or clue comprehension. Cross-reference multiple frames and OCR results to verify readable original text, display period, position, and translation; preserve evidence. For important long letters, retain the full readable original text and translation; if the frame cannot accommodate it, split into segments or attach a full-text note, do not silently delete or fabricate missing characters. For ASS, use independent regions and styles; for SRT, use compatible layouts with identifiers, noting font and spatial partitioning limitations.

Accumulation of Slang and Idioms

Read the Slang Library and use scripts/slang.py to retrieve and record specific meanings, regions, tones, character relationships, applicability conditions, and sources. The library is specified by the task configuration and reused across tasks; default candidates do not participate in verified lookups. When a new episode is used, still judge the current context. After each episode review, extract expressions with reusable value from actual dialogue, deduplicate, and write them to the candidate pool; after confirming a translation method, save the subtitle ID and the adopted library revision number.

Candidates and verified entries are kept separate; a single adoption or repeated use does not automatically upgrade. Shared expressions and work-specific memes are separated; revisions preserve history and reference entries, allowing location of affected items in old subtitles. Saved data enables retrieval in subsequent tasks but does not mean the model obtains permanent training.

Export and Delivery

Read the Export and Acceptance, and generate UTF-8 BOM, CRLF .srt and .ass files from the same subtitle record, with the same name as the video. Default: white sans-serif font, thin black outline, scaled to resolution, dialogue displayed in the bottom safe area. Font and layout changes do not alter the dialogue text.

Run scripts/subtitles.py lint and export to check for missing lines, duplicates, garbled text, numbering, time ranges, language, and valid display interval consistency. Format checks do not verify translation meaning or audio-visual synchronization. When available, perform a playback/FFmpeg decode re-read of the entire SRT, and do real frame rendering at the beginning, middle, and end, as well as for long sentences and complex on-screen text; record the player, fonts, and checked scope. Do not claim checks as passed when they have not been executed.

Package each movie's SRT, ASS, reference sources, actual verification scope, pending timestamp items, and necessary on-screen text full-text notes into a ZIP; do not include videos, audio tracks, private libraries, or caches. Use package to verify ZIP content, integrity, and hash; provide actual clickable file links.

Updating This Skill

When the user adjusts options, update the Version Selection Record and version.json: retain option ID, old value, new value, reason, status, and applicable version. Only change authorized options; leave undecided items recorded. Rule versions, data schemas, and library entry revision numbers are maintained separately; for major adjustments, follow the recorded migration steps for backup, conversion, and re-acceptance; do not overwrite existing subtitles, library data, or verification bases.

相关技能