[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F7B1RWBHYB8GZSMFP4HG2R":3,"skill-same:01M7F7B1RWBHYB8GZSMFP4HG2R":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":45,"updatedAt":46,"install":47,"resources":60},"01M7F7B1RWBHYB8GZSMFP4HG2R","ai-media",null,"Use when a creative goal must become a finished media file: pick and order generative-media models per modality — AI voiceover, image-to-video clips, score — then glue them with ffmpeg (mux, duck, loudnorm, concat). NOT still-image generation\u002Fediting (that is `replicate-images`); NOT code-rendered React compositing (that is `remotion-video`).","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fai-media\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: ai-media\ndescription: \"Use when a creative goal must become a finished media file: pick and order generative-media models per modality — AI voiceover, image-to-video clips, score — then glue them with ffmpeg (mux, duck, loudnorm, concat). NOT still-image generation\u002Fediting (that is `replicate-images`); NOT code-rendered React compositing (that is `remotion-video`).\"\ntags: [ai-media, text-to-speech, image-to-video, voiceover, music-generation, ffmpeg, media-pipeline, elevenlabs]\nrecommends: [replicate-images, fal, replicate, remotion-video, video-shorts]\norigin: risco\n---\n\n# ai-media\n\nYou are the cross-modal director. You decide **which** generative-media model to call per modality, in **what order**, with **what params**, then **assemble** the pieces with ffmpeg into one finished file. You do not own a single provider's API surface and you do not prompt still images — you orchestrate and glue.\n\n## Pipeline shape — decide what the goal needs\n\nMap the goal to modalities and an ordered step list, and **lock that plan before you generate a single asset** — media generation is slow and metered, so a re-roll of a 10 s Veo clip or a 90 s music track costs real money and minutes. Fixing the scene list, aspect ratio, target loudness and model per modality *first* is cheaper than discovering at mux time that your clips are 9:16 and your VO is the wrong sample rate. The \"delegate to\" column is where the actual call mechanics live — you pick the model and params, those skills run the call.\n\n| Goal | Needs | Ordered steps | Delegate calls to |\n|------|-------|---------------|-------------------|\n| Narrated explainer | stills + img→video + VO + music | script → per-scene stills → clip per scene → VO → music → conform → concat → mix+duck → loudnorm → MP4 | `replicate-images`, `fal`\u002F`replicate` |\n| Product teaser (1 hero) | 1 still + img→video + music | still → clip → music → mix → loudnorm → MP4 | `replicate-images`, `fal`\u002F`replicate` |\n| Faceless short | stills + img→video + VO + music + captions | (explainer pipeline) + burn captions | `replicate-images`; `..\u002Fvideo-shorts\u002FSKILL.md` for the script |\n| Just a voiceover | VO only | script → TTS → loudnorm | — |\n| Just a clip from a still | img→video only | still (input) → clip | `fal`\u002F`replicate` |\n| Code-rendered explainer | none of the above | render from React\u002FTS | **stop — route to `remotion-video`** |\n\nIf the video is *rendered from data\u002Fcode* (charts, timelines, JSON-driven scenes), this is not your job → `..\u002Fremotion-video\u002FSKILL.md`. You handle *model-generated + ffmpeg-glued*.\n\n## Modality 1 — Voice (TTS)\n\nElevenLabs Python SDK. The call is `convert(text, voice_id, model_id, output_format)`; auth via `ELEVENLABS_API_KEY`.\n\n```python\nfrom elevenlabs.client import ElevenLabs\n\nclient = ElevenLabs()  # reads ELEVENLABS_API_KEY\naudio = client.text_to_speech.convert(\n    text=\"Your narration script here.\",\n    voice_id=\"JBFqnCBsd6RMkjVDRZzb\",\n    model_id=\"eleven_multilingual_v2\",     # final-quality VO\n    output_format=\"mp3_44100_128\",          # codec_samplerate_bitrate\n)\nwith open(\"vo.mp3\", \"wb\") as f:\n    for chunk in audio:\n        f.write(chunk)\n```\n\nPick the model tier by what the job needs:\n\n| Model | When | Latency | Cost lever |\n|-------|------|---------|-----------|\n| `eleven_v3` | most expressive, hero final VO — **verify availability first (see caveat)** | higher | most credits\u002Fchar |\n| `eleven_multilingual_v2` | high-quality multilingual VO (default for finals) | medium | medium |\n| `eleven_flash_v2_5` | real-time \u002F batch \u002F scale \u002F drafts | ~75 ms | cheapest |\n\n**Do not hardcode `eleven_v3` blind.** It shipped to the API in *alpha* (Aug 2025) and the docs model list now carries it, but the `text_to_speech.convert` API reference still documents the default as `eleven_multilingual_v2` and does not enumerate `eleven_v3` as a guaranteed value. Before you build a final pass on it, confirm it returns from `GET \u002Fv1\u002Fmodels` for your key (or just call once and check) — otherwise default to `eleven_multilingual_v2`, which is the safe, always-available hero tier.\n\n`output_format` is `codec_samplerate_bitrate` — e.g. `mp3_44100_128`, `mp3_22050_32`. **Match the VO sample rate to your assembly target**, do not master the VO loud and hope.\n\nBad → Good:\n- **Bad:** generate VO at `mp3_22050_32`, then mux onto a 48 kHz video — ffmpeg silently resamples, you get artifacts and a level mismatch.\n- **Good:** generate VO at the rate you will master at (e.g. `mp3_44100_128`), and set final loudness with `loudnorm` in assembly, not by cranking the TTS.\n\nTTS is billed per character\u002Ftoken (~0.5–1 credit\u002Fchar on the Flash\u002FTurbo lines). ElevenLabs cut *TTS* API pricing up to 55% on 2026-05-07 (e.g. Flash on Creator $0.11→$0.05 \u002F 1k tokens) — that figure is TTS-specific, not the Music cut. **Pricing staling fast: these are point-in-time numbers from elevenlabs.io\u002Fpricing\u002Fapi as of 2026-06-02 — re-check the page before quoting a budget.** Shorter scripts and Flash on drafts are the cost levers.\n\n## Modality 2 — Image-to-video\n\n**The still is an input, not your output.** Generate or edit the source image in `..\u002Freplicate-images\u002FSKILL.md`, then animate it here. Reality check: every serious 2026 model does 1080p or native 4K — **resolution is no longer the differentiating axis**. The hard limit is **per-generation duration (~5–15 s, model-dependent)**. Long pieces are **one clip per scene, then concat** — never one long take.\n\nDurations below are from each vendor's own pages (as of 2026-06; see `references\u002Fmodels-and-params.md` for the citations) — they move with releases, so verify on the catalog before a final run:\n\n| Model | Duration | Aspect \u002F max res | Control surface | Native audio | Open-source |\n|-------|----------|------------------|-----------------|--------------|-------------|\n| Google **Veo 3.1** | **8 s** \u002F generation | 16:9 \u002F 9:16, up to 4K | high | **yes** — synced 48 kHz dialogue\u002FSFX | no |\n| **Kling 3.0** | **up to 15 s** | flexible, 4K | strong identity\u002Ftemporal, lip-sync | no | no |\n| **Runway Gen-4.5** | **2–10 s** | flexible | **best** — motion brushes, camera control, reference image | no | no |\n| **MiniMax Hailuo 02** | **6 s or 10 s** (1080p caps at 6 s) | up to 1080p | medium | no | no |\n| **Wan 2.6** | **up to 15 s** | up to 1080p | first\u002Flast-frame control, A\u002FV sync | no (sync) | **yes** (Apache) |\n\nChoose by the binding constraint: need synced dialogue → Veo 3.1; need precise camera\u002Fmotion control → Runway Gen-4.5; need identity consistency across scenes or the longest single take → Kling 3.0 \u002F Wan 2.6; need open-source\u002Fself-host → Wan 2.6; cost-sensitive 1080p → Hailuo 02. Endpoint ids and per-call mechanics live in `..\u002Ffal\u002FSKILL.md` \u002F `..\u002Freplicate\u002FSKILL.md` (both rails carry these models). See `references\u002Fmodels-and-params.md` for endpoint ids and current limits.\n\n## Modality 3 — Music \u002F score\n\nCosts are per-minute and plan-dependent — treat them as approximate and **verify on the vendor pricing page** (figures as of 2026-06; sources in `references\u002Fmodels-and-params.md`):\n\n| Model | Cost (approx, verify) | Licensing story | Control |\n|-------|-----------------------|-----------------|---------|\n| **ElevenLabs Music v2** | per-minute, ~$0.15–0.50\u002Fmin depending on plan (Music API pricing cut up to 50% at v2 launch — separate from the 55% *TTS* cut) | **cleanest** — vendor states trained *only on licensed data, cleared for commercial use* (Believe collaboration named at launch) | genre-switch mid-track |\n| **Suno v5** | plan-based | usage rights on paid plans post Nov-2025 label settlements (rights, not ownership) | vendor blind-test benchmark ELO ~1293 |\n| **Udio** | $30\u002Fmo Pro plan (commercial rights); **no official public API** — third-party gateways only | UMG-licensed platform announced for 2026 | — |\n\n**Confirm commercial rights before you ship.** Licensing differs per model and per plan; \"I generated it\" is not \"I may sell the ad with it.\" For a clean commercial story with an official API, ElevenLabs Music v2 is the safe default — Udio has no first-party API, so do not plan a programmatic pipeline around it. The rest is the same fal\u002Freplicate call mechanics.\n\n## Assembly with ffmpeg\n\nFour operations. Each is a copy-paste recipe; full filter graphs, caption burning and pitfalls are in `references\u002Fffmpeg-assembly.md`.\n\n**(a) Mux VO onto video** — map both streams, copy video, take the shorter duration:\n\n```bash\nffmpeg -i scene.mp4 -i vo.mp3 \\\n  -map 0:v -map 1:a -c:v copy -shortest out.mp4\n```\n\n**(b) Duck music under the VO** — `sidechaincompress` keys the music off the voice so it drops when narration plays (pro DAW ducking, no manual keyframes):\n\n```bash\nffmpeg -i vo.mp3 -i music.mp3 -filter_complex \\\n  \"[1:a][0:a]sidechaincompress=threshold=0.03:ratio=8:attack=20:release=300[duck]; \\\n   [0:a][duck]amix=inputs=2:duration=longest[aout]\" \\\n  -map \"[aout]\" -c:a aac mix.m4a\n```\n\nCheaper static fallback when sidechain is overkill — fix the music low under a full VO:\n\n```bash\nffmpeg -i vo.mp3 -i music.mp3 -filter_complex \\\n  \"[1:a]volume=0.3[m];[0:a][m]amix=inputs=2:duration=longest[aout]\" \\\n  -map \"[aout]\" mix.m4a\n```\n\n**(c) Loudnorm to a target LUFS (two-pass)** — measure, then apply. Target -14 LUFS for social\u002Fstreaming, -16 for podcast-style VO. Normalize per track *before* mixing.\n\n```bash\n# pass 1: measure (read the JSON it prints)\nffmpeg -i mix.m4a -af loudnorm=I=-14:TP=-1.5:LRA=11:print_format=json -f null -\n# pass 2: apply with the measured values\nffmpeg -i mix.m4a -af \\\n  loudnorm=I=-14:TP=-1.5:LRA=11:measured_I=-20.1:measured_TP=-4.2:measured_LRA=6.0:measured_thresh=-30.8:offset=0.5:linear=true \\\n  master.m4a\n```\n\n**(d) Concat scenes — conform first.** Same-codec\u002Fres\u002Ffps clips → fast demuxer with `-c copy`. Mismatched clips → re-encode and scale first, then concat. **Never `-c copy`-concat mismatched clips** — you get desync or a corrupt stream.\n\n```bash\n# all clips identical codec\u002Fres\u002Ffps:\nprintf \"file '%s'\\n\" scene1.mp4 scene2.mp4 scene3.mp4 > list.txt\nffmpeg -f concat -safe 0 -i list.txt -c copy joined.mp4\n\n# mismatched: conform each, then concat filter\nffmpeg -i s1.mp4 -i s2.mp4 -filter_complex \\\n  \"[0:v]scale=1920:1080,fps=30,setsar=1[v0];[1:v]scale=1920:1080,fps=30,setsar=1[v1]; \\\n   [v0][1:a?][v1][1:a?]concat=n=2:v=1:a=0[v]\" -map \"[v]\" joined.mp4\n```\n\n## End-to-end worked pipeline (narrated explainer)\n\nOrdered command list — generate once, assemble deterministically:\n\n1. **Lock the plan** — scene list, aspect (e.g. 16:9 1080p 30fps), target -14 LUFS, models chosen.\n2. **Stills per scene** → `..\u002Freplicate-images\u002FSKILL.md` (one prompt per scene).\n3. **Clip per scene** (img→video, ~5–15 s each, model cap) via your chosen model on `fal`\u002F`replicate`.\n4. **VO** → ElevenLabs `convert(...)` at the master sample rate.\n5. **Music** → ElevenLabs Music v2, length = total runtime, confirm rights.\n6. **Conform** every clip to 1920x1080\u002F30fps\u002FSAR 1.\n7. **Concat** the conformed clips → `body.mp4`.\n8. **Loudnorm** VO and music tracks (two-pass) to consistent levels.\n9. **Mix + duck** music under VO → `mix.m4a`.\n10. **Final loudnorm** the mix to -14 LUFS → `master.m4a`.\n11. **Mux** `master.m4a` onto `body.mp4` with `-shortest` → `final.mp4`.\n\nEmit this as a runnable script. `scripts\u002Fverify.sh` lints it (loudnorm present, conform-before-concat, final MP4 target).\n\n## Cost & regen discipline\n\n- **Draft small, then final.** Generate clips short\u002Flow-res and VO on Flash to lock timing and the cut; only the final pass spends on hero quality. Re-rolling locked scenes is the biggest waste.\n- **Per-modality levers:** shorter scripts (TTS per-char), fewer scene re-rolls (img→video), fewer music minutes (music is billed per minute — verify the current rate on the vendor pricing page).\n- Spend tracking *as a discipline* → `..\u002Ffal\u002FSKILL.md` \u002F `..\u002Freplicate\u002FSKILL.md` for per-call cost; treat budget as a constraint you set before generating.\n\n## Anti-patterns\n\n| Anti-pattern | Why it bites | Do instead |\n|--------------|--------------|------------|\n| Generating assets before locking the pipeline | aspect\u002Fsample-rate\u002Fduration mismatches surface at mux time, forcing paid re-rolls | lock scene list, aspect, LUFS, models first |\n| One long video-gen call for the whole piece | models cap at ~5–15 s; you fight the limit and waste rolls | one clip per scene, then concat |\n| Mixing tracks without per-track `loudnorm` | VO buried or blasting over music; inconsistent levels | two-pass loudnorm each track before mix |\n| `-c copy`-concat of mismatched clips | desync, corrupt stream, wrong frame timing | conform res\u002Ffps\u002FSAR, then concat |\n| Music low set by ear \u002F static only when VO needs space | narration gets masked under the bed | `sidechaincompress` keyed off the VO |\n| Shipping generated music without checking rights | \"generated\" ≠ \"licensed to sell\" — legal exposure | confirm commercial rights per model\u002Fplan |\n| Prompting\u002Fediting the still inside this skill | duplicates `replicate-images`' job, worse prompts | delegate the still, consume it here |\n| Mastering loudness by cranking the TTS | clipping, no true-peak control | set level with `loudnorm`, not the generator |\n","# ai-media\n\nYou are the cross-modal director. You decide **which** generative-media model to call per modality, in **what order**, with **what params**, then **assemble** the pieces with ffmpeg into one finished file. You do not own a single provider's API surface and you do not prompt still images — you orchestrate and glue.\n\n## Pipeline shape — decide what the goal needs\n\nMap the goal to modalities and an ordered step list, and **lock that plan before you generate a single asset** — media generation is slow and metered, so a re-roll of a 10 s Veo clip or a 90 s music track costs real money and minutes. Fixing the scene list, aspect ratio, target loudness and model per modality *first* is cheaper than discovering at mux time that your clips are 9:16 and your VO is the wrong sample rate. The \"delegate to\" column is where the actual call mechanics live — you pick the model and params, those skills run the call.\n\n| Goal | Needs | Ordered steps | Delegate calls to |\n|------|-------|---------------|-------------------|\n| Narrated explainer | stills + img→video + VO + music | script → per-scene stills → clip per scene → VO → music → conform → concat → mix+duck → loudnorm → MP4 | `replicate-images`, `fal`\u002F`replicate` |\n| Product teaser (1 hero) | 1 still + img→video + music | still → clip → music → mix → loudnorm → MP4 | `replicate-images`, `fal`\u002F`replicate` |\n| Faceless short | stills + img→video + VO + music + captions | (explainer pipeline) + burn captions | `replicate-images`; `..\u002Fvideo-shorts\u002FSKILL.md` for the script |\n| Just a voiceover | VO only | script → TTS → loudnorm | — |\n| Just a clip from a still | img→video only | still (input) → clip | `fal`\u002F`replicate` |\n| Code-rendered explainer | none of the above | render from React\u002FTS | **stop — route to `remotion-video`** |\n\nIf the video is *rendered from data\u002Fcode* (charts, timelines, JSON-driven scenes), this is not your job → `..\u002Fremotion-video\u002FSKILL.md`. You handle *model-generated + ffmpeg-glued*.\n\n## Modality 1 — Voice (TTS)\n\nElevenLabs Python SDK. The call is `convert(text, voice_id, model_id, output_format)`; auth via `ELEVENLABS_API_KEY`.\n\n```python\nfrom elevenlabs.client import ElevenLabs\n\nclient = ElevenLabs()  # reads ELEVENLABS_API_KEY\naudio = client.text_to_speech.convert(\n    text=\"Your narration script here.\",\n    voice_id=\"JBFqnCBsd6RMkjVDRZzb\",\n    model_id=\"eleven_multilingual_v2\",     # final-quality VO\n    output_format=\"mp3_44100_128\",          # codec_samplerate_bitrate\n)\nwith open(\"vo.mp3\", \"wb\") as f:\n    for chunk in audio:\n        f.write(chunk)\n```\n\nPick the model tier by what the job needs:\n\n| Model | When | Latency | Cost lever |\n|-------|------|---------|-----------|\n| `eleven_v3` | most expressive, hero final VO — **verify availability first (see caveat)** | higher | most credits\u002Fchar |\n| `eleven_multilingual_v2` | high-quality multilingual VO (default for finals) | medium | medium |\n| `eleven_flash_v2_5` | real-time \u002F batch \u002F scale \u002F drafts | ~75 ms | cheapest |\n\n**Do not hardcode `eleven_v3` blind.** It shipped to the API in *alpha* (Aug 2025) and the docs model list now carries it, but the `text_to_speech.convert` API reference still documents the default as `eleven_multilingual_v2` and does not enumerate `eleven_v3` as a guaranteed value. Before you build a final pass on it, confirm it returns from `GET \u002Fv1\u002Fmodels` for your key (or just call once and check) — otherwise default to `eleven_multilingual_v2`, which is the safe, always-available hero tier.\n\n`output_format` is `codec_samplerate_bitrate` — e.g. `mp3_44100_128`, `mp3_22050_32`. **Match the VO sample rate to your assembly target**, do not master the VO loud and hope.\n\nBad → Good:\n- **Bad:** generate VO at `mp3_22050_32`, then mux onto a 48 kHz video — ffmpeg silently resamples, you get artifacts and a level mismatch.\n- **Good:** generate VO at the rate you will master at (e.g. `mp3_44100_128`), and set final loudness with `loudnorm` in assembly, not by cranking the TTS.\n\nTTS is billed per character\u002Ftoken (~0.5–1 credit\u002Fchar on the Flash\u002FTurbo lines). ElevenLabs cut *TTS* API pricing up to 55% on 2026-05-07 (e.g. Flash on Creator $0.11→$0.05 \u002F 1k tokens) — that figure is TTS-specific, not the Music cut. **Pricing staling fast: these are point-in-time numbers from elevenlabs.io\u002Fpricing\u002Fapi as of 2026-06-02 — re-check the page before quoting a budget.** Shorter scripts and Flash on drafts are the cost levers.\n\n## Modality 2 — Image-to-video\n\n**The still is an input, not your output.** Generate or edit the source image in `..\u002Freplicate-images\u002FSKILL.md`, then animate it here. Reality check: every serious 2026 model does 1080p or native 4K — **resolution is no longer the differentiating axis**. The hard limit is **per-generation duration (~5–15 s, model-dependent)**. Long pieces are **one clip per scene, then concat** — never one long take.\n\nDurations below are from each vendor's own pages (as of 2026-06; see `references\u002Fmodels-and-params.md` for the citations) — they move with releases, so verify on the catalog before a final run:\n\n| Model | Duration | Aspect \u002F max res | Control surface | Native audio | Open-source |\n|-------|----------|------------------|-----------------|--------------|-------------|\n| Google **Veo 3.1** | **8 s** \u002F generation | 16:9 \u002F 9:16, up to 4K | high | **yes** — synced 48 kHz dialogue\u002FSFX | no |\n| **Kling 3.0** | **up to 15 s** | flexible, 4K | strong identity\u002Ftemporal, lip-sync | no | no |\n| **Runway Gen-4.5** | **2–10 s** | flexible | **best** — motion brushes, camera control, reference image | no | no |\n| **MiniMax Hailuo 02** | **6 s or 10 s** (1080p caps at 6 s) | up to 1080p | medium | no | no |\n| **Wan 2.6** | **up to 15 s** | up to 1080p | first\u002Flast-frame control, A\u002FV sync | no (sync) | **yes** (Apache) |\n\nChoose by the binding constraint: need synced dialogue → Veo 3.1; need precise camera\u002Fmotion control → Runway Gen-4.5; need identity consistency across scenes or the longest single take → Kling 3.0 \u002F Wan 2.6; need open-source\u002Fself-host → Wan 2.6; cost-sensitive 1080p → Hailuo 02. Endpoint ids and per-call mechanics live in `..\u002Ffal\u002FSKILL.md` \u002F `..\u002Freplicate\u002FSKILL.md` (both rails carry these models). See `references\u002Fmodels-and-params.md` for endpoint ids and current limits.\n\n## Modality 3 — Music \u002F score\n\nCosts are per-minute and plan-dependent — treat them as approximate and **verify on the vendor pricing page** (figures as of 2026-06; sources in `references\u002Fmodels-and-params.md`):\n\n| Model | Cost (approx, verify) | Licensing story | Control |\n|-------|-----------------------|-----------------|---------|\n| **ElevenLabs Music v2** | per-minute, ~$0.15–0.50\u002Fmin depending on plan (Music API pricing cut up to 50% at v2 launch — separate from the 55% *TTS* cut) | **cleanest** — vendor states trained *only on licensed data, cleared for commercial use* (Believe collaboration named at launch) | genre-switch mid-track |\n| **Suno v5** | plan-based | usage rights on paid plans post Nov-2025 label settlements (rights, not ownership) | vendor blind-test benchmark ELO ~1293 |\n| **Udio** | $30\u002Fmo Pro plan (commercial rights); **no official public API** — third-party gateways only | UMG-licensed platform announced for 2026 | — |\n\n**Confirm commercial rights before you ship.** Licensing differs per model and per plan; \"I generated it\" is not \"I may sell the ad with it.\" For a clean commercial story with an official API, ElevenLabs Music v2 is the safe default — Udio has no first-party API, so do not plan a programmatic pipeline around it. The rest is the same fal\u002Freplicate call mechanics.\n\n## Assembly with ffmpeg\n\nFour operations. Each is a copy-paste recipe; full filter graphs, caption burning and pitfalls are in `references\u002Fffmpeg-assembly.md`.\n\n**(a) Mux VO onto video** — map both streams, copy video, take the shorter duration:\n\n```bash\nffmpeg -i scene.mp4 -i vo.mp3 \\\n  -map 0:v -map 1:a -c:v copy -shortest out.mp4\n```\n\n**(b) Duck music under the VO** — `sidechaincompress` keys the music off the voice so it drops when narration plays (pro DAW ducking, no manual keyframes):\n\n```bash\nffmpeg -i vo.mp3 -i music.mp3 -filter_complex \\\n  \"[1:a][0:a]sidechaincompress=threshold=0.03:ratio=8:attack=20:release=300[duck]; \\\n   [0:a][duck]amix=inputs=2:duration=longest[aout]\" \\\n  -map \"[aout]\" -c:a aac mix.m4a\n```\n\nCheaper static fallback when sidechain is overkill — fix the music low under a full VO:\n\n```bash\nffmpeg -i vo.mp3 -i music.mp3 -filter_complex \\\n  \"[1:a]volume=0.3[m];[0:a][m]amix=inputs=2:duration=longest[aout]\" \\\n  -map \"[aout]\" mix.m4a\n```\n\n**(c) Loudnorm to a target LUFS (two-pass)** — measure, then apply. Target -14 LUFS for social\u002Fstreaming, -16 for podcast-style VO. Normalize per track *before* mixing.\n\n```bash\n# pass 1: measure (read the JSON it prints)\nffmpeg -i mix.m4a -af loudnorm=I=-14:TP=-1.5:LRA=11:print_format=json -f null -\n# pass 2: apply with the measured values\nffmpeg -i mix.m4a -af \\\n  loudnorm=I=-14:TP=-1.5:LRA=11:measured_I=-20.1:measured_TP=-4.2:measured_LRA=6.0:measured_thresh=-30.8:offset=0.5:linear=true \\\n  master.m4a\n```\n\n**(d) Concat scenes — conform first.** Same-codec\u002Fres\u002Ffps clips → fast demuxer with `-c copy`. Mismatched clips → re-encode and scale first, then concat. **Never `-c copy`-concat mismatched clips** — you get desync or a corrupt stream.\n\n```bash\n# all clips identical codec\u002Fres\u002Ffps:\nprintf \"file '%s'\\n\" scene1.mp4 scene2.mp4 scene3.mp4 > list.txt\nffmpeg -f concat -safe 0 -i list.txt -c copy joined.mp4\n\n# mismatched: conform each, then concat filter\nffmpeg -i s1.mp4 -i s2.mp4 -filter_complex \\\n  \"[0:v]scale=1920:1080,fps=30,setsar=1[v0];[1:v]scale=1920:1080,fps=30,setsar=1[v1]; \\\n   [v0][1:a?][v1][1:a?]concat=n=2:v=1:a=0[v]\" -map \"[v]\" joined.mp4\n```\n\n## End-to-end worked pipeline (narrated explainer)\n\nOrdered command list — generate once, assemble deterministically:\n\n1. **Lock the plan** — scene list, aspect (e.g. 16:9 1080p 30fps), target -14 LUFS, models chosen.\n2. **Stills per scene** → `..\u002Freplicate-images\u002FSKILL.md` (one prompt per scene).\n3. **Clip per scene** (img→video, ~5–15 s each, model cap) via your chosen model on `fal`\u002F`replicate`.\n4. **VO** → ElevenLabs `convert(...)` at the master sample rate.\n5. **Music** → ElevenLabs Music v2, length = total runtime, confirm rights.\n6. **Conform** every clip to 1920x1080\u002F30fps\u002FSAR 1.\n7. **Concat** the conformed clips → `body.mp4`.\n8. **Loudnorm** VO and music tracks (two-pass) to consistent levels.\n9. **Mix + duck** music under VO → `mix.m4a`.\n10. **Final loudnorm** the mix to -14 LUFS → `master.m4a`.\n11. **Mux** `master.m4a` onto `body.mp4` with `-shortest` → `final.mp4`.\n\nEmit this as a runnable script. `scripts\u002Fverify.sh` lints it (loudnorm present, conform-before-concat, final MP4 target).\n\n## Cost & regen discipline\n\n- **Draft small, then final.** Generate clips short\u002Flow-res and VO on Flash to lock timing and the cut; only the final pass spends on hero quality. Re-rolling locked scenes is the biggest waste.\n- **Per-modality levers:** shorter scripts (TTS per-char), fewer scene re-rolls (img→video), fewer music minutes (music is billed per minute — verify the current rate on the vendor pricing page).\n- Spend tracking *as a discipline* → `..\u002Ffal\u002FSKILL.md` \u002F `..\u002Freplicate\u002FSKILL.md` for per-call cost; treat budget as a constraint you set before generating.\n\n## Anti-patterns\n\n| Anti-pattern | Why it bites | Do instead |\n|--------------|--------------|------------|\n| Generating assets before locking the pipeline | aspect\u002Fsample-rate\u002Fduration mismatches surface at mux time, forcing paid re-rolls | lock scene list, aspect, LUFS, models first |\n| One long video-gen call for the whole piece | models cap at ~5–15 s; you fight the limit and waste rolls | one clip per scene, then concat |\n| Mixing tracks without per-track `loudnorm` | VO buried or blasting over music; inconsistent levels | two-pass loudnorm each track before mix |\n| `-c copy`-concat of mismatched clips | desync, corrupt stream, wrong frame timing | conform res\u002Ffps\u002FSAR, then concat |\n| Music low set by ear \u002F static only when VO needs space | narration gets masked under the bed | `sidechaincompress` keyed off the VO |\n| Shipping generated music without checking rights | \"generated\" ≠ \"licensed to sell\" — legal exposure | confirm commercial rights per model\u002Fplan |\n| Prompting\u002Fediting the still inside this skill | duplicates `replicate-images`' job, worse prompts | delegate the still, consume it here |\n| Mastering loudness by cranking the TTS | clipping, no true-peak control | set level with `loudnorm`, not the generator |\n",{"name":5,"tags":24,"origin":32,"recommends":33,"description":7},[5,25,26,27,28,29,30,31],"text-to-speech","image-to-video","voiceover","music-generation","ffmpeg","media-pipeline","elevenlabs","risco",[34,35,36,37,38],"replicate-images","fal","replicate","remotion-video","video-shorts","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","06-前端与设计\u002Fai-media",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill ai-media",{"tool":53,"command":54},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill ai-media",{"tool":56,"command":57},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill ai-media","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fai-media\u002FSKILL.md",true,[61,67,71,75],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"evals\u002Fcases.yaml","REFERENCE","参考文档",3457,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fai-media\u002Fevals\u002Fcases.yaml",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"evals\u002FREADME.md",781,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fai-media\u002Fevals\u002FREADME.md",{"path":72,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fffmpeg-assembly.md",5123,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fai-media\u002Freferences\u002Fffmpeg-assembly.md",{"path":76,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fmodels-and-params.md",7411,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fai-media\u002Freferences\u002Fmodels-and-params.md",[80,87,92,99,106,113],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":88,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]