@oh-story/dsh 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -14
- package/lib/client.js +237 -84
- package/lib/client.js.map +3 -3
- package/lib/drama/manifest.json +183 -77
- package/lib/drama/skills/short-drama/SKILL.md +5 -1
- package/lib/drama/skills/short-drama/scripts/creator_markdown_check.py +140 -9
- package/lib/drama/skills/short-drama/scripts/project_tool.py +11 -0
- package/lib/drama/skills/short-drama-assets/references/character-and-look.md +28 -0
- package/lib/drama/skills/short-drama-assets/references/continuity-lock.md +8 -2
- package/lib/drama/skills/short-drama-assets/references/voice-direction.md +28 -0
- package/lib/drama/skills/short-drama-edit/SKILL.md +146 -0
- package/lib/drama/skills/short-drama-edit/agents/openai.yaml +4 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/README.md +60 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/package.json +15 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/remotion.config.ts +6 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/Root.tsx +26 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/Subtitles.tsx +88 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/font.ts +46 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/index.ts +4 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/schema.ts +32 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/tsconfig.json +13 -0
- package/lib/drama/skills/short-drama-edit/assets//345/211/252/350/276/221/345/215/225.md +43 -0
- package/lib/drama/skills/short-drama-edit/references/cut-craft.md +38 -0
- package/lib/drama/skills/short-drama-edit/references/delivery-verify.md +29 -0
- package/lib/drama/skills/short-drama-edit/references/generated-footage.md +54 -0
- package/lib/drama/skills/short-drama-edit/references/sound-and-subtitles.md +60 -0
- package/lib/drama/skills/short-drama-edit/references/stage-contract.md +51 -0
- package/lib/drama/skills/short-drama-edit/scripts/edit_tool.py +1156 -0
- package/lib/drama/skills/short-drama-edit/scripts/selftest.py +520 -0
- package/lib/drama/skills/short-drama-image-prompts/SKILL.md +2 -0
- package/lib/drama/skills/short-drama-image-prompts/assets/image-prompts.md +5 -0
- package/lib/drama/skills/short-drama-image-prompts/assets/lookdev-prompts.md +3 -0
- package/lib/drama/skills/short-drama-image-prompts/references/common-recipe.md +11 -0
- package/lib/drama/skills/short-drama-novel-analyze/references/aggregation-and-entities.md +2 -2
- package/lib/drama/skills/short-drama-novel-analyze/references/chapter-extraction.md +4 -1
- package/lib/drama/skills/short-drama-produce/SKILL.md +29 -4
- package/lib/drama/skills/short-drama-produce/references/adapter-contract.md +22 -0
- package/lib/drama/skills/short-drama-produce/references/providers/minimax-h3-video.md +13 -12
- package/lib/drama/skills/short-drama-produce/references/providers/minimax-speech.md +41 -0
- package/lib/drama/skills/short-drama-produce/references/providers/seedance.md +7 -0
- package/lib/drama/skills/short-drama-produce/scripts/fixture_adapter.py +18 -1
- package/lib/drama/skills/short-drama-produce/scripts/production_tool.py +181 -2
- package/lib/drama/skills/short-drama-produce/scripts/provider_adapters.py +199 -3
- package/lib/drama/skills/short-drama-review/SKILL.md +2 -0
- package/lib/drama/skills/short-drama-review/references/production-quality-gates.md +7 -0
- package/lib/drama/skills/short-drama-review/references/rubric-visual-motion.md +10 -0
- package/lib/drama/skills/short-drama-storyboard/SKILL.md +12 -1
- package/lib/drama/skills/short-drama-storyboard/assets/keyframe-prompts.md +4 -0
- package/lib/drama/skills/short-drama-storyboard/references/lighting-craft.md +39 -0
- package/lib/drama/skills/short-drama-storyboard/references/shot-craft.md +78 -2
- package/lib/drama/skills/short-drama-storyboard/references/stage-contract.md +2 -0
- package/lib/drama/skills/short-drama-video-prompts/SKILL.md +12 -5
- package/lib/drama/skills/short-drama-video-prompts/references/camera-audio-continuity.md +17 -0
- package/lib/drama/skills/short-drama-video-prompts/references/minimax-h3.md +76 -7
- package/lib/drama/skills/short-drama-video-prompts/references/motion-recipe.md +5 -2
- package/lib/drama/skills/short-drama-video-prompts/references/performance-action-timing.md +21 -0
- package/lib/drama/skills/short-drama-video-prompts/references/production-prompt-grammar.md +6 -17
- package/lib/drama/skills/short-drama-video-prompts/references/seedance-2.0.md +12 -3
- package/lib/drama/skills/short-drama-video-prompts/references/seedance-2.5.md +61 -5
- package/lib/drama/skills/short-drama-video-prompts/references/stage-contract.md +3 -3
- package/lib/drama/skills/short-drama-write/SKILL.md +11 -2
- package/lib/drama/skills/short-drama-write/references/screenplay-format.md +6 -0
- package/lib/drama/skills/short-drama-write/references/stage-contract.md +1 -0
- package/lib/index.js +290 -90
- package/lib/index.js.map +4 -4
- package/lib/novel-to-game/README.md +299 -59
- package/lib/novel-to-game/README_ZH.md +299 -56
- package/lib/novel-to-game/VERSION +1 -1
- package/lib/novel-to-game/examples/jin-ping-mei/build/BUILD_BRIEF.md +3 -1
- package/lib/novel-to-game/examples/jin-ping-mei/build/app/RUN.md +11 -3
- package/lib/novel-to-game/examples/jin-ping-mei/build/app/css/new-guofeng.css +397 -8
- package/lib/novel-to-game/examples/jin-ping-mei/build/app/css/style.css +0 -31
- package/lib/novel-to-game/examples/jin-ping-mei/build/app/js/data.js +71 -73
- package/lib/novel-to-game/examples/jin-ping-mei/build/app/js/engine.js +78 -89
- package/lib/novel-to-game/examples/jin-ping-mei/build/app/js/main.js +37 -14
- package/lib/novel-to-game/examples/jin-ping-mei/build/app/js/text.js +5 -5
- package/lib/novel-to-game/examples/jin-ping-mei/build/app/package.json +2 -1
- package/lib/novel-to-game/examples/jin-ping-mei/qa/README.md +11 -16
- package/lib/novel-to-game/examples/jin-ping-mei/qa/verification.json +11 -11
- package/lib/novel-to-game/examples/jin-ping-mei/qa/verify_playable_model.mjs +23 -0
- package/lib/novel-to-game/manifest.json +77 -87
- package/lib/novel-to-game/skills/game-art-direction/SKILL.md +9 -35
- package/lib/novel-to-game/skills/game-art-direction/references/art-direction-method.md +27 -106
- package/lib/novel-to-game/skills/game-build/SKILL.md +17 -35
- package/lib/novel-to-game/skills/game-build/references/blender-asset-workflow.md +24 -0
- package/lib/novel-to-game/skills/game-build/references/build-brief-contract.md +45 -82
- package/lib/novel-to-game/skills/game-build/references/generative-media-pipeline.md +14 -45
- package/lib/novel-to-game/skills/game-build/references/playable-model-contract.md +30 -65
- package/lib/novel-to-game/skills/game-build/references/tts-production-contract.md +13 -27
- package/lib/novel-to-game/skills/game-concept/SKILL.md +16 -34
- package/lib/novel-to-game/skills/game-concept/references/concept-method.md +28 -75
- package/lib/novel-to-game/skills/game-qa/SKILL.md +9 -20
- package/lib/novel-to-game/skills/game-qa/references/test-design-method.md +10 -6
- package/lib/novel-to-game/skills/game-world-design/SKILL.md +19 -32
- package/lib/novel-to-game/skills/game-world-design/references/narrative-design-method.md +23 -72
- package/lib/novel-to-game/skills/game-world-design/references/numeric-design-method.md +14 -48
- package/lib/novel-to-game/skills/game-world-design/references/world-design-method.md +36 -103
- package/lib/novel-to-game/skills/novel-game-analyze/SKILL.md +9 -18
- package/lib/novel-to-game/skills/novel-game-analyze/references/gameability-protocol.md +4 -4
- package/lib/novel-to-game/skills/novel-to-game/SKILL.md +10 -27
- package/lib/novel-to-game/skills/novel-to-game/references/intake-method.md +5 -6
- package/lib/novel-to-game/skills/novel-to-game/references/pipeline-contract.md +6 -11
- package/lib/oh-story/manifest.json +419 -254
- package/lib/oh-story/roles/chapter-extractor.md +177 -237
- package/lib/oh-story/roles/character-designer.md +1 -1
- package/lib/oh-story/roles/consistency-checker.md +4 -4
- package/lib/oh-story/roles/narrative-writer.md +56 -243
- package/lib/oh-story/roles/story-architect.md +6 -6
- package/lib/oh-story/roles/story-explorer.md +11 -11
- package/lib/oh-story/skills/story/SKILL.md +13 -7
- package/lib/oh-story/skills/story/VERSION +1 -1
- package/lib/oh-story/skills/story/references/author-memory.md +61 -29
- package/lib/oh-story/skills/story/scripts/author_memory_commit.py +934 -170
- package/lib/oh-story/skills/story-cover/SKILL.md +10 -1
- package/lib/oh-story/skills/story-deslop/SKILL.md +54 -229
- package/lib/oh-story/skills/story-deslop/references/anti-ai-writing.md +29 -56
- package/lib/oh-story/skills/story-deslop/references/author-memory.md +61 -29
- package/lib/oh-story/skills/story-deslop/references/banned-words.md +3 -1
- package/lib/oh-story/skills/story-deslop/references/deslop-gates.md +154 -0
- package/lib/oh-story/skills/story-deslop/references/style-resolution.md +27 -0
- package/lib/oh-story/skills/story-deslop/scripts/author_memory_commit.py +934 -170
- package/lib/oh-story/skills/story-deslop/scripts/check-ai-patterns.js +6 -1
- package/lib/oh-story/skills/story-deslop/scripts/check-degeneration.js +39 -20
- package/lib/oh-story/skills/story-deslop/scripts/normalize-punctuation.js +10 -5
- package/lib/oh-story/skills/story-deslop/scripts/style-whitelist.js +39 -0
- package/lib/oh-story/skills/story-import/SKILL.md +78 -82
- package/lib/oh-story/skills/story-import/references/character-state-reverse.md +1 -1
- package/lib/oh-story/skills/story-import/references/format-and-structure.md +2 -2
- package/lib/oh-story/skills/story-import/references/state-tracking.md +4 -69
- package/lib/oh-story/skills/story-import/references/structure-mapping-long.md +10 -8
- package/lib/oh-story/skills/story-import/references/tracking-initialization.md +31 -0
- package/lib/oh-story/skills/story-import/references/tracking-transaction.md +9 -34
- package/lib/oh-story/skills/story-import/scripts/check-outline-contract.js +197 -15
- package/lib/oh-story/skills/story-import/scripts/tracking_commit.py +210 -2
- package/lib/oh-story/skills/story-import/scripts/wordcount_core.py +3 -0
- package/lib/oh-story/skills/story-long-analyze/SKILL.md +91 -258
- package/lib/oh-story/skills/story-long-analyze/references/author-facing.md +245 -0
- package/lib/oh-story/skills/story-long-analyze/references/deconstruction-notes.md +2 -2
- package/lib/oh-story/skills/story-long-analyze/references/inspiration-library.md +105 -0
- package/lib/oh-story/skills/story-long-analyze/references/material-decomposition.md +113 -105
- package/lib/oh-story/skills/story-long-analyze/references/output-templates.md +169 -125
- package/lib/oh-story/skills/story-long-analyze/references/pipeline-ops.md +172 -64
- package/lib/oh-story/skills/story-long-analyze/references/semantic-acceptance-fixtures.md +84 -0
- package/lib/oh-story/skills/story-long-analyze/references/style-profile-generator.md +42 -132
- package/lib/oh-story/skills/story-long-analyze/references/style-profile-protocol.md +5 -5
- package/lib/oh-story/skills/story-long-analyze/scripts/build_chapter_index.py +466 -0
- package/lib/oh-story/skills/story-long-analyze/scripts/inspect_existing_assets.py +702 -0
- package/lib/oh-story/skills/story-long-analyze/scripts/inspiration_index.py +864 -0
- package/lib/oh-story/skills/story-long-analyze/scripts/manage_analysis_run.py +1106 -0
- package/lib/oh-story/skills/story-long-analyze/scripts/render_relation_chart.py +425 -0
- package/lib/oh-story/skills/story-long-scan/SKILL.md +4 -1
- package/lib/oh-story/skills/story-long-write/SKILL.md +52 -216
- package/lib/oh-story/skills/story-long-write/references/anti-ai-writing.md +29 -56
- package/lib/oh-story/skills/story-long-write/references/artifact-protocols.md +72 -12
- package/lib/oh-story/skills/story-long-write/references/author-memory.md +61 -29
- package/lib/oh-story/skills/story-long-write/references/banned-words.md +3 -1
- package/lib/oh-story/skills/story-long-write/references/benchmark-recall.md +20 -0
- package/lib/oh-story/skills/story-long-write/references/cross-book-recall.md +26 -0
- package/lib/oh-story/skills/story-long-write/references/dialogue-mastery.md +10 -4
- package/lib/oh-story/skills/story-long-write/references/emotional-methods.md +2 -2
- package/lib/oh-story/skills/story-long-write/references/long-chapter-quality.md +6 -15
- package/lib/oh-story/skills/story-long-write/references/long-format.md +2 -0
- package/lib/oh-story/skills/story-long-write/references/outline-structure-theory.md +2 -0
- package/lib/oh-story/skills/story-long-write/references/project-files.md +110 -0
- package/lib/oh-story/skills/story-long-write/references/reader-contract-and-progression.md +12 -4
- package/lib/oh-story/skills/story-long-write/references/reference-index.md +86 -0
- package/lib/oh-story/skills/story-long-write/references/style-combat-face.md +1 -1
- package/lib/oh-story/skills/story-long-write/references/style-craft.md +9 -29
- package/lib/oh-story/skills/story-long-write/references/style-genre-modules.md +1 -1
- package/lib/oh-story/skills/story-long-write/references/style-resolution.md +27 -0
- package/lib/oh-story/skills/story-long-write/references/tracking-initialization.md +31 -0
- package/lib/oh-story/skills/story-long-write/references/tracking-transaction.md +9 -34
- package/lib/oh-story/skills/story-long-write/references/workflow-chapter.md +88 -118
- package/lib/oh-story/skills/story-long-write/references/workflow-daily.md +55 -119
- package/lib/oh-story/skills/story-long-write/references/workflow-revision.md +15 -11
- package/lib/oh-story/skills/story-long-write/references/workflow-setup.md +73 -54
- package/lib/oh-story/skills/story-long-write/references/writer-prompt-fallback.md +22 -0
- package/lib/oh-story/skills/story-long-write/references/writing-craft.md +63 -4
- package/lib/oh-story/skills/story-long-write/scripts/author_memory_commit.py +934 -170
- package/lib/oh-story/skills/story-long-write/scripts/build_writer_prompt.py +531 -0
- package/lib/oh-story/skills/story-long-write/scripts/check-ai-patterns.js +6 -1
- package/lib/oh-story/skills/story-long-write/scripts/check-degeneration.js +39 -20
- package/lib/oh-story/skills/story-long-write/scripts/check-outline-contract.js +197 -15
- package/lib/oh-story/skills/story-long-write/scripts/check-outline-copy.js +90 -23
- package/lib/oh-story/skills/story-long-write/scripts/normalize-punctuation.js +10 -5
- package/lib/oh-story/skills/story-long-write/scripts/outline_view.py +285 -0
- package/lib/oh-story/skills/story-long-write/scripts/storyctl.py +58 -0
- package/lib/oh-story/skills/story-long-write/scripts/style-whitelist.js +39 -0
- package/lib/oh-story/skills/story-long-write/scripts/tracking_commit.py +210 -2
- package/lib/oh-story/skills/story-long-write/scripts/wordcount_core.py +3 -0
- package/lib/oh-story/skills/story-review/SKILL.md +80 -87
- package/lib/oh-story/skills/story-review/references/anti-ai-writing.md +29 -56
- package/lib/oh-story/skills/story-review/references/author-memory.md +61 -29
- package/lib/oh-story/skills/story-review/references/banned-words.md +3 -1
- package/lib/oh-story/skills/story-review/references/dialogue-mastery.md +10 -4
- package/lib/oh-story/skills/story-review/references/review-quality.md +6 -12
- package/lib/oh-story/skills/story-review/references/style-resolution.md +27 -0
- package/lib/oh-story/skills/story-review/references/tracking-initialization.md +31 -0
- package/lib/oh-story/skills/story-review/references/tracking-transaction.md +9 -34
- package/lib/oh-story/skills/story-review/scripts/author_memory_commit.py +934 -170
- package/lib/oh-story/skills/story-review/scripts/check-ai-patterns.js +6 -1
- package/lib/oh-story/skills/story-review/scripts/check-degeneration.js +39 -20
- package/lib/oh-story/skills/story-review/scripts/normalize-punctuation.js +10 -5
- package/lib/oh-story/skills/story-review/scripts/style-whitelist.js +39 -0
- package/lib/oh-story/skills/story-review/scripts/tracking_commit.py +210 -2
- package/lib/oh-story/skills/story-review/scripts/wordcount_core.py +3 -0
- package/lib/oh-story/skills/story-setup/SKILL.md +58 -43
- package/lib/oh-story/skills/story-setup/references/agent-references/anti-ai-writing.md +29 -56
- package/lib/oh-story/skills/story-setup/references/agent-references/banned-words.md +3 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/deslop-gates.md +154 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/dialogue-mastery.md +10 -4
- package/lib/oh-story/skills/story-setup/references/agent-references/format-and-structure.md +2 -2
- package/lib/oh-story/skills/story-setup/references/agent-references/long-emotional-methods.md +2 -2
- package/lib/oh-story/skills/story-setup/references/agent-references/long-quality.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/short-genre-formulas.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/style-combat-face.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/style-genre-modules.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/style-resolution.md +27 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/writing-craft.md +63 -4
- package/lib/oh-story/skills/story-setup/references/diagnostics.md +38 -0
- package/lib/oh-story/skills/story-short-analyze/SKILL.md +22 -3
- package/lib/oh-story/skills/story-short-analyze/references/analysis-writing-techniques.md +1 -1
- package/lib/oh-story/skills/story-short-analyze/references/material-decomposition.md +5 -1
- package/lib/oh-story/skills/story-short-analyze/references/source-story-quality.md +2 -2
- package/lib/oh-story/skills/story-short-scan/SKILL.md +5 -1
- package/lib/oh-story/skills/story-short-write/SKILL.md +15 -324
- package/lib/oh-story/skills/story-short-write/references/author-memory.md +61 -29
- package/lib/oh-story/skills/story-short-write/references/banned-words.md +3 -1
- package/lib/oh-story/skills/story-short-write/references/benchmark-recall.md +60 -0
- package/lib/oh-story/skills/story-short-write/references/dialogue-mastery.md +10 -4
- package/lib/oh-story/skills/story-short-write/references/genre-styles//344/270/226/346/203/205/346/211/223/350/204/270.md +2 -2
- package/lib/oh-story/skills/story-short-write/references/genre-styles//345/217/214/347/224/267/344/270/273.md +1 -1
- package/lib/oh-story/skills/story-short-write/references/genre-styles//345/244/215/344/273/207/346/211/223/350/204/270.md +3 -3
- package/lib/oh-story/skills/story-short-write/references/genre-styles//345/256/205/346/226/227/345/256/253/346/226/227.md +3 -3
- package/lib/oh-story/skills/story-short-write/references/genre-styles//346/200/273/350/243/201/350/261/252/351/227/250.md +3 -3
- package/lib/oh-story/skills/story-short-write/references/genre-styles//346/202/254/347/226/221.md +5 -5
- package/lib/oh-story/skills/story-short-write/references/genre-styles//346/260/221/344/277/227/346/200/252/350/260/210.md +4 -4
- package/lib/oh-story/skills/story-short-write/references/genre-styles//347/224/234/345/256/240.md +5 -5
- package/lib/oh-story/skills/story-short-write/references/genre-styles//350/277/275/345/246/273/347/201/253/350/221/254/345/234/272.md +3 -3
- package/lib/oh-story/skills/story-short-write/references/genre-writing-formulas.md +1 -1
- package/lib/oh-story/skills/story-short-write/references/genre-writing-techniques.md +1 -1
- package/lib/oh-story/skills/story-short-write/references/reference-index.md +55 -0
- package/lib/oh-story/skills/story-short-write/references/short-craft.md +12 -14
- package/lib/oh-story/skills/story-short-write/references/short-deslop.md +10 -10
- package/lib/oh-story/skills/story-short-write/references/short-format.md +3 -1
- package/lib/oh-story/skills/story-short-write/references/short-prose-quality.md +2 -2
- package/lib/oh-story/skills/story-short-write/references/style-resolution.md +27 -0
- package/lib/oh-story/skills/story-short-write/references/workflow-design.md +78 -0
- package/lib/oh-story/skills/story-short-write/references/workflow-draft.md +126 -0
- package/lib/oh-story/skills/story-short-write/references/workflow-revision.md +32 -0
- package/lib/oh-story/skills/story-short-write/references/writing-workflow.md +5 -5
- package/lib/oh-story/skills/story-short-write/scripts/author_memory_commit.py +934 -170
- package/lib/oh-story/skills/story-short-write/scripts/check-ai-patterns.js +6 -1
- package/lib/oh-story/skills/story-short-write/scripts/check-degeneration.js +39 -20
- package/lib/oh-story/skills/story-short-write/scripts/check-delivery-contract.js +34 -5
- package/lib/oh-story/skills/story-short-write/scripts/check-outline-copy.js +90 -23
- package/lib/oh-story/skills/story-short-write/scripts/normalize-punctuation.js +10 -5
- package/lib/oh-story/skills/story-short-write/scripts/style-whitelist.js +39 -0
- package/lib/types/client/drama-production-view.d.ts.map +1 -1
- package/lib/types/client/file-activity.d.ts +19 -1
- package/lib/types/client/file-activity.d.ts.map +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/production-prompts.d.ts +7 -0
- package/lib/types/client/production-prompts.d.ts.map +1 -1
- package/lib/types/client/production-runtime.d.ts +33 -0
- package/lib/types/client/production-runtime.d.ts.map +1 -1
- package/lib/types/drama-adapters.d.ts +5 -3
- package/lib/types/drama-adapters.d.ts.map +1 -1
- package/lib/types/native-hooks.d.ts +52 -0
- package/lib/types/native-hooks.d.ts.map +1 -1
- package/lib/types/role-identity.d.ts +17 -0
- package/lib/types/role-identity.d.ts.map +1 -0
- package/lib/types/role-tool.d.ts.map +1 -1
- package/lib/types/skill-provider.d.ts.map +1 -1
- package/lib/video-recap/CHANGELOG.md +31 -1
- package/lib/video-recap/manifest.json +162 -162
- package/lib/video-recap/skills/video-assemble/scripts/artifacts.py +4 -9
- package/lib/video-recap/skills/video-assemble/scripts/assemble.py +47 -60
- package/lib/video-recap/skills/video-assemble/scripts/assembly_contract.py +77 -115
- package/lib/video-recap/skills/video-assemble/scripts/assembly_settings.py +41 -40
- package/lib/video-recap/skills/video-assemble/scripts/audio_automation.py +22 -32
- package/lib/video-recap/skills/video-assemble/scripts/audio_mix.py +102 -192
- package/lib/video-recap/skills/video-assemble/scripts/jianying_builders.py +14 -35
- package/lib/video-recap/skills/video-assemble/scripts/jianying_model.py +14 -12
- package/lib/video-recap/skills/video-assemble/scripts/jianying_optional.py +8 -9
- package/lib/video-recap/skills/video-assemble/scripts/jianying_schema.py +3 -14
- package/lib/video-recap/skills/video-assemble/scripts/jianying_timeline_contract.py +23 -12
- package/lib/video-recap/skills/video-assemble/scripts/jianying_tracks.py +1 -4
- package/lib/video-recap/skills/video-assemble/scripts/jianying_writer.py +24 -25
- package/lib/video-recap/skills/video-assemble/scripts/lib.py +31 -85
- package/lib/video-recap/skills/video-assemble/scripts/media.py +100 -144
- package/lib/video-recap/skills/video-assemble/scripts/narration_audio.py +101 -195
- package/lib/video-recap/skills/video-assemble/scripts/render_preflight.py +10 -21
- package/lib/video-recap/skills/video-assemble/scripts/source_subtitles.py +90 -169
- package/lib/video-recap/skills/video-assemble/scripts/subtitle_core.py +69 -122
- package/lib/video-recap/skills/video-assemble/scripts/subtitle_render.py +10 -17
- package/lib/video-recap/skills/video-assemble/scripts/timeline.py +33 -48
- package/lib/video-recap/skills/video-assemble/scripts/timeline_emit.py +14 -20
- package/lib/video-recap/skills/video-assemble/scripts/visual_render.py +135 -213
- package/lib/video-recap/skills/video-cut/scripts/cut_cli.py +49 -57
- package/lib/video-recap/skills/video-cut/scripts/cut_contract.py +38 -74
- package/lib/video-recap/skills/video-cut/scripts/cut_render.py +46 -95
- package/lib/video-recap/skills/video-cut/scripts/lib.py +23 -25
- package/lib/video-recap/skills/video-cut/scripts/media_geometry.py +70 -173
- package/lib/video-recap/skills/video-cut/scripts/narration_mapping.py +28 -53
- package/lib/video-recap/skills/video-cut/scripts/sentence_boundaries.py +162 -322
- package/lib/video-recap/skills/video-recap/references/timeline-and-jianying.md +6 -7
- package/lib/video-recap/skills/video-recap/scripts/doctor.py +104 -124
- package/lib/video-recap/skills/video-recap/scripts/final_qc.py +255 -412
- package/lib/video-recap/skills/video-recap/scripts/lib.py +30 -52
- package/lib/video-recap/skills/video-recap/scripts/materials.py +97 -120
- package/lib/video-recap/skills/video-recap/scripts/mimo_qc_client.py +7 -12
- package/lib/video-recap/skills/video-recap/scripts/mimo_qc_evidence.py +46 -97
- package/lib/video-recap/skills/video-recap/scripts/mimo_qc_observations.py +18 -36
- package/lib/video-recap/skills/video-recap/scripts/mimo_qc_payload.py +29 -47
- package/lib/video-recap/skills/video-recap/scripts/mimo_qc_report.py +43 -76
- package/lib/video-recap/skills/video-recap/scripts/mimo_qc_runner.py +2 -1
- package/lib/video-recap/skills/video-recap/scripts/qc_contract.py +2 -1
- package/lib/video-recap/skills/video-recap/scripts/recap_cli.py +2 -2
- package/lib/video-recap/skills/video-recap/scripts/recap_inspect.py +129 -145
- package/lib/video-recap/skills/video-recap/scripts/recap_review.py +27 -20
- package/lib/video-recap/skills/video-recap/scripts/recap_runner.py +20 -31
- package/lib/video-recap/skills/video-recap/scripts/recap_runtime.py +31 -106
- package/lib/video-recap/skills/video-recap/scripts/recap_stage_qc.py +43 -113
- package/lib/video-recap/skills/video-recap/scripts/recap_timeline.py +196 -377
- package/lib/video-recap/skills/video-script/scripts/agent_brief.py +1 -1
- package/lib/video-recap/skills/video-script/scripts/agent_text.py +63 -172
- package/lib/video-recap/skills/video-script/scripts/brief_context.py +80 -135
- package/lib/video-recap/skills/video-script/scripts/brief_inputs.py +125 -167
- package/lib/video-recap/skills/video-script/scripts/brief_timeline.py +93 -208
- package/lib/video-recap/skills/video-script/scripts/deslop_qc.py +20 -46
- package/lib/video-recap/skills/video-script/scripts/lib.py +30 -26
- package/lib/video-recap/skills/video-script/scripts/narration_lint.py +145 -140
- package/lib/video-recap/skills/video-script/scripts/review_response.py +12 -42
- package/lib/video-recap/skills/video-script/scripts/review_runner.py +0 -6
- package/lib/video-recap/skills/video-script/scripts/speech_ownership.py +39 -100
- package/lib/video-recap/skills/video-script/scripts/timeline_fusion.py +33 -124
- package/lib/video-recap/skills/video-understanding/scripts/agent_brief.py +1 -1
- package/lib/video-recap/skills/video-understanding/scripts/agent_text.py +63 -172
- package/lib/video-recap/skills/video-understanding/scripts/asr.py +1 -2
- package/lib/video-recap/skills/video-understanding/scripts/brief_context.py +80 -135
- package/lib/video-recap/skills/video-understanding/scripts/brief_inputs.py +125 -167
- package/lib/video-recap/skills/video-understanding/scripts/brief_timeline.py +93 -208
- package/lib/video-recap/skills/video-understanding/scripts/consolidate.py +1 -1
- package/lib/video-recap/skills/video-understanding/scripts/deslop_qc.py +20 -46
- package/lib/video-recap/skills/video-understanding/scripts/lib.py +31 -26
- package/lib/video-recap/skills/video-understanding/scripts/narration_lint.py +145 -140
- package/lib/video-recap/skills/video-understanding/scripts/speech_ownership.py +39 -100
- package/lib/video-recap/skills/video-understanding/scripts/timeline_fusion.py +33 -124
- package/lib/video-recap/skills/video-understanding/scripts/vlm.py +1 -4
- package/lib/video-recap/skills/video-voiceover/scripts/dub.py +7 -13
- package/lib/video-recap/skills/video-voiceover/scripts/fish_audio.py +12 -30
- package/lib/video-recap/skills/video-voiceover/scripts/lib.py +98 -131
- package/lib/video-recap/skills/video-voiceover/scripts/tts_audio.py +17 -28
- package/lib/video-recap/skills/video-voiceover/scripts/voiceover.py +151 -240
- package/package.json +45 -45
- package/lib/novel-to-game/skills/game-world-design/references/dialogue-design-method.md +0 -59
- package/lib/novel-to-game/skills/game-world-design/references/game-writing-craft.md +0 -53
- package/lib/novel-to-game/skills/novel-to-game/references/intake-benchmark-reference.md +0 -42
- package/lib/oh-story/skills/story-long-write/references/state-tracking.md +0 -108
|
@@ -94,8 +94,14 @@ SPOKEN_RUN_RE = re.compile(r"[\u3400-\u9fff]{4,}")
|
|
|
94
94
|
EXPLICIT_TEXT_TO_VIDEO = "无(创作者已明确选择文生视频)"
|
|
95
95
|
PENDING_REFERENCE_SUFFIX_RE = re.compile(r";待补参考图:[^;。\n]+。?$")
|
|
96
96
|
VISUAL_CATEGORIES = ("人物", "造型", "地点", "道具")
|
|
97
|
+
# A malformed entry always tries to name something; a heading that is only the
|
|
98
|
+
# category word is a section divider ("## 人物"), and rejecting it left the
|
|
99
|
+
# document with no way to group entries at all.
|
|
97
100
|
VISUAL_SETTING_LINE_RE = re.compile(
|
|
98
|
-
r"^#{2,4}[ \t ]*(?:"
|
|
101
|
+
r"^#{2,4}[ \t ]*(?:"
|
|
102
|
+
+ "|".join(VISUAL_CATEGORIES)
|
|
103
|
+
+ r")(?![ \t ]*$)[^\n]*$",
|
|
104
|
+
re.MULTILINE,
|
|
99
105
|
)
|
|
100
106
|
VISUAL_SETTING_HEADING_RE = re.compile(
|
|
101
107
|
r"^## (" + "|".join(VISUAL_CATEGORIES) + r") · (.+?)[ \t ]*$", re.MULTILINE
|
|
@@ -175,6 +181,10 @@ def _fields(section: str, *, owner: str, errors: list[str]) -> dict[str, str]:
|
|
|
175
181
|
pairs = re.findall(r"^- ([^:\n]+):(.+)$", section, re.MULTILINE)
|
|
176
182
|
fields: dict[str, str] = {}
|
|
177
183
|
for key, value in pairs:
|
|
184
|
+
# `- **参考**:…` is ordinary Markdown and reads as the same field to a
|
|
185
|
+
# human. Taking the emphasis literally turned it into a different key,
|
|
186
|
+
# so the author got "缺少参考字段" while looking straight at 参考.
|
|
187
|
+
key = re.sub(r"^(?:\*\*|__|\*|_)(.+?)(?:\*\*|__|\*|_)$", r"\1", key.strip())
|
|
178
188
|
if key in fields:
|
|
179
189
|
errors.append(f"{owner}: 字段重复: {key}")
|
|
180
190
|
fields[key] = value
|
|
@@ -242,6 +252,43 @@ def _copyable_prompt(
|
|
|
242
252
|
return prompt or None
|
|
243
253
|
|
|
244
254
|
|
|
255
|
+
def _copyable_prompt_cause(
|
|
256
|
+
section: str, heading: str = r"可复制(?:通用)?提示词"
|
|
257
|
+
) -> str:
|
|
258
|
+
"""Why `_copyable_prompt` returned None, as a suffix for the error.
|
|
259
|
+
|
|
260
|
+
"缺少唯一且非空的可复制提示词" is true of four different documents and tells
|
|
261
|
+
the author nothing about which one they wrote. The expensive case is a
|
|
262
|
+
single stray line -- a separator, an HTML comment, a note -- inside an
|
|
263
|
+
otherwise complete block: the prompt is visibly right there, so the message
|
|
264
|
+
reads as a checker bug and the real line goes unlooked at.
|
|
265
|
+
"""
|
|
266
|
+
|
|
267
|
+
# Name the heading the author actually has to write, not this one's default:
|
|
268
|
+
# the keyframe caller passes a different one, and pointing at the wrong
|
|
269
|
+
# heading is worse than saying nothing.
|
|
270
|
+
label = "### " + re.sub(r"\(\?:([^)]*)\)\?", "", heading).replace("\\", "")
|
|
271
|
+
markers = list(re.finditer(rf"^### {heading}\s*$", section, re.MULTILINE))
|
|
272
|
+
if not markers:
|
|
273
|
+
return f":没有 `{label}` 小节标题"
|
|
274
|
+
if len(markers) > 1:
|
|
275
|
+
return f":`{label}` 出现了 {len(markers)} 次,只能有一个"
|
|
276
|
+
body = section[markers[0].end() :]
|
|
277
|
+
following = re.search(r"^###\s+|^##\s+", body, re.MULTILINE)
|
|
278
|
+
if following is not None:
|
|
279
|
+
body = body[: following.start()]
|
|
280
|
+
lines = [line for line in body.splitlines() if line.strip()]
|
|
281
|
+
if not lines:
|
|
282
|
+
return f":`{label}` 下面是空的"
|
|
283
|
+
intruders = [line for line in lines if not line.startswith(">")]
|
|
284
|
+
if intruders:
|
|
285
|
+
return (
|
|
286
|
+
":小节内有不以 `>` 开头的行,整块因此不算引用块——"
|
|
287
|
+
f"把它移到小节外,或删掉:{_excerpt(intruders[0])}"
|
|
288
|
+
)
|
|
289
|
+
return ":引用块里只有空白"
|
|
290
|
+
|
|
291
|
+
|
|
245
292
|
def _portable_path(value: str) -> bool:
|
|
246
293
|
if not value or "\\" in value or re.match(r"^[A-Za-z]:", value):
|
|
247
294
|
return False
|
|
@@ -566,7 +613,11 @@ def _visual_entries(document: str, errors: list[str]) -> list[VisualEntry]:
|
|
|
566
613
|
|
|
567
614
|
|
|
568
615
|
def _named_entries(
|
|
569
|
-
prompt: str,
|
|
616
|
+
prompt: str,
|
|
617
|
+
entries: list[VisualEntry],
|
|
618
|
+
*,
|
|
619
|
+
fold_case: bool = False,
|
|
620
|
+
by_entry_name: bool = False,
|
|
570
621
|
) -> set[tuple[str, str]]:
|
|
571
622
|
"""Which declared entries does this frozen keyframe actually call by name?
|
|
572
623
|
|
|
@@ -578,7 +629,16 @@ def _named_entries(
|
|
|
578
629
|
haystack = haystack.casefold()
|
|
579
630
|
owners: dict[str, list[VisualEntry]] = {}
|
|
580
631
|
for entry in entries:
|
|
581
|
-
|
|
632
|
+
# 来源 quotes 剧本.md, which is written in the project's own language and
|
|
633
|
+
# calls people by their entry names — not by the 画面代称 a prompt body
|
|
634
|
+
# uses. Matching a Chinese screenplay quote against an English designator
|
|
635
|
+
# would never fire, so that text is matched by entry name instead. An
|
|
636
|
+
# entry that opted out with `画面代称:无` opted out of being found by
|
|
637
|
+
# name at all, and stays out of both.
|
|
638
|
+
needles = (
|
|
639
|
+
[entry.name] if by_entry_name and entry.designators else entry.designators
|
|
640
|
+
)
|
|
641
|
+
for designator in needles:
|
|
582
642
|
needle = re.sub(r"\s+", " ", designator).strip()
|
|
583
643
|
if fold_case:
|
|
584
644
|
needle = needle.casefold()
|
|
@@ -665,13 +725,17 @@ def _check_named_coverage(
|
|
|
665
725
|
basis: "VisualBasis",
|
|
666
726
|
entries: list[VisualEntry],
|
|
667
727
|
errors: list[str],
|
|
728
|
+
*,
|
|
729
|
+
by_entry_name: bool = False,
|
|
668
730
|
) -> None:
|
|
669
731
|
"""Every entry this text calls by name is either in frame or declared 画外."""
|
|
670
732
|
# Matching is case-sensitive so an ordinary English word never impersonates a
|
|
671
733
|
# character called May or Will. A body that writes the name in another case
|
|
672
734
|
# would otherwise fall out of the check silently, so it is reported here.
|
|
673
|
-
named = _named_entries(prompt, entries)
|
|
674
|
-
folded = _named_entries(
|
|
735
|
+
named = _named_entries(prompt, entries, by_entry_name=by_entry_name)
|
|
736
|
+
folded = _named_entries(
|
|
737
|
+
prompt, entries, fold_case=True, by_entry_name=by_entry_name
|
|
738
|
+
)
|
|
675
739
|
for category, name in sorted(folded - named):
|
|
676
740
|
errors.append(
|
|
677
741
|
f"{owner}: {where}里的名字与画面代称大小写不一致: {category}「{name}」;"
|
|
@@ -870,6 +934,17 @@ def _check_language_designators(
|
|
|
870
934
|
)
|
|
871
935
|
|
|
872
936
|
|
|
937
|
+
def _declared_seconds(value: str) -> Optional[float]:
|
|
938
|
+
"""The number of seconds a 时长 field declares, however it is spelled.
|
|
939
|
+
|
|
940
|
+
`4s`, `4 秒` and `4秒` are the same duration. Returning None for anything
|
|
941
|
+
else keeps an unparseable value out of the comparison instead of turning a
|
|
942
|
+
formatting difference into a false duration conflict.
|
|
943
|
+
"""
|
|
944
|
+
match = re.search(r"(\d+(?:\.\d+)?)", value or "")
|
|
945
|
+
return float(match.group(1)) if match else None
|
|
946
|
+
|
|
947
|
+
|
|
873
948
|
def _check_continuity_locks(
|
|
874
949
|
locks: list[ContinuityLock],
|
|
875
950
|
*,
|
|
@@ -1091,7 +1166,10 @@ def validate_episode(episode: Path, project_root: Optional[Path] = None) -> list
|
|
|
1091
1166
|
image_prompt = _copyable_prompt(body)
|
|
1092
1167
|
image_prompts[match.group(1)] = image_prompt
|
|
1093
1168
|
if image_prompt is None:
|
|
1094
|
-
errors.append(
|
|
1169
|
+
errors.append(
|
|
1170
|
+
f"{match.group(1)}: 缺少唯一且非空的可复制提示词"
|
|
1171
|
+
+ _copyable_prompt_cause(body)
|
|
1172
|
+
)
|
|
1095
1173
|
|
|
1096
1174
|
motions = _sections(video, "MOTION")
|
|
1097
1175
|
shot_ids = re.findall(r"^## (SHOT-[A-Z0-9-]+)\b", storyboard, re.MULTILINE)
|
|
@@ -1122,9 +1200,11 @@ def validate_episode(episode: Path, project_root: Optional[Path] = None) -> list
|
|
|
1122
1200
|
errors.append("视频提示词.md: 没有 MOTION 条目")
|
|
1123
1201
|
|
|
1124
1202
|
motion_by_shot: dict[str, tuple[str, str, Optional[str]]] = {}
|
|
1203
|
+
motion_duration: dict[str, str] = {}
|
|
1125
1204
|
for motion_id, body in motions.items():
|
|
1126
1205
|
fields = _fields(body, owner=motion_id, errors=errors)
|
|
1127
1206
|
shot_id = _plain(fields.get("分镜", ""))
|
|
1207
|
+
motion_duration[shot_id] = _plain(fields.get("时长", ""))
|
|
1128
1208
|
copyable_prompt = _copyable_prompt(body)
|
|
1129
1209
|
if not shot_id:
|
|
1130
1210
|
errors.append(f"{motion_id}: 缺少分镜字段")
|
|
@@ -1135,16 +1215,34 @@ def validate_episode(episode: Path, project_root: Optional[Path] = None) -> list
|
|
|
1135
1215
|
if motion_id.removeprefix("MOTION-") != shot_id.removeprefix("SHOT-"):
|
|
1136
1216
|
errors.append(f"{motion_id}: ID 必须与分镜 {shot_id} 一一对应")
|
|
1137
1217
|
if copyable_prompt is None:
|
|
1138
|
-
errors.append(
|
|
1218
|
+
errors.append(
|
|
1219
|
+
f"{motion_id}: 缺少唯一且非空的可复制提示词"
|
|
1220
|
+
+ _copyable_prompt_cause(body)
|
|
1221
|
+
)
|
|
1139
1222
|
|
|
1140
1223
|
if set(motion_by_shot) != set(shots):
|
|
1141
1224
|
errors.append("分镜.md/视频提示词.md: SHOT 与 MOTION 未一一对应")
|
|
1142
1225
|
|
|
1143
1226
|
for shot_id, shot_body in shots.items():
|
|
1144
1227
|
fields = _fields(shot_body, owner=shot_id, errors=errors)
|
|
1228
|
+
source_value = fields.get("来源", "")
|
|
1145
1229
|
claimed_scenes.update(
|
|
1146
|
-
_shot_sources(
|
|
1230
|
+
_shot_sources(source_value, shot_id, scenes, errors)
|
|
1147
1231
|
)
|
|
1232
|
+
shot_seconds = _declared_seconds(_plain(fields.get("时长", "")))
|
|
1233
|
+
motion_seconds = _declared_seconds(motion_duration.get(shot_id, ""))
|
|
1234
|
+
if (
|
|
1235
|
+
shot_seconds is not None
|
|
1236
|
+
and motion_seconds is not None
|
|
1237
|
+
and shot_seconds != motion_seconds
|
|
1238
|
+
):
|
|
1239
|
+
# 时长 is the value actually sent to the execution end and the term
|
|
1240
|
+
# VID-04/VID-13 arithmetic is built on. A downstream copy that drifts
|
|
1241
|
+
# from its accepted upstream is invisible in every other check.
|
|
1242
|
+
errors.append(
|
|
1243
|
+
f"{shot_id}: 分镜时长 {shot_seconds:g} 秒与视频提示词 "
|
|
1244
|
+
f"{motion_seconds:g} 秒不一致;视频提示词只能原样照抄已接受的镜头时长"
|
|
1245
|
+
)
|
|
1148
1246
|
image_value = fields.get("图片提示词项", "")
|
|
1149
1247
|
if not image_value:
|
|
1150
1248
|
errors.append(f"{shot_id}: 缺少图片提示词项字段")
|
|
@@ -1178,11 +1276,44 @@ def validate_episode(episode: Path, project_root: Optional[Path] = None) -> list
|
|
|
1178
1276
|
# shot without one would make the coverage check below vacuous.
|
|
1179
1277
|
keyframe = _copyable_prompt(shot_body, heading=r"冻结关键帧提示词")
|
|
1180
1278
|
if keyframe is None:
|
|
1181
|
-
errors.append(
|
|
1279
|
+
errors.append(
|
|
1280
|
+
f"{shot_id}: 缺少唯一且非空的冻结关键帧提示词"
|
|
1281
|
+
+ _copyable_prompt_cause(shot_body, heading=r"冻结关键帧提示词")
|
|
1282
|
+
)
|
|
1182
1283
|
elif basis.parsed:
|
|
1183
1284
|
_check_named_coverage(
|
|
1184
1285
|
keyframe, shot_id, "冻结关键帧提示词", basis, visual_entries, errors
|
|
1185
1286
|
)
|
|
1287
|
+
# The closing keyframe is optional — many shots end where they began —
|
|
1288
|
+
# but a heading that is present and malformed is a defect, not a shot
|
|
1289
|
+
# that quietly has no closing frame.
|
|
1290
|
+
if re.search(r"^### 收尾关键帧提示词\s*$", shot_body, re.MULTILINE):
|
|
1291
|
+
closing = _copyable_prompt(shot_body, heading=r"收尾关键帧提示词")
|
|
1292
|
+
if closing is None:
|
|
1293
|
+
errors.append(
|
|
1294
|
+
f"{shot_id}: 收尾关键帧提示词不是唯一且非空的可复制正文"
|
|
1295
|
+
+ _copyable_prompt_cause(shot_body, heading=r"收尾关键帧提示词")
|
|
1296
|
+
)
|
|
1297
|
+
elif basis.parsed:
|
|
1298
|
+
_check_named_coverage(
|
|
1299
|
+
closing, shot_id, "收尾关键帧提示词", basis, visual_entries, errors
|
|
1300
|
+
)
|
|
1301
|
+
if basis.parsed and source_value:
|
|
1302
|
+
# A shot's 来源 is its claim on the screenplay: whatever it quotes,
|
|
1303
|
+
# this shot is the one that films it. Quoting an action performed by
|
|
1304
|
+
# someone the frame never shows takes that action off everyone's
|
|
1305
|
+
# list — no other shot claims it, and nothing reports it missing, so
|
|
1306
|
+
# it simply never gets filmed. Same rule as the keyframe: in frame,
|
|
1307
|
+
# or declared 画外.
|
|
1308
|
+
_check_named_coverage(
|
|
1309
|
+
source_value,
|
|
1310
|
+
shot_id,
|
|
1311
|
+
"来源引文",
|
|
1312
|
+
basis,
|
|
1313
|
+
visual_entries,
|
|
1314
|
+
errors,
|
|
1315
|
+
by_entry_name=True,
|
|
1316
|
+
)
|
|
1186
1317
|
|
|
1187
1318
|
motion = motion_by_shot.get(shot_id)
|
|
1188
1319
|
if not motion:
|
|
@@ -48,6 +48,11 @@ CREATOR_DOCUMENTS = (
|
|
|
48
48
|
"图片提示词.md",
|
|
49
49
|
"视频提示词.md",
|
|
50
50
|
)
|
|
51
|
+
# The cut list is written after the media exists, so an episode that never
|
|
52
|
+
# reached editing is complete without one. It travels with a handover when it is
|
|
53
|
+
# there -- without it the next person has to re-cut the film from scratch -- but
|
|
54
|
+
# it is never reported as a missing creator document.
|
|
55
|
+
POST_PRODUCTION_DOCUMENTS = ("剪辑单.md",)
|
|
51
56
|
EXPORT_MEDIA_DIRECTORY = "制作成果"
|
|
52
57
|
EXPORT_SCHEMA = "1.0"
|
|
53
58
|
EPISODE_ID_RE = re.compile(r"EP(?:[0-9]{3}|[1-9][0-9]{3,})")
|
|
@@ -1948,6 +1953,12 @@ def _export_episode(
|
|
|
1948
1953
|
continue
|
|
1949
1954
|
digest = _export_regular_file(source, target / name)
|
|
1950
1955
|
files.append({"path": name, "sha256": digest})
|
|
1956
|
+
for name in POST_PRODUCTION_DOCUMENTS:
|
|
1957
|
+
source = episode_directory / name
|
|
1958
|
+
if not source.exists():
|
|
1959
|
+
continue
|
|
1960
|
+
digest = _export_regular_file(source, target / name)
|
|
1961
|
+
files.append({"path": name, "sha256": digest})
|
|
1951
1962
|
media_root = episode_directory / EXPORT_MEDIA_DIRECTORY
|
|
1952
1963
|
if include_media and media_root.exists():
|
|
1953
1964
|
media_details = os.lstat(media_root)
|
|
@@ -18,6 +18,24 @@
|
|
|
18
18
|
把两者拆开,是为了换装、受伤、湿污和年龄变化时仍能复用人物身份,同时让图片提示
|
|
19
19
|
词与分镜精确选择一个相容造型。
|
|
20
20
|
|
|
21
|
+
|
|
22
|
+
## 画面代称要覆盖每一种正文语言
|
|
23
|
+
|
|
24
|
+
`画面代称` 是下游覆盖检查唯一用来匹配的字符串:冻结关键帧、图片提示词、视频提示词里出现了这个词,
|
|
25
|
+
才算「这一镜点了这个资产的名」。匹配是逐字的,不做翻译。
|
|
26
|
+
|
|
27
|
+
问题在于三份正文的语言不一定相同:图片提示词与冻结关键帧跟 `format/prompt_language`,
|
|
28
|
+
视频提示词优先跟已接受的 `video_prompt_language`。而校验器只按后者的解析结果决定要不要强制
|
|
29
|
+
「代称不能等于名字」——于是一个 zh + en 混配的项目很容易写成**只有英文代称**,
|
|
30
|
+
然后中文正文里这个资产永远匹配不上。
|
|
31
|
+
|
|
32
|
+
**这种失败是静默的**:匹配不上不会报错,只会让覆盖检查对这条资产整个不生效,
|
|
33
|
+
看起来一路绿灯。所以:
|
|
34
|
+
|
|
35
|
+
- 一个资产的 `画面代称` 要**把它在各份正文里实际会出现的写法都列上**(中文名与英文代称并列),
|
|
36
|
+
不是二选一;
|
|
37
|
+
- 正文里确实不该靠名字识别时才写 `画面代称:无`,那是明确的弃权,不是省事。
|
|
38
|
+
|
|
21
39
|
## Character:最小稳定识别集
|
|
22
40
|
|
|
23
41
|
从剧本与 creator reference 中选择足以区别此人的持久锚点:
|
|
@@ -110,6 +128,16 @@ Character 拥有,换鞋、加厚外套、盘发都不改写它(那些属于
|
|
|
110
128
|
| 剪影与线条 | 轮廓与肩背重心、发型剪影与发际形状、固定配饰外形、服装廓形、步态负重 | 细微的五官不对称、浅色小痣、依赖真实皮肤纹理的痕迹 |
|
|
111
129
|
| 材质与表面 | 皮肤/毛发/布料的可比较表面状态、长期使用痕迹 | 需要柔和过渡才能读出的体积差 |
|
|
112
130
|
|
|
131
|
+
### 写实细节与身份连续性
|
|
132
|
+
|
|
133
|
+
**`craft_default`**:写实项目可以在稳定识别特征之外,补充皮肤纹理、自然不对称或使用痕迹。
|
|
134
|
+
远景中不易读出的细节,不宜单独承担跨镜识别。
|
|
135
|
+
|
|
136
|
+
痣、疤和牙齿形态等如果是人物既定特征,仍须保持;不能因它们难生成就允许随镜变化。
|
|
137
|
+
毛孔、细纹等微观纹理不必逐像素一致。是否需要这些细节由画面尺度与已接受风格决定。
|
|
138
|
+
|
|
139
|
+
**`taste_option`**:偶像化、漫画或其他风格可采用更平滑的表面,不以写实程度判错。
|
|
140
|
+
|
|
113
141
|
### 边界:形态选通道,身份定事实
|
|
114
142
|
|
|
115
143
|
- **`reviewed_invariant`**:形态可以改变锚点的**表达通道与颗粒度**,不得改写身份事实本身。
|
|
@@ -40,8 +40,14 @@
|
|
|
40
40
|
|
|
41
41
|
`锁面` 是**要被逐字带进提示词正文的那一小段字**,不是描述,也不是给人读的说明:
|
|
42
42
|
|
|
43
|
-
-
|
|
44
|
-
|
|
43
|
+
- 锁面必须**逐字出现在它管到的每一份可复制正文里**。校验器会在三处查同一个字符串:
|
|
44
|
+
图片提示词正文、冻结关键帧提示词、视频提示词正文。
|
|
45
|
+
- 图片与冻结关键帧使用 `format/prompt_language`,视频可能使用另选的 `video_prompt_language`。
|
|
46
|
+
语言不同时,优先使用确实适合各份正文的共同色值、型号或专名。
|
|
47
|
+
当前 `镜头:` 同时约束本镜首帧与视频正文,不能靠拆成两把锁分别约束两种语言。
|
|
48
|
+
没有合适共同词组时,在视觉设定中保留事实并报告此限制,暂不声明这把逐字锁;
|
|
49
|
+
不缩小事实实际出现的镜头范围来绕过检查,也不自行改变用户选择的正文语言。
|
|
50
|
+
|
|
45
51
|
- 只保留最小可辨识名词短语,通常是「颜色 + 材质/形制 + 物体」,例如
|
|
46
52
|
`pale blue chunky knit wool sweater`;
|
|
47
53
|
- 不含句号、动作、状态、数量、镜头信息和剧情;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
## 目录
|
|
4
4
|
|
|
5
5
|
- [参考音频是载体](#参考音频是载体)
|
|
6
|
+
- [参考可以是合成出来的](#参考可以是合成出来的)
|
|
6
7
|
- [身份与表演的界线](#身份与表演的界线)
|
|
7
8
|
- [一段参考音频可以决定什么](#一段参考音频可以决定什么)
|
|
8
9
|
- [绑定不等于听过](#绑定不等于听过)
|
|
@@ -27,6 +28,20 @@
|
|
|
27
28
|
`reference: null` 并写明「待选型」——**不要用一段文字描述冒充音色身份**。
|
|
28
29
|
下游拿着一段形容词去找声音,找回来的每次都不一样,而记录看起来是完整的。
|
|
29
30
|
|
|
31
|
+
### 参考可以是合成出来的
|
|
32
|
+
|
|
33
|
+
使用声音库时,确认所选音色及其使用范围符合供应商提供的许可。
|
|
34
|
+
项目没有配音演员、也不打算克隆谁的时候,这条路是让 `reference` 从 `待选型` 变成实际路径的
|
|
35
|
+
办法——**挑一个预置音色,合成一条,绑上去**。合成由 `$short-drama-produce` 的 `tts` 模态执行。
|
|
36
|
+
|
|
37
|
+
合成出来的参考和录音来的参考在本文档里受同样的约束:它一样要写用途边界,一样要有
|
|
38
|
+
`admission_status`,一样不能用形容词代替。差别只有一处——**它的选型判据是拿来挑预置音色的,
|
|
39
|
+
不是拿来判克隆像不像的**,所以「与谁最易混」这条要在同一批预置音色里回答,而不是在角色之间
|
|
40
|
+
凭空回答。预置库里两个音色听起来就是同一个人时,换一个,不要靠判据文字假装区分。
|
|
41
|
+
|
|
42
|
+
音色 ID 本身写进 `reference` 那一行,和路径、用途边界一起。它是创作决定:同一个角色在两集之间
|
|
43
|
+
换 ID 就是换人说话,这件事必须在文档里看得见、diff 里查得出。
|
|
44
|
+
|
|
30
45
|
## 身份与表演的界线
|
|
31
46
|
|
|
32
47
|
一句话判定:**这个特征在角色安静地坐着说一句无关紧要的话时还在吗**?
|
|
@@ -115,6 +130,15 @@ CHAR-A 与 CHAR-B 最易混:两条参考同为中低音区、语速偏慢。
|
|
|
115
130
|
|
|
116
131
|
角色多时按易混组分批选型,而不是按出场顺序。
|
|
117
132
|
|
|
133
|
+
### 对比选择预置音色
|
|
134
|
+
|
|
135
|
+
用同一组有代表性的台词试听候选,比较角色间是否易混,以及同一角色在不同情绪下是否稳定。
|
|
136
|
+
音色名称仅供检索,选择依据是实际声音。
|
|
137
|
+
|
|
138
|
+
需要测量时,F0 和谱特征可辅助定位近似音色;同一候选应有多句样本,才能估计自身变化。
|
|
139
|
+
不把音高间距或「组间距离大于组内极差」设为通用门槛。最终按角色需求与回听结果选择,
|
|
140
|
+
不为追求数字分离而改变已接受的声音方向。
|
|
141
|
+
|
|
118
142
|
## 专名发音
|
|
119
143
|
|
|
120
144
|
已接受的专名发音只能有一种拼法(`AST-10`)。
|
|
@@ -149,3 +173,7 @@ CHAR-A 与 CHAR-B 最易混:两条参考同为中低音区、语速偏慢。
|
|
|
149
173
|
|
|
150
174
|
临时情绪、呼吸、重音、音量和空间混响仍由剧本/镜头/视频提示词拥有。声音方向是生产输入,不是
|
|
151
175
|
合成结果保证;实际 TTS 仍由 `$short-drama-produce` 在精确预览并显式确认后执行。
|
|
176
|
+
|
|
177
|
+
参考音频落地之后,它在下游有两个去处:作为视频模型的音色参考绑定(见目标模型的方言文档),
|
|
178
|
+
以及作为配音本的实际人声。配音使用同一已选音色逐句合成;参考音频用于选型或模型绑定,不能直接充当不同台词的成品音轨。
|
|
179
|
+
是否保持角色声音,仍需在生成后回听确认。
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: short-drama-edit
|
|
3
|
+
description: 将已生成的短剧镜头剪成成片,记录入出点、镜序、声音、字幕与交付规格。用于套剪、加字幕、统一响度、调整节奏或导出精修素材;需要补素材或修改故事时转回对应创作阶段。
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 短剧剪辑与成片
|
|
8
|
+
|
|
9
|
+
把 `剧集/<EP>/制作成果/` 里的逐镜素材装配成一条成片,取舍写进 `剧集/<EP>/剪辑单.md`。
|
|
10
|
+
每段使用二级标题 `## CUT-...`,各自绑定一个 `MOTION-...` 和一个真实媒体文件。
|
|
11
|
+
|
|
12
|
+
根据实际素材选择可用片段,按剧本与分镜核对叙事。素材与意图不一致时,记录取舍和缺口。
|
|
13
|
+
|
|
14
|
+
## Quick Start
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
用 $short-drama-edit 把 EP001 已生产的镜头剪成成片
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 入口
|
|
21
|
+
|
|
22
|
+
进入条件是**素材已经存在且可读**:`剧集/<EP>/制作成果/` 里有本次要用的视频文件。
|
|
23
|
+
提示词写完、job 确认过、adapter 返回成功,都不等于素材可用;本阶段只认当前能打开的文件字节。
|
|
24
|
+
|
|
25
|
+
素材不全时可以先剪已有连续段落;用户要求完整成片时,将这一版标为片段并列出缺口。
|
|
26
|
+
在「未采用镜头」说明缺文件、质量不可用或叙事取舍。
|
|
27
|
+
|
|
28
|
+
`剧集/<EP>/分镜.md` 与 `视频提示词.md` 是镜序和职责的来源。剪辑可以**取舍**它们,不能**改写**
|
|
29
|
+
它们:删一镜、缩一镜、换顺序都属于本阶段;改台词、改镜头职责、改起终状态要回上游发修订请求。
|
|
30
|
+
|
|
31
|
+
内置渲染直接拼接编码后的分段,输入素材的画幅与帧率须一致。`check` 在可探测媒体时核对;
|
|
32
|
+
不同规格先通过外部工具按交付要求统一,保留构图并记录裁切或留边,再更新剪辑单的路径与时间。
|
|
33
|
+
|
|
34
|
+
渲染与测量需要 `ffmpeg` / `ffprobe` 在 PATH 上。没有时 `edit_tool.py` 直接失败并说明,
|
|
35
|
+
不用别的手段近似,也不把「没测」写成「通过」。
|
|
36
|
+
|
|
37
|
+
## 工作流
|
|
38
|
+
|
|
39
|
+
1. **逐段看完整素材,先标可用带,再谈剪辑。** 每个文件从头到尾看一遍,写下它实际能用的时间
|
|
40
|
+
区间,以及区间之外发生了什么(起势静止、结尾漂移、发白、动作回弹、多余的重复表演)。
|
|
41
|
+
这一步的产出是事实,不是决定。做法见 [生成素材的可用带](references/generated-footage.md)。
|
|
42
|
+
2. **有台词的镜先定位发声区间。** 保留完整字音和所需停顿。内置工具同步切画面与声音;
|
|
43
|
+
需要在连续对白上换画面时,使用外部剪辑工具分开处理。
|
|
44
|
+
3. **在可用区间内选叙事入出点。** 按动作、反应或停顿的需要选择入点,出点取信息完成之后、缺陷
|
|
45
|
+
开始之前。逐段写清入点理由和出点理由。做法见 [入出点与镜序](references/cut-craft.md)。
|
|
46
|
+
4. **排镜序并检查相邻关系。** 检查动作、空间、揭示与声音是否连贯;重复信息没有新增作用时再删。
|
|
47
|
+
5. **比较相邻段的画面。** 按同场景、同光态比较可比区域;有可见偏差时在对应段写 `画面`。
|
|
48
|
+
做法见 [接镜与色彩一致性](references/generated-footage.md#接镜与色彩一致性)。
|
|
49
|
+
6. **处理声音接缝与响度。** 拼接后回听;需要混音时通过外部工具执行并记录。
|
|
50
|
+
做法见 [声音、字幕与音乐](references/sound-and-subtitles.md)。
|
|
51
|
+
7. **写字幕。** 字幕的每一个字都取自 `剧本.md` 的台词原文,不取自转写结果;标点可按字幕惯例调整,
|
|
52
|
+
字不能改。转写只用来定位时间。
|
|
53
|
+
8. **写出 `剪辑单.md`,再渲染。** 先有文档后有成片:文档是可审查、可修订、可复现的那一份,
|
|
54
|
+
成片是它的产物。
|
|
55
|
+
9. **按可测项验收成片,再交付。** 见 [交付与验收](references/delivery-verify.md)。
|
|
56
|
+
|
|
57
|
+
## 剪辑单要求
|
|
58
|
+
|
|
59
|
+
- 正文开头写交付规格:`成片目标时长`、`画幅与帧率`、`交付响度`、`字幕`。目标时长是意图,
|
|
60
|
+
实际时长与目标的差写在报告里。用户明确要求固定时长时,应满足要求或报告缺少的素材。
|
|
61
|
+
- 每段一个 `## CUT-<EP>-<序号> · <中文名称>`,块内逐行写:
|
|
62
|
+
|
|
63
|
+
- `- 来源:<MOTION-...> · <项目相对路径>`——`MOTION-...` 必须是 `视频提示词.md` 里真实存在
|
|
64
|
+
的条目,路径必须是当前可读的文件。
|
|
65
|
+
- `- 入点:<秒>` / `- 出点:<秒>` / `- 时长:<秒>`——三者必须自洽,`出点 - 入点 == 时长`。
|
|
66
|
+
全部用秒,保留两位小数,不写时间码,不写帧号。
|
|
67
|
+
- `- 取舍:入点=<理由>;出点=<理由>`——理由写画面上发生了什么,不写「节奏需要」。
|
|
68
|
+
理由应能对应实际素材与本镜叙事需要。
|
|
69
|
+
- `- 声音:<本段声音怎么处理>`——记录保留原声或外部处理。此行不驱动内置 render 的混音。
|
|
70
|
+
- `- 画面:<接镜校正>` 或 `- 画面:无`——只在这一段与相邻段明显对不上时写,
|
|
71
|
+
格式是「亮度 <数>」「饱和 <数>」「色温 <数>」三项的任意组合,用 `;` 分隔。
|
|
72
|
+
详见 [接镜与色彩一致性](references/generated-footage.md#接镜与色彩一致性)。
|
|
73
|
+
- `- 字幕:<逐字台词原文>` 或 `- 字幕:无`。本段有多句台词时改用编号写法,
|
|
74
|
+
每句自带时间:`- 字幕 1:0.20-1.50 请进`、`- 字幕 2:2.30-4.30 门没有锁`。
|
|
75
|
+
编号从 1 连续,时间相对本 CUT 入点,且不得重叠。
|
|
76
|
+
- 素材里没有被采用的镜头,在正文开头写一行 `- 未采用镜头:<MOTION-...>(理由:……)`,
|
|
77
|
+
多项用 `;` 连接。理由区分两类:**文件缺失**(还没生产 / 生产失败)和**质量不可用**
|
|
78
|
+
(生成结果不能用),也可说明叙事取舍。补素材前先判断需要重出还是修订上游。
|
|
79
|
+
- 同一个 `MOTION-...` 可以拆成多个 `CUT-...`(同一段素材的两处分别使用),也可以整段不用。
|
|
80
|
+
不能凭空出现没有素材来源的 `CUT-...`。
|
|
81
|
+
- 一段素材被用两次时,两个 `CUT-...` 的区间不得重叠:同一批帧在成片里出现两次是重复镜头,
|
|
82
|
+
不是复用。确需重复出现(闪回、强调)时写明它是有意重复,并说明第二次为什么仍然成立。
|
|
83
|
+
|
|
84
|
+
## 边界
|
|
85
|
+
|
|
86
|
+
- **不生成新素材。** 需要补拍、重出、换参考图,回 `$short-drama-produce`;需要改提示词,
|
|
87
|
+
回 `$short-drama-video-prompts` 或 `$short-drama-image-prompts`。
|
|
88
|
+
- **不改上游语义。** 剪辑单可以让某句台词不出现在成片里(整镜未采用),不能改这句台词是什么。
|
|
89
|
+
发现剧本层面的问题就点名报告,交回 `$short-drama-write`。
|
|
90
|
+
- **沿用剧本的声音设计。** 保留已有对白、VO 和 OS,不自行增加解说;需要新增叙述时回写作阶段。
|
|
91
|
+
- **不把技术成功写成质量结论。** 渲染完成、时长对上、文件存在,都不是「这条片子能看」。
|
|
92
|
+
成片质量的判断交给 `$short-drama-review`,或交给创作者本人。
|
|
93
|
+
- **按已授权目标完成。** 继续修复影响交付的问题;新增创作方向或补素材需求交给创作者决定。
|
|
94
|
+
|
|
95
|
+
## 命令
|
|
96
|
+
|
|
97
|
+
命令由 [edit_tool.py](scripts/edit_tool.py) 提供:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
python3 <本技能目录>/scripts/edit_tool.py check <剧集/EP001> --project-root <project>
|
|
101
|
+
python3 <本技能目录>/scripts/edit_tool.py render <剧集/EP001> --project-root <project> [--no-subtitles] [--subtitles ffmpeg|remotion] [--remotion-concurrency N]
|
|
102
|
+
python3 <本技能目录>/scripts/edit_tool.py verify <剧集/EP001> --project-root <project>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
`check` 只核对不渲染:素材是否比剪辑单新(重出之后字幕时间必须重测)、区间自洽、`MOTION-...` 解析、文件存在、区间不越过素材时长、
|
|
106
|
+
同源区间不重叠、字幕文字能在 `剧本.md` 里找到。其中「区间不越过素材时长」需要 `ffprobe`,
|
|
107
|
+
没有时这一项报「未测」并说明原因,不静默跳过。`render` 按剪辑单切段、拼接、烧字幕、统一响度,
|
|
108
|
+
输出 `剧集/<EP>/制作成果/成片/`。`verify` 只测量已经渲染出来的成片并回报数字,不改文件、
|
|
109
|
+
不给质量结论。
|
|
110
|
+
|
|
111
|
+
字幕默认由带 libass 的 ffmpeg 烧录。`--subtitles remotion` 换成一条排版可调的
|
|
112
|
+
路线,代价是装一次 Node 依赖,而且叠层要**逐帧过无头浏览器**渲整部成片——慢且吃内存,
|
|
113
|
+
并发默认压在 2(`--remotion-concurrency` 可调,调高前先量本机)。取舍见
|
|
114
|
+
[声音、字幕与音乐](references/sound-and-subtitles.md),装法见
|
|
115
|
+
[Remotion 字幕叠层](assets/remotion/README.md)。
|
|
116
|
+
|
|
117
|
+
`render` 保留切好的中间文件。它只切段、硬拼接、统一字幕样式、接镜校正和整片响度,
|
|
118
|
+
不执行 `声音` 行中的混音方案,也不按交付规格自动缩放或改帧率。需要混音、逐镜字幕避让、
|
|
119
|
+
转场或画幅转换时用外部工具完成并记录,验收实际交付文件。
|
|
120
|
+
|
|
121
|
+
## 按需知识
|
|
122
|
+
|
|
123
|
+
先读本 SKILL、当前分镜、视频提示词和素材;有字幕时读取剧本原文。按需要打开参考资料:
|
|
124
|
+
|
|
125
|
+
- 阶段边界与规则分级:[阶段契约](references/stage-contract.md)
|
|
126
|
+
- 可用带、生成缺陷与逐镜取舍:[生成素材的可用带](references/generated-footage.md)
|
|
127
|
+
- 入出点、镜序与节奏:[入出点与镜序](references/cut-craft.md)
|
|
128
|
+
- 声音接缝、字幕与音乐落点:[声音、字幕与音乐](references/sound-and-subtitles.md)
|
|
129
|
+
- 成片可测项与验收:[交付与验收](references/delivery-verify.md)
|
|
130
|
+
- 剪辑单成稿样例:[剪辑单样例](assets/剪辑单.md)
|
|
131
|
+
- 可选的 Remotion 字幕排版:[Remotion 字幕叠层](assets/remotion/README.md)
|
|
132
|
+
|
|
133
|
+
## 修订
|
|
134
|
+
|
|
135
|
+
保留未受影响的 `CUT-...` ID。改一段的入出点不触碰其它段;删一段时说明它承担的信息由哪一段
|
|
136
|
+
接住,或明确说明这条信息在成片里不再出现。重新渲染前先更新剪辑单,不要让成片领先于文档。
|
|
137
|
+
|
|
138
|
+
## 完成
|
|
139
|
+
|
|
140
|
+
每个 `CUT-...` 都绑定真实素材与自洽区间,台词在成片里完整可听,字幕逐字等于剧本原文,
|
|
141
|
+
剪辑点没有可听的音床硬切,成片响度落在交付目标上,未采用镜头都写明理由并区分了缺文件与缺质量,
|
|
142
|
+
即完成。目标时长与实际时长的差、以及仍然值得再剪一版的地方,写在末尾报告里交给创作者判断。
|
|
143
|
+
|
|
144
|
+
## 安装维护
|
|
145
|
+
|
|
146
|
+
只有安装、升级或排障时运行 `python3 scripts/selftest.py`。
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Remotion 字幕叠层
|
|
2
|
+
|
|
3
|
+
`$short-drama-edit` 的**可选**字幕渲染路线。默认路线是 ffmpeg + libass,零依赖;这一条排版
|
|
4
|
+
更好,但要装 Node 依赖,而且慢得多、吃内存——先看下面的「代价」。
|
|
5
|
+
|
|
6
|
+
## 为什么会有第二条路
|
|
7
|
+
|
|
8
|
+
ASS 的字号是相对 `PlayRes` 的单位,渲染时再缩放一次,这层间接每次都要重推一遍,推错了
|
|
9
|
+
在数字上看不出来(见[声音、字幕与音乐](../../references/sound-and-subtitles.md))。这里字号、
|
|
10
|
+
描边、行距、安全区、折行都是 CSS,写的是画面像素,改完在 `npx remotion studio` 当场能看。
|
|
11
|
+
|
|
12
|
+
## 装一次
|
|
13
|
+
|
|
14
|
+
工作区在**项目之外**(默认 `~/.cache/short-drama-edit/remotion`)。`edit_tool.py` 每次运行都会
|
|
15
|
+
把本目录的源码同步过去,所以要改排版就改这里的 `src/`,不要改工作区里的副本——它会被覆盖。
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
cd ~/.cache/short-drama-edit/remotion && npm install
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`node_modules` 不进项目也不进本仓库。
|
|
22
|
+
|
|
23
|
+
## 用
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
python3 <本技能目录>/scripts/edit_tool.py render <剧集/EP001> --project-root <project> --subtitles remotion
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
它渲染出一段**透明**的字幕层(VP8 + alpha),再由 ffmpeg 叠到未经改动的画面上。画面本身
|
|
30
|
+
不经过浏览器重绘,所以不多一次画质损失。
|
|
31
|
+
|
|
32
|
+
## 代价
|
|
33
|
+
|
|
34
|
+
叠层**逐帧**渲,长度等于整部成片:一分钟竖屏片一千多帧 1080×1920,每帧一次无头浏览器
|
|
35
|
+
截图,没字幕的帧照渲。透明还要求 PNG 抓帧加 VP8 编码,Remotion 的性能文档把这两样都列为
|
|
36
|
+
慢环节。默认路线是一次滤镜的事,这条是分钟级。
|
|
37
|
+
|
|
38
|
+
内存才是会出事的地方。Remotion 默认按 CPU 核数开浏览器实例,每个各持一整帧——10 核 8 GB
|
|
39
|
+
的机器上内存打满,整机停止响应,本套件就这么卡死过一次。所以 `edit_tool.py` 固定传
|
|
40
|
+
`--concurrency`,默认 2。要提高先量本机,别凭核数拍:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
cd ~/.cache/short-drama-edit/remotion && npx remotion benchmark
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 许可证
|
|
47
|
+
|
|
48
|
+
Remotion 个人与小团队免费,超出规模需商业授权,条款以 [remotion.dev](https://www.remotion.dev/)
|
|
49
|
+
为准。本套件是 MIT,不包含也不代理这项授权,也不会替你安装它——缺依赖时只报错并给出命令。
|
|
50
|
+
默认路线不涉及这件事。
|
|
51
|
+
|
|
52
|
+
## 文件
|
|
53
|
+
|
|
54
|
+
| 文件 | 作用 |
|
|
55
|
+
|---|---|
|
|
56
|
+
| `src/schema.ts` | 叠层的输入形状:cues、画幅、fps、字号与安全区比例 |
|
|
57
|
+
| `src/Subtitles.tsx` | 排版本身。所有尺寸都是画面高度的比例,同一组数值对 768×1344 和 1080×1920 都成立 |
|
|
58
|
+
| `src/Root.tsx` | 合成注册;画幅、帧率、时长由调用方通过 `--props` 传入 |
|
|
59
|
+
| `src/font.ts` | 渲染前等字体就绪,并验证字体族真的存在——装不上时报错,而不是悄悄换一款字体出片 |
|
|
60
|
+
| `remotion.config.ts` | 固定成带 alpha 的输出,叠层必须透明 |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "short-drama-subtitles",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "Remotion subtitle layer for short-drama-edit. Renders a transparent overlay from cues.json.",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"render": "remotion render Subtitles"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@remotion/cli": "4.0.418",
|
|
11
|
+
"react": "19.0.0",
|
|
12
|
+
"react-dom": "19.0.0",
|
|
13
|
+
"remotion": "4.0.418"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Composition } from "remotion";
|
|
3
|
+
import { Subtitles } from "./Subtitles";
|
|
4
|
+
import { defaultProps, SubtitleProps } from "./schema";
|
|
5
|
+
|
|
6
|
+
export const RemotionRoot: React.FC = () => {
|
|
7
|
+
return (
|
|
8
|
+
<Composition
|
|
9
|
+
id="Subtitles"
|
|
10
|
+
component={Subtitles}
|
|
11
|
+
defaultProps={defaultProps}
|
|
12
|
+
// The caller passes the real frame, fps and length through --props; these
|
|
13
|
+
// stand in only when the composition is opened in the studio by hand.
|
|
14
|
+
durationInFrames={Math.max(1, Math.round(defaultProps.durationInSeconds * defaultProps.fps))}
|
|
15
|
+
fps={defaultProps.fps}
|
|
16
|
+
width={defaultProps.width}
|
|
17
|
+
height={defaultProps.height}
|
|
18
|
+
calculateMetadata={({ props }: { props: SubtitleProps }) => ({
|
|
19
|
+
durationInFrames: Math.max(1, Math.round(props.durationInSeconds * props.fps)),
|
|
20
|
+
fps: props.fps,
|
|
21
|
+
width: props.width,
|
|
22
|
+
height: props.height,
|
|
23
|
+
})}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
};
|