oomol-lab/video-subtitle-translator/video-subtitle-translator

Claude Code and agent skill by oomol-lab/video-subtitle-translator

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Create subtitles for audio or video, translate them when requested, infer the target language from the user request when omitted, and default subtitled video delivery to burned-in MP4, with soft-subtitle MKV as the secondary mode. Requires the oo CLI. Use when the user asks to transcribe uploaded media, generate SRT/VTT subtitles, translate subtitles with an OOMOL-hosted LLM, or add subtitles to a video using FFmpeg and Fusion API ASR.

Install

npx vskill@latest install oomol-lab/video-subtitle-translator/video-subtitle-translator

SKILL.md

The same SKILL.md was published earlier as oomol-lab/video-subtitle-translator/video-subtitle-translator.

Video Subtitle Translator

When to Use

Use this skill when the user asks to create subtitles for a local audio or video file, translate subtitles, produce .srt or .vtt sidecar files, embed soft subtitles into a video, or burn translated subtitles into video frames.

The ASR path is OOMOL built-in Fusion API Qwen ASR file transcription. Do not ask the user for an ASR provider key and do not rediscover the ASR capability at runtime. The LLM translation path uses the model configuration from oo llm config --json; do not ask the user for an OpenAI key unless oo llm config fails or returns unusable values.

Inputs

  • Required: a local audio or video path, or a publicly reachable audio URL.
  • Translation intent: most video-subtitle product requests are for translated

subtitles because the viewer usually does not share the source language. Translate when the user explicitly asks for translated subtitles, a translated video, video translation, or "subtitles and translation".

  • If the user asks to "add subtitles", "make subtitles", "subtitle this video",

or otherwise requests video subtitles without clearly saying whether they want translation, pause before execution and ask them to choose a target language for translation or explicitly confirm same-language/no-translation subtitles.

  • If the request is only to transcribe, generate captions, or add same-language

subtitles, and that same-language/no-translation intent is explicit, do not translate.

  • Default translation target: when translation is clearly requested and the

user does not name a target language, infer the target from the natural language of the user's request. The language they used to ask is usually their preferred subtitle language. For example, a Chinese request defaults to Simplified Chinese (zh), a Japanese request defaults to Japanese (ja), a Spanish request defaults to Spanish (es), and an English request defaults to English (en). For Chinese, use Simplified Chinese unless the user writes in Traditional Chinese or explicitly asks for Traditional Chinese, Cantonese, or another variant.

  • Ask when unclear: if the wording makes it unclear whether translation is

wanted, ask the user which language to translate subtitles into, or ask them to confirm they want same-language/no-translation subtitles. If translation is clearly wanted but the user's preferred target language cannot be inferred from the request, ask which target language to use.

  • Defaults: source language omitted for unknown or multilingual audio;

enableWords: true; enableITN: false; SRT output; burned-in MP4 for translated videos; sidecar-only output for audio.

  • Default video delivery mode: burned-in MP4. Most users want a single MP4 file

whose subtitles are visible everywhere, especially on social platforms, mobile players, and upload workflows that ignore subtitle tracks.

  • Secondary video delivery mode: soft-subtitle MKV. Use MKV when the user asks

for editable/selectable subtitles, no re-encoding, subtitle tracks, multiple languages, MKV specifically, soft subtitles, or when burn-in encoding is not available or unsuitable.

  • Optional: source language code, output directory, VTT output, soft subtitle

mode (soft-mkv or soft-mp4), burn-in mode, subtitle language code, and whether to keep both original and translated subtitle tracks.

  • Optional translation style inputs: translation_profile, domain,

audience, style_notes, glossary, and video_context.

  • translation_profile defaults to general.
  • Supported profiles: general, film_tv, youtube_explainer,

technical_course, interview_podcast, news_documentary, business_training, gaming_stream, and kids_content.

  • Infer translation_profile from the user's wording when obvious. Use

film_tv for films, TV dramas, sitcoms, streaming shows, and scripted dialogue. Use youtube_explainer for YouTube-style explainers, reviews, tutorials, and creator videos. Use technical_course for courses, API walkthroughs, coding videos, academic talks, or other terminology-heavy material. Use interview_podcast for interviews, podcasts, panel conversations, or unscripted long-form speech. Use news_documentary for news, documentary, or factual narration. Use business_training for corporate, sales, compliance, or onboarding material. Use gaming_stream for game streams and esports content. Use kids_content for children's videos. If the scene is unclear, keep general instead of asking.

  • domain should briefly describe the topic when known, such as

AI developer tools, medical lecture, or sitcom dialogue.

  • audience should describe the expected viewer when known, such as

general viewers, software developers, or adult streaming viewers.

  • style_notes should preserve the user's requested style, for example

natural Netflix-style Chinese subtitles or accurate but not too formal.

  • glossary is an optional list of source-to-target term mappings for names,

products, acronyms, technical terms, and recurring phrases.

  • video_context is optional high-level context such as title, description,

speaker notes, episode setting, or project-specific terminology.

  • Supported Fusion API source language codes are zh, yue, en, ja,

de, ko, ru, fr, pt, ar, it, es, hi, id, th, tr, uk, vi, cs, da, fil, fi, is, ms, no, pl, and sv. Omit language instead of guessing when the user says auto, unknown, or multilingual.

Execution

This skill ships a bundled helper script at scripts/subtitle-tools.mjs. Resolve it relative to this SKILL.md directory and prefer it for local transcript-to-subtitle conversion and LLM subtitle translation. Do not recreate the conversion or translation code inline when the script is available.

Required oo CLI Gate

The OOMOL oo CLI is mandatory for this skill. Verify it before starting media processing:

bash
oo --version

If the shell reports that oo is missing, or if a later oo command fails because authentication or configuration is unavailable, read `references/oo-cli-setup.md` completely and follow it. Load that reference only for setup or recovery; do not load it when oo is already available and working. Do not silently replace Fusion API ASR or OO-hosted translation with another provider. If the user declines the required installation or sign-in, stop and explain that this skill cannot run.

1. Check FFmpeg First

Run:

bash
ffmpeg -version
ffprobe -version

If either command is missing, stop and guide the user to install FFmpeg before processing video or extracting audio. Suggested installs:

  • macOS with Homebrew: brew install ffmpeg
  • Windows/Linux: download the matching prebuilt FFmpeg archive from

https://github.com/jellyfin/jellyfin-ffmpeg/releases, extract it, and add the directory containing ffmpeg and ffprobe to PATH.

Do not recommend sudo apt install ffmpeg for Linux by default. It is more invasive than needed for this workflow and may install an older or differently configured distro build.

After installation, ask the user to open a new terminal or refresh PATH, then rerun the version checks. Do not continue with video work when FFmpeg is missing. For a publicly reachable audio URL and sidecar-only subtitle output, FFmpeg is not needed unless conversion, muxing, or burning is requested.

2. Check Node.js First

The bundled helper script requires a local JavaScript runtime. Use Node.js 18 or newer because the script is an ES module and uses the built-in fetch API.

Run:

bash
node --version
node -e "const major=Number(process.versions.node.split('.')[0]); process.exit(major >= 18 ? 0 : 1)"

If node is missing or the version check fails, stop and guide the user to install Node.js 18 LTS or newer before running scripts/subtitle-tools.mjs. Suggested installs:

  • macOS with Homebrew: brew install node
  • Windows with winget: winget install OpenJS.NodeJS.LTS
  • Ubuntu/Debian: install Node.js 18+ with NodeSource or nvm; distro

apt install nodejs npm is acceptable only when it provides Node.js 18+

After installation, ask the user to open a new terminal or refresh PATH, then rerun the version checks. Do not continue with local subtitle conversion or LLM translation when the JavaScript runtime is missing or older than Node.js 18.

3. Prepare Audio

Create a stable work directory such as outputs/subtitles-<input-name>/. Reuse the same directory on reruns when the user is retrying the same input. Do not reuse translation checkpoint entries unless --resume is explicitly passed; the helper only resumes entries whose saved source text still matches the current subtitle cue.

For local video or any media that needs normalization, extract mono 16 kHz WAV:

bash
ffmpeg -y -i "$INPUT_MEDIA" -vn -ac 1 -ar 16000 -c:a pcm_s16le "$WORK_DIR/audio.wav"

For a local audio file that Fusion API can read directly, uploading the original file is acceptable. If the upload or ASR rejects the format, convert it with the same FFmpeg command and upload audio.wav.

Upload the audio that will be transcribed:

bash
oo file upload "$AUDIO_PATH" --json

Use the returned downloadUrl as fileURL. Do not pass local filesystem paths to Fusion API connector actions.

4. Submit Fusion API ASR

Use this exact connector action:

bash
oo connector run "fusion-api" \
--action "qwen_asr_filetrans_submit" \
--data @submit-asr.json \
--json

Payload skeleton:

json
{
"fileURL": "https://...",
"language": "en",
"enableITN": false,
"enableWords": true
}

Rules:

  • fileURL is required and must be the uploaded audio downloadUrl or a

public audio URL.

  • Omit language when unknown or multilingual; otherwise use one supported

code from the input list above.

  • Set enableWords: true so the result can be converted into timed subtitles.
  • Omit channelID unless the user specifically asks for one or more channels.
  • The submit response returns sessionId. Save it in job.created.json.
5. Poll and Fetch Result

Poll state with:

bash
oo connector run "fusion-api" \
--action "qwen_asr_filetrans_state" \
--data "{\"sessionID\":\"$SESSION_ID\"}" \
--json

Expected states:

  • {"state":"processing","progress":...}: wait and poll again.
  • {"state":"completed"}: fetch the result.
  • {"state":"not_found","error":"..."}: stop and report the missing session.

Fetch result with:

bash
oo connector run "fusion-api" \
--action "qwen_asr_filetrans_result" \
--data "{\"sessionID\":\"$SESSION_ID\"}" \
--json

The completed result has state: "completed" and useful transcript data at data. Save the full response as job.done.json and data as transcript.json. Schema indicates data includes taskID, transcriptionURL, usage, and transcription details. This field shape was schema-confirmed; exact nested transcript content can vary by media.

6. Build Source Subtitles

Use the bundled script to convert the saved Fusion API result or transcript.json into timed subtitle files:

bash
node "$SKILL_DIR/scripts/subtitle-tools.mjs" fusion-to-subtitles \
--input "$WORK_DIR/transcript.json" \
--out-dir "$WORK_DIR" \
--time-unit ms \
--formats srt

Pass --formats all when VTT was requested. The script contains the Sublinea-style timed-word cue segmentation defaults and writes transcript.txt, transcript.srt, transcript.word-timed.srt, and optionally transcript.word-timed.vtt.

Convert Fusion API transcript data into an internal timed-word list:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

  • SKILL.md in the repositoryCheckingSKILL.md

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/oomol-lab/video-subtitle-translator/video-subtitle-translator/badge)](https://verified-skill.com/skills/oomol-lab/video-subtitle-translator/video-subtitle-translator)

Something wrong with this skill or its page? Tell us.