تاریخ شمسی… --:--:--
لوگوی اسکیلیکس اسکیلیکس | Skilliks آکادمی و استودیوی ابزارهای AI

Local Sub Skill (100% Offline Video → Chinese Subtitle Pipeline)

آزاد تازه‌وارد تاییدشده امن

در ساخت، تبدیل، برش، زیرنویس‌گذاری یا تولید محتوای چندرسانه‌ای (ویدیو، صوت، پادکست و تصویر) با ابزارهای تخصصی کمک می‌کند. (شامل ۸ گام عملی · سازگار با Claude Code).

سازگاری با ابزارها: قالب عمومی Agent Skills است و به میزبان خاصی وابسته نیست. مشاهدهٔ جدول سازگاری

متن دستورالعمل (SKILL.md)

دسترسی کامل فعال است
---
name: local-sub-skill
description: '100% local video-to-Chinese subtitle generator and SRT translator powered by Faster-Whisper (large-v3-turbo) and Ollama (Tencent Hy-MT2-1.8B). Zero cloud API keys, zero data upload, with exact SRT timing preservation, checkpoint resume, and kana-residue quality checks.'
---

# Local Sub Skill (100% Offline Video → Chinese Subtitle Pipeline)

Use this skill whenever the user wants to generate or translate Chinese subtitles (`.zh.srt`) for local Japanese or English videos (lectures, documentaries, podcasts, films) completely offline on their own machine.

## One-Time Model Setup

```bash
python scripts/setup_local_models.py --asr-model-dir ./models/faster-whisper-large-v3-turbo
```

This pulls `hf.co/tencent/Hy-MT2-1.8B-GGUF:Q4_K_M`, creates the verified `hy-mt2-local` Ollama model using `scripts/hy-mt2-local.Modelfile`, and downloads `faster-whisper-large-v3-turbo`.

## Workflow 1: Translate an Existing `.srt`, WebVTT (`.vtt`), or ASS/SSA (`.ass`/`.ssa`) File (Zero GPU / Ollama Only)

```bash
python scripts/local_translation.py path/to/lecture.en.vtt --source en --target zh --shift 1.5 --bilingual --ass --notes --glossary glossary.txt
```

- Supports `.srt`, YouTube/yt-dlp WebVTT (`.vtt`, stripping `<c>` / inline timestamp tags and normalizing `MM:SS.mmm` timestamps), and ASS/SSA (`.ass`/`.ssa`, stripping `{...}` override blocks and vector drawings) across `ja`, `en`, `ko`, `fr`, `de`, `es`, `ru`, `pt`, and `auto` -> `zh`, `zh-Hant`, `en`, `ja`, `ko`, `fr`, `de`, `es`, `ru`, or `pt`, plus `--shift <seconds>` for timestamp synchronization.
- Supports custom terminology overrides via `--glossary` (`.json` or `source=target` text) or auto-discovered `.local-sub-glossary.txt` / `glossary.txt`, hashed into cache identity.
- Automatically splits batches and falls back to single-cue translation if the 1.8B model drops an ID.
- Persists model-digest-keyed translation caches and crash-safe checkpoints for instant resume.
- Validates cue counts, non-empty lines, and low Japanese kana residue (`--max-kana-ratio`).
- Pass `--bilingual`, `--ass` (styled `.bilingual.ass` dual-color PotPlayer/VLC/mpv subtitles), and `--notes` (`.bilingual.md` clean reading transcript for Obsidian/Notion) alongside `--bilingual-order zh-first|source-first`.

## Workflow 2: End-to-End Video, Audio, or URL → Source `.srt` → Translated `.srt`

```bash
python scripts/run_single_video.py path/to/movie.mp4 --language ja --target zh --extract-subs --bilingual --ass --mux
python scripts/run_single_video.py path/to/clip.mp4 --language ja --target en --bilingual --ass --burn
python scripts/run_single_video.py path/to/podcast.mp3 --language en --bilingual --notes
python scripts/run_single_video.py "https://www.youtube.com/watch?v=..." --language en --extract-subs --bilingual --notes
```

Supports local video files, audio/podcast files (`.mp3`, `.m4a`, `.wav`, `.flac`, `.ogg`, `.opus`, `.aac`, `.wma`), and media URLs via `yt-dlp` (`--extract-subs` grabs existing YouTube/Bilibili captions without downloading video when `--mux`/`--burn` are off). Pass `--mux` for soft-muxed `.subbed.mkv` or `--burn` for hard-burned `.burned.mp4` (mobile/social-ready). Use `--language ja|en|ko|fr|de|es|ru|pt|auto` and `--target zh|zh-Hant|en|ja|ko|fr|de|es|ru|pt`. Add `--dry-run` to preview output paths without executing models.
<!-- ‹guest · 2026-11-27› -->

## Workflow 3: Batch Process a Folder of Videos, Audio, or `.srt` / `.vtt` Subtitles

```bash
python scripts/run_batch.py path/to/series_folder --language ja --bilingual --continue-on-error
```

Scans video (`.mp4`, `.mkv`, `.mov`, `.avi`, `.webm`, `.m4v`, `.ts`, `.flv`) and audio (`.mp3`, `.m4a`, `.wav`, `.flac`, `.ogg`, `.opus`, `.aac`, `.wma`) files plus standalone `.srt` / `.vtt` subtitle files (use `--subtitles-only` to translate subtitles only, or `--recursive` for nested episodes), automatically reusing valid existing `.srt` / `.zh.srt` files and generating `.bilingual.srt` when requested.

## Workflow 4: Environment Check & Drag-and-Drop Web Studio

```bash
python scripts/doctor.py
python scripts/gui.py --port 8765
```

Runs cross-platform checks (Windows/macOS/Linux; auto-falls back to Python `faster-whisper` when `faster-whisper-xxl` is absent) or starts a zero-dependency local Drag-and-Drop studio at `http://127.0.0.1:8765`.

## Guardrails

- Never overwrite an existing valid `.zh.srt` unless `--force` or `--force-translate` is explicitly passed.
- Always keep source and translated subtitles aligned to the exact video basename (`movie.mp4` -> `movie.zh.srt`) so players like PotPlayer, VLC, IINA, and mpv auto-load them automatically.

این نسخه با نشانه‌گذاری اختصاصی حساب شما نمایش داده می‌شود. برای نصب سریع، به تب نصب و راه‌اندازی بروید.

مهارت‌های مشابه و پیشنهادی

مشاهدهٔ همه ←
رسانه و فایل
✦ Pro

DOCX creation, editing, and analysis

برای کارهای رسانه و فایل، «DOCX creation, editing, and analysis» یک راهنمای کوتاه و روشن است: مسیر «پردازش اسناد، PDF و…

⚡ /docx SKILL.md
Claude / Claude Code
۹۶/۱۰۰ ★ ۱۹۸,۷۹۴
رسانه و فایل
✦ Pro

PDF Processing Guide

«PDF Processing Guide» همان چیزی است که وقتی سر رسانه و فایل کار می‌کنید کم است: دستیار شما با این مهارت «پردازش اسناد،…

⚡ /pdf SKILL.md
Claude / Claude Code
۹۶/۱۰۰ ★ ۱۹۸,۷۹۴
رسانه و فایل
✦ Pro

PPTX creation, editing, and analysis

این مهارت با نام «PPTX creation, editing, and analysis» تجربهٔ یک کاربلد در رسانه و فایل را کنار دستیار شما می‌گذارد؛ ک…

⚡ /pptx SKILL.md
Claude / Claude Code
۹۶/۱۰۰ ★ ۱۹۸,۷۹۴
رسانه و فایل
✦ Pro

Slack GIF Creator

«Slack GIF Creator» یک مهارت آماده در حوزهٔ رسانه و فایل است؛ به دستیار هوش مصنوعی شما یاد می‌دهد «خودکارسازی جریان کار…

⚡ /slack-gif-creator SKILL.md
Claude / Claude Code
۹۶/۱۰۰ ★ ۱۹۸,۷۹۴
رسانه و فایل
✦ Pro

Audio Jingle Skill

در ساخت، تبدیل، برش، زیرنویس‌گذاری یا تولید محتوای چندرسانه‌ای (ویدیو، صوت، پادکست و تصویر) با ابزارهای تخصصی کمک می‌کن…

⚡ /audio-jingle SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۶/۱۰۰ ★ ۱۰۹,۵۹۶
رسانه و فایل
✦ Pro

Changelog → Branded Video

برای کدها، APIها و تغییرات پروژه مستندات تمیز، README کاربردی و گزارش تغییرات (Changelog) قابل فهم می‌نویسد. (شامل ۹ گا…

⚡ /changelog-video SKILL.md
Claude / Claude CodeOpenAI Codex +۲
۹۶/۱۰۰ ★ ۹۰,۱۴۸