[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C20BJMZ93HS9ZW9ERCAYPN":3,"skill-same:01M7C20BJMZ93HS9ZW9ERCAYPN":43},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7C20BJMZ93HS9ZW9ERCAYPN","ffmpeg-audio-processing",null,"linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillrevise\u002Ftasks\u002Fmultilingual-video-dubbing\u002Frepaired_skill\u002Fffmpeg-audio-processing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# Multilingual Video Dubbing With Timing-Accurate Segment Placement (FFmpeg + TTS)\n\n## Purpose\nCreate a dubbed audio track from per-segment text (and timing), synthesize speech per segment using an environment-supported TTS backend, place segments onto a full-length timeline with millisecond-accurate starts, mux the new audio with the original video (prefer stream copy for video), and emit a verifier-aligned JSON report with timing and drift metrics.\n\n## When to Use\nUse this when the task requires end-to-end video dubbing: segment-level TTS generation, precise placement by start times, drift computation, and producing required artifacts (dubbed media plus a JSON report). Do not use for simple audio extraction\u002Fnormalization-only tasks.\n\n## Procedure\n- 1) Discover inputs, outputs, and capabilities (no assumptions)\n- Identify task-declared inputs: source video path, segments source (JSON\u002FCSV\u002FSRT\u002Fetc.), target languages\u002Fvoices, and required output paths (do not invent paths).\n- Confirm tools:\n- Check `ffmpeg` and `ffprobe` are available.\n- If using Python, confirm `python` exists and you can write to the working directory.\n- Inspect the source media (anchor):\n- Run `ffprobe` to list streams and capture: duration, video stream index\u002Fcodec, audio stream index, audio sample rate\u002Fchannels.\n- Probe required FFmpeg filters (anchor):\n- Attempt a no-output run using `loudnorm` and `ebur128` on a short decode; if a filter is missing, record it and plan a fallback (skip loudness targets or use simpler `volume` with measured peak).\n- Decision point: If required outputs paths are not provided or ambiguous, stop and request clarification rather than guessing.\n- 2) Parse and validate the segment specification\n- Load segment metadata (format-agnostic): for each segment require at least:\n- an identifier\n- target language (or voice)\n- text to speak\n- intended start time (seconds) and intended end time (seconds) OR start + duration\n- Validate:\n- times are numeric, finite, non-negative\n- end > start\n- segments do not exceed overall media duration unless explicitly allowed\n- Decision point: If there are overlapping segments, pick one policy explicitly:\n- allow overlap (mix)\n- or disallow and fail fast\n- or resolve by priority rules (must be task-specified)\n- 3) Choose a TTS backend with bounded fallbacks (avoid brittle installs)\n- Preferred order (stop at first that works):\n- Task-provided local TTS binaries or SDK already installed (discover by checking command availability).\n- Network TTS only if network access is confirmed and a short synthesis test succeeds.\n- Offline TTS CLI engine (if available) for a minimal viable output.\n- Strict constraint: Do not attempt system-wide package upgrades in locked environments.\n- If Python deps are needed, install to a user-writable location or a project-local venv; if that fails, switch to an installed CLI TTS.\n- Execution anchor (micro-test): Synthesize a 1-2 second test phrase and confirm a readable audio file was produced.\n- 4) Synthesize per-segment audio assets\n- For each segment:\n- Generate TTS audio to a temporary per-segment file.\n- Convert immediately to a processing invariant:\n- PCM WAV, mono, 48 kHz (or the task-required rate), consistent sample format.\n- Measure actual segment audio duration.\n- Decision point: Duration fit policy per segment (must be explicit):\n- If synthesized duration > segment window: either time-stretch within safe bounds (if supported), else trim with a short fade-out.\n- If synthesized duration \u003C segment window: pad trailing silence to match window.\n- If time-stretch is needed:\n- Prefer FFmpeg `rubberband` if present; otherwise use a constrained fallback (e.g., `atempo` within supported range), and cap adjustments to avoid extreme artifacts.\n- 5) Loudness\u002Flevel handling with verification-visible measurements\n- If `loudnorm` is available and loudness targets are specified:\n- Use a two-pass approach: first pass to measure, second pass to apply with measured values.\n- Otherwise:\n- Use `ebur128` or `volumedetect` to measure and apply a conservative gain change.\n- Keep this step per-segment (for consistency) or on the final mix (for global consistency), but do not do both unless required.\n- 6) Build a full-length dubbed timeline with precise placement\n- Create a silent bed with exactly the target duration and invariant format (48 kHz mono).\n- Place each segment at its intended start time with millisecond precision:\n- Use sample-accurate alignment by converting start_sec to samples (start_samples = round(start_sec * sample_rate)).\n- Apply delay and mix segments onto the bed; ensure mixing policy matches overlap policy.\n- Compute per-segment placement metadata:\n- placed_start_sec derived from the actual sample offset used\n- drift_sec = placed_start_sec - intended_start_sec\n- 7) Generate report.json and validate schema (anchor)\n- Write a JSON report that includes, at minimum:\n- a `segments` array\n- for each segment: id, intended_start_sec, intended_end_sec (or duration), placed_start_sec, drift_sec, and the chosen TTS backend\u002Fvoice identifiers when available\n- Schema gate (must pass before proceeding):\n- Reload report.json from disk.\n- Assert it is valid JSON.\n- Assert `segments` exists and is a list.\n- For each segment assert required numeric fields are numbers (not strings) and finite.\n- Assert drift thresholds if specified by the task (e.g., abs(drift_sec) \u003C= 0.2); if violated, re-run placement computation rather than silently accepting.\n- 8) Mux dubbed audio with original video and perform final grounding checks (anchor)\n- Mux policy:\n- Copy the original video stream without re-encoding whenever possible.\n- Map the dubbed audio as the primary audio track; preserve original audio only if required.\n- Final checks (must be against task-declared output paths):\n- Confirm output files exist at the exact required paths and are non-empty.\n- Run `ffprobe` on the dubbed media to confirm:\n- a video stream exists and matches the source codec when stream-copy is intended\n- an audio stream exists with expected sample rate\u002Fchannels\n- If any check fails, stop and fix the smallest failing step (do not continue producing new variants in new paths).\n\n## Constraints \u002F Pitfalls\n- Never assume network TTS works; always run a short synthesis test first, and fall back to an offline or preinstalled backend on 403\u002Fconnection failures.\n- Do not hard-code paths, stream indices, sample rates, or filter availability; discover them via `ffprobe` and filter probes, and fail fast if task-required outputs\u002Ffields are ambiguous.",{},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FSkillrevise\u002Ftasks\u002Fmultilingual-video-dubbing\u002Frepaired_skill\u002Fffmpeg-audio-processing",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill ffmpeg-audio-processing",{"tool":35,"command":36},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill ffmpeg-audio-processing",{"tool":38,"command":39},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill ffmpeg-audio-processing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillrevise\u002Ftasks\u002Fmultilingual-video-dubbing\u002Frepaired_skill\u002Fffmpeg-audio-processing\u002FSKILL.md",true,[],[44,51,58,65,70,75],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":66,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":71,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":76,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]