zenstory-ai/video-recap-skills / skills/video-recap
video-recap
Verified把一段或多集视频做成带画框字幕的中文解说成片或纯原声高光短片。用户提供 .mp4 / .mov / .mkv / .webm,要求做影视解说、短剧二创、加旁白配音、跨集混剪或导出剪映草稿时使用;串联完成看片识台词、定主线与留原声、按台词停顿切镜头、写词检查、TTS 配音与混音加字幕。触发词:视频解说、影视解说、视频旁白、生成解说、视频 recap、video recap、voiceover、narration、recap。
scripts/jianying/tracks.py
View on GitHub"""Semantic track ordering and overlap-safe allocation for JianYing export.
The order mirrors duo-video's authoring layout. It is used only to order track
objects; JianYing segment ``render_index`` remains the schema default and must
not be confused with this semantic layout value.
"""
from dataclasses import dataclass
@dataclass(frozen=True)
class TrackBand:
kind: str
track_type: str
layout_order: int
description: str
SEGMENT_RENDER_INDEX = 2
TRACK_LAYOUT_BANDS = {
"audio": TrackBand("audio", "audio", 20_000, "narration, music, and general audio"),
"video": TrackBand("video", "video", 40_000, "base video"),
"image": TrackBand("image", "video", 50_000, "image and photo overlays"),
"subtitle": TrackBand("subtitle", "text", 90_000, "subtitles"),
"text": TrackBand("text", "text", 100_000, "plain text"),
}
@dataclass(frozen=True)
class AllocatedTrack:
kind: str
name: str
track_type: str
layout_order: int
class TrackAllocator:
"""Allocate deterministic suffix tracks when same-name segments overlap.
Intervals are half-open, so adjacent segments reuse a track while true
overlap creates ``name-1``, ``name-2``, and so on.
"""
def __init__(self):
self._occupied = {}
@staticmethod
def _overlaps(start_us, duration_us, existing):
end_us = int(start_us) + int(duration_us)
return any(int(start_us) < old_end and end_us > old_start for old_start, old_end in existing)
def allocate(self, kind, base_name, start_us, duration_us):
band = TRACK_LAYOUT_BANDS[kind]
suffix = 0
while True:
name = base_name if suffix == 0 else f"{base_name}-{suffix}"
key = (kind, name)
occupied = self._occupied.setdefault(key, [])
if not self._overlaps(start_us, duration_us, occupied):
occupied.append((int(start_us), int(start_us) + int(duration_us)))
return AllocatedTrack(kind, name, band.track_type, band.layout_order + suffix)
suffix += 1
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| 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: 196k | Updated | Claude CodeCodex | Verified | Install |