Skip to content

zenstory-ai/video-recap-skills / skills/video-recap

video-recap

Verified

把一段或多集视频做成带画框字幕的中文解说成片或纯原声高光短片。用户提供 .mp4 / .mov / .mkv / .webm,要求做影视解说、短剧二创、加旁白配音、跨集混剪或导出剪映草稿时使用;串联完成看片识台词、定主线与留原声、按台词停顿切镜头、写词检查、TTS 配音与混音加字幕。触发词:视频解说、影视解说、视频旁白、生成解说、视频 recap、video recap、voiceover、narration、recap。

FileKindSize
SKILL.mdskill md18.4 KB
assets/dashboard/app.jsscript16.2 KB
assets/dashboard/index.htmlother867 B
assets/dashboard/styles.cssother22.6 KB
assets/dashboard/tokens.cssother8.9 KB
assets/dashboard/views.jsscript31.4 KB
references/audio-modes.mdmarkdown3.6 KB
references/config-playbook.mdmarkdown8.1 KB
references/creative-editing-playbook.mdmarkdown12.3 KB
references/data-schema.mdmarkdown34.6 KB
references/index-tts.mdmarkdown2.1 KB
references/jianying/LICENSE.duo-videoother1.0 KB
references/jianying/SOURCE.mdmarkdown703 B
references/jianying/empty_draft_meta_info.jsonconfig1.7 KB
references/jianying/empty_jy_material_video.jsonconfig1.8 KB
references/jianying/empty_jy_meta_material_value.jsonconfig358 B
references/jianying/empty_jy_project_info.jsonconfig3.6 KB
references/jianying/empty_jy_segment.jsonconfig1.3 KB
references/jianying/empty_jy_text_styles.jsonconfig440 B
references/jianying/empty_yj_material_audio.jsonconfig865 B
references/jianying/empty_yj_material_text.jsonconfig2.4 KB
references/packaging.mdmarkdown6.8 KB
references/promotional-copy.mdmarkdown4.1 KB
references/prompt-templates.mdmarkdown2.0 KB
references/research-guide.mdmarkdown2.7 KB
references/resource-library.mdmarkdown12.1 KB
references/shot-review.mdmarkdown4.8 KB
scripts/agent_text.pyscript2.7 KB
scripts/artifacts.pyscript972 B
scripts/asr.pyscript12.5 KB
scripts/asr_timing_evidence.pyscript4.2 KB
scripts/assemble.pyscript31.0 KB
scripts/assemble_constants.pyscript894 B
scripts/assembly_contract.pyscript10.3 KB
scripts/assembly_settings.pyscript3.8 KB
scripts/audio_automation.pyscript6.6 KB
scripts/audio_mix.pyscript18.5 KB
scripts/briefing/__init__.pyscript101 B
scripts/briefing/builder.pyscript31.1 KB
scripts/briefing/context.pyscript6.1 KB
scripts/briefing/timeline.pyscript23.0 KB
scripts/codec_peak.pyscript5.1 KB
scripts/cut.pyscript148 B
scripts/cut_cli.pyscript12.4 KB
scripts/cut_contract.pyscript13.3 KB
scripts/cut_qc.pyscript1.9 KB
scripts/cut_render.pyscript13.2 KB
scripts/dashboard/__init__.pyscript159 B
scripts/dashboard/data.pyscript24.6 KB
scripts/dashboard/io.pyscript7.1 KB
scripts/dashboard/runs.pyscript21.8 KB
scripts/dashboard/templates.pyscript9.6 KB
scripts/dashboard_server.pyscript9.3 KB
scripts/detect.pyscript22.2 KB
scripts/doctor.pyexecutablescript12.9 KB
scripts/entry_suggestion.pyscript4.6 KB
scripts/export_jianying.pyscript5.6 KB
scripts/extract.pyscript2.5 KB
scripts/final_qc.pyscript19.0 KB
scripts/frame_grid.pyscript10.6 KB
scripts/jianying/__init__.pyscript49 B
scripts/jianying/builders.pyscript11.3 KB
scripts/jianying/model.pyscript2.7 KB
scripts/jianying/optional.pyscript1012 B
scripts/jianying/schema.pyscript2.5 KB
scripts/jianying/templates.pyscript1.0 KB
scripts/jianying/timeline_contract.pyscript5.8 KB
scripts/jianying/tracks.pyscript2.0 KB
scripts/jianying/writer.pyscript7.8 KB
scripts/lib.pyscript29.6 KB
scripts/library.pyscript31.1 KB
scripts/lint_summary.pyscript5.0 KB
scripts/loudness.pyscript14.7 KB
scripts/materials.pyscript22.1 KB
scripts/media.pyscript18.8 KB
scripts/narration_audio.pyscript13.5 KB
scripts/narration_lint.pyscript24.1 KB
scripts/narrative_selection.pyscript8.9 KB
scripts/packaging.pyscript6.1 KB
scripts/packaging_fonts.pyscript12.0 KB
scripts/packaging_plates.pyscript31.2 KB
scripts/packaging_studio.pyscript34.1 KB
scripts/providers/__init__.pyscript72 B
scripts/providers/fish_audio.pyscript3.1 KB
scripts/providers/index_tts.pyscript8.8 KB
scripts/recap.pyscript183 B
scripts/recap_cli.pyscript6.9 KB
scripts/recap_inspect.pyscript16.5 KB
scripts/recap_runner.pyscript22.0 KB
scripts/recap_runtime.pyscript11.8 KB
scripts/recap_source.pyscript1.8 KB
scripts/recap_stage_qc.pyscript2.7 KB
scripts/recap_timeline.pyscript7.7 KB
scripts/render_preflight.pyscript1.7 KB
scripts/resources/__init__.pyscript200 B
scripts/resources/lock.pyscript6.8 KB
scripts/resources/project_binding.pyscript16.1 KB
scripts/sentence_boundaries.pyscript28.8 KB
scripts/sentence_gate.pyscript8.6 KB
scripts/sfx_mix.pyscript14.6 KB
scripts/shot_review.pyscript18.9 KB
scripts/source_subtitles.pyscript7.2 KB
scripts/speech_ownership.pyscript9.3 KB
scripts/storyboard.pyscript21.8 KB
scripts/subtitles/__init__.pyscript56 B
scripts/subtitles/core.pyscript19.0 KB
scripts/subtitles/render.pyscript8.0 KB
scripts/timeline.pyscript8.2 KB
scripts/timeline_emit.pyscript5.4 KB
scripts/tts_audio.pyscript9.6 KB
scripts/tts_cache.pyscript4.5 KB
scripts/understand.pyscript171 B
scripts/understanding_brief.pyscript6.3 KB
scripts/understanding_cache.pyscript8.0 KB
scripts/understanding_runner.pyscript9.8 KB
scripts/understanding_storyboard.pyscript11.9 KB
scripts/validate.pyscript5.7 KB
scripts/visual_render.pyscript10.1 KB
scripts/vlm.pyscript16.4 KB
scripts/voiceover.pyscript28.0 KB

scripts/recap_cli.py

View on GitHub
"""Define the video-recap command-line contract."""

import argparse
import os
import sys
from pathlib import Path

from lib import TTS_PROVIDERS, env_bool
from recap_source import AUDIO_MODES


# Options whose value names a file or directory; the resume command makes them absolute.
_PATH_DESTS = frozenset({
    "work_dir", "output_dir", "voice_ref", "material_library_dir", "project",
})


def _absolute(value):
    return str(Path(value).expanduser().resolve()) if value else value


def _replayable_argv(parser, argv):
    """The argv as typed, with videos and path values made absolute so it replays from any cwd,
    plus the option names it used, so guards never re-parse sys.argv.

    Runs only after a successful parse, so every option token is an exact option string
    (allow_abbrev=False) and every value-taking option is followed by its value.
    """
    options = {name: action for action in parser._actions for name in action.option_strings}
    out, explicit, tokens, positional_only = [], set(), iter(argv), False
    for token in tokens:
        if positional_only or not token.startswith("-"):
            out.append(_absolute(token))
            continue
        if token == "--":
            positional_only = True
            out.append(token)
            continue
        name, inline, value = token.partition("=")
        action = options[name]
        explicit.add(name)
        if action.nargs == 0:
            out.append(token)
            continue
        fix = _absolute if action.dest in _PATH_DESTS else str
        if inline:
            out.append(f"{name}={fix(value)}")
        else:
            out += [token, fix(next(tokens))]
    return out, frozenset(explicit)


class _DoctorMoved(argparse.Action):
    """Answer the old offline check instead of argparse's "video is required"."""

    def __call__(self, parser, namespace, values, option_string=None):
        parser.error("recap.py --doctor 已移除,请运行 scripts/doctor.py(--tts-provider、--json 照旧)")


def parse_args(argv=None):
    parser = argparse.ArgumentParser(
        description="Full video recap orchestrator (video-recap).",
        allow_abbrev=False,
    )
    parser.add_argument("video", nargs="+")

    core = parser.add_argument_group("核心流程")
    core.add_argument("--work-dir", default=None)
    core.add_argument("--context", default="")
    core.add_argument("--scene-threshold", type=float, default=None)
    core.add_argument("--style", default="纪录片")
    core.add_argument(
        "--edit-mode",
        default="full",
        choices=["full", "cut"],
    )
    core.add_argument("--target-duration", default=None)
    core.add_argument("--output-dir", default=None)
    core.add_argument("--skip-asr", action="store_true")

    voice = parser.add_argument_group("声音策略与配音")
    voice.add_argument("--audio-mode", choices=AUDIO_MODES, default="narration")
    voice.add_argument(
        "--tts-provider",
        default=(os.environ.get("TTS_PROVIDER") or "auto").strip().lower() or "auto",
        choices=TTS_PROVIDERS,
        help="voiceover provider; auto prefers configured MiMo, then Fish Audio; Index is explicit",
    )
    voice.add_argument("--mimo-tts-voice", default=None, help="MiMo TTS voice")
    voice.add_argument(
        "--voice-ref",
        default=None,
        help="reference audio for cloned narration voice (mimo-v2.5-tts-voiceclone)",
    )
    voice.add_argument(
        "--allow-partial-tts",
        action="store_true",
        help="allow voiceover to continue when some narration segments fail TTS",
    )
    voice.add_argument(
        "--burn-subtitles",
        action=argparse.BooleanOptionalAction,
        default=None,
        help="burn narration subtitles into the video (default on; without libass the default "
             "delivers a .srt sidecar instead, while an explicit --burn-subtitles fails; "
             "--no-burn-subtitles to disable)",
    )
    voice.add_argument(
        "--subtitle-y-top",
        type=int,
        default=None,
        help="inclusive auto-rotated display-frame Y at the top of the measured subtitle band",
    )
    voice.add_argument(
        "--subtitle-y-bot",
        type=int,
        default=None,
        help="exclusive auto-rotated display-frame Y at the bottom of the measured subtitle band",
    )

    parser.add_argument("--doctor", nargs=0, action=_DoctorMoved,
                        default=argparse.SUPPRESS, help=argparse.SUPPRESS)

    qc = parser.add_argument_group("QC 与导出")
    qc.add_argument(
        "--require-final-qc",
        action=argparse.BooleanOptionalAction,
        default=True,
        help="full/cut: require a literal passing final_qc summary (default on; --no-require-final-qc for advisory preview)",
    )
    qc.add_argument(
        "--export-jianying",
        action="store_true",
        help="also export an OPTIONAL 剪映/JianYing draft (decoupled; never required)",
    )
    qc.add_argument(
        "--jianying-bundle-media",
        action="store_true",
        help="copy media into the 剪映 draft (default on; portable to another machine)",
    )
    qc.add_argument(
        "--jianying-no-bundle-media",
        action="store_true",
        help="reference media in place instead of copying it into the draft",
    )

    materials = parser.add_argument_group("素材库")
    materials.add_argument(
        "--material-library-dir",
        default=None,
        help="filesystem material library dir (or VIDEO_RECAP_MATERIAL_LIBRARY_DIR)",
    )
    materials.add_argument(
        "--use-materials",
        action=argparse.BooleanOptionalAction,
        default=False,
        help="restore compatible analyzed artifacts from the material library",
    )
    materials.add_argument(
        "--save-materials",
        action="store_true",
        help="save analyzed JSON/MD artifacts into the material library",
    )

    materials.add_argument(
        "--project",
        default=None,
        help="recap_project.json(或其所在目录):绑定资源库里已采用的字幕样式、包装模板、音色与 BGM",
    )

    argv = sys.argv[1:] if argv is None else [str(token) for token in argv]
    args = parser.parse_args(argv)
    # Removed after v0.6.2. Refused for one release: an unread EDIT_MODE=cut would silently run full.
    for name, flag in (("EDIT_MODE", "--edit-mode"), ("TARGET_DURATION", "--target-duration")):
        if os.environ.get(name):
            parser.error(f"环境变量 {name} 已移除:请从环境里删掉它,改传 {flag}")
    # Also refused for one release: an unread =1 would silently drop the gate it used to set.
    if env_bool("REQUIRE_NARRATION_REVIEW", False):
        parser.error(
            "环境变量 REQUIRE_NARRATION_REVIEW 已移除:TTS 前的解说评审门禁已不存在,"
            "旁白靠 SKILL.md 成稿自检;请从环境里删掉它"
        )
    args._argv, args._explicit_options = _replayable_argv(parser, argv)
    return parser, args
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 196kUpdated Claude CodeCodexVerifiedInstall