@softure-ai/marketing-kit 0.6.0 → 0.8.0

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.
Files changed (107) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +90 -11
  3. package/dist/cli/footage.d.ts.map +1 -1
  4. package/dist/cli/footage.js +5 -2
  5. package/dist/cli/footage.js.map +1 -1
  6. package/dist/compose/compose.d.ts.map +1 -1
  7. package/dist/compose/compose.js +3 -3
  8. package/dist/compose/compose.js.map +1 -1
  9. package/dist/compose/timeline.d.ts +16 -0
  10. package/dist/compose/timeline.d.ts.map +1 -1
  11. package/dist/compose/timeline.js +17 -1
  12. package/dist/compose/timeline.js.map +1 -1
  13. package/dist/config/config.d.ts.map +1 -1
  14. package/dist/config/config.js +18 -2
  15. package/dist/config/config.js.map +1 -1
  16. package/dist/config/schema.d.ts +16 -0
  17. package/dist/config/schema.d.ts.map +1 -1
  18. package/dist/config/schema.js +50 -3
  19. package/dist/config/schema.js.map +1 -1
  20. package/dist/footage/captions.d.ts +5 -1
  21. package/dist/footage/captions.d.ts.map +1 -1
  22. package/dist/footage/captions.js +6 -2
  23. package/dist/footage/captions.js.map +1 -1
  24. package/dist/footage/compose.d.ts +13 -2
  25. package/dist/footage/compose.d.ts.map +1 -1
  26. package/dist/footage/compose.js +75 -23
  27. package/dist/footage/compose.js.map +1 -1
  28. package/dist/footage/cuts.d.ts +44 -0
  29. package/dist/footage/cuts.d.ts.map +1 -0
  30. package/dist/footage/cuts.js +83 -0
  31. package/dist/footage/cuts.js.map +1 -0
  32. package/dist/footage/draft.d.ts +17 -3
  33. package/dist/footage/draft.d.ts.map +1 -1
  34. package/dist/footage/draft.js +28 -14
  35. package/dist/footage/draft.js.map +1 -1
  36. package/dist/footage/edl.d.ts +2 -1
  37. package/dist/footage/edl.d.ts.map +1 -1
  38. package/dist/footage/edl.js +5 -2
  39. package/dist/footage/edl.js.map +1 -1
  40. package/dist/footage/film.d.ts +42 -3
  41. package/dist/footage/film.d.ts.map +1 -1
  42. package/dist/footage/film.js +7 -1
  43. package/dist/footage/film.js.map +1 -1
  44. package/dist/footage/loudness.d.ts +20 -3
  45. package/dist/footage/loudness.d.ts.map +1 -1
  46. package/dist/footage/loudness.js +36 -18
  47. package/dist/footage/loudness.js.map +1 -1
  48. package/dist/footage/music.d.ts +3 -0
  49. package/dist/footage/music.d.ts.map +1 -1
  50. package/dist/footage/music.js +5 -0
  51. package/dist/footage/music.js.map +1 -1
  52. package/dist/footage/normalize.d.ts +27 -7
  53. package/dist/footage/normalize.d.ts.map +1 -1
  54. package/dist/footage/normalize.js +39 -19
  55. package/dist/footage/normalize.js.map +1 -1
  56. package/dist/footage/picture.d.ts +42 -0
  57. package/dist/footage/picture.d.ts.map +1 -0
  58. package/dist/footage/picture.js +141 -0
  59. package/dist/footage/picture.js.map +1 -0
  60. package/dist/footage/pipeline.d.ts +55 -1
  61. package/dist/footage/pipeline.d.ts.map +1 -1
  62. package/dist/footage/pipeline.js +136 -19
  63. package/dist/footage/pipeline.js.map +1 -1
  64. package/dist/footage/publish.d.ts +4 -2
  65. package/dist/footage/publish.d.ts.map +1 -1
  66. package/dist/footage/publish.js +8 -5
  67. package/dist/footage/publish.js.map +1 -1
  68. package/dist/footage/render.d.ts +17 -2
  69. package/dist/footage/render.d.ts.map +1 -1
  70. package/dist/footage/render.js +62 -13
  71. package/dist/footage/render.js.map +1 -1
  72. package/dist/footage/tonemap-lut.d.ts +45 -0
  73. package/dist/footage/tonemap-lut.d.ts.map +1 -0
  74. package/dist/footage/tonemap-lut.js +100 -0
  75. package/dist/footage/tonemap-lut.js.map +1 -0
  76. package/dist/footage/tools.d.ts +4 -4
  77. package/dist/footage/tools.d.ts.map +1 -1
  78. package/dist/footage/tools.js +4 -4
  79. package/dist/footage/tools.js.map +1 -1
  80. package/dist/index.d.ts +9 -6
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +9 -6
  83. package/dist/index.js.map +1 -1
  84. package/docker/footage-worker.Dockerfile +1 -0
  85. package/package.json +1 -1
  86. package/schema/marketing.schema.json +105 -4
  87. package/src/cli/footage.ts +4 -2
  88. package/src/compose/compose.ts +13 -3
  89. package/src/compose/timeline.ts +27 -1
  90. package/src/config/config.ts +18 -2
  91. package/src/config/schema.ts +52 -3
  92. package/src/footage/captions.ts +6 -2
  93. package/src/footage/compose.ts +86 -23
  94. package/src/footage/cuts.ts +104 -0
  95. package/src/footage/draft.ts +43 -14
  96. package/src/footage/edl.ts +5 -2
  97. package/src/footage/film.ts +47 -4
  98. package/src/footage/loudness.ts +38 -16
  99. package/src/footage/music.ts +7 -0
  100. package/src/footage/normalize.ts +47 -22
  101. package/src/footage/picture.ts +179 -0
  102. package/src/footage/pipeline.ts +179 -22
  103. package/src/footage/publish.ts +8 -5
  104. package/src/footage/render.ts +72 -13
  105. package/src/footage/tonemap-lut.ts +109 -0
  106. package/src/footage/tools.ts +4 -4
  107. package/src/index.ts +37 -2
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ export { describeCharge, describeEstimate, produceVoiceover } from "./voice/prod
24
24
  export { findLastRecordingTime, waitForPace } from "./voice/pace.js";
25
25
  export { describeVoiceoverBatch, produceVoiceovers } from "./voice/batch.js";
26
26
  export { getPlaceholderKey, isPlaceholderKey, makePlaceholderWords, writePlaceholderVoiceover } from "./voice/placeholder.js";
27
- export { BROWSER_BAR_HEIGHT, DEVICE_KINDS, LAYOUTS, LAYOUT_NAMES, MIN_DESKTOP_WIDTH, TRANSITIONS, VIDEO_FORMATS, cameraPose, captionChunks, crossfadeArgs, fitScale, fitsFrame, getGeometry, getLayoutName, getTransitionSeconds, isDesktopViewport, resolveLayout, rewindFrames, transitionFrames, unionRect, widePose, } from "./compose/timeline.js";
27
+ export { BROWSER_BAR_HEIGHT, CAPTION_LINE_HEIGHT, CAPTION_PILL_PADDING, DEVICE_KINDS, LAYOUTS, LAYOUT_NAMES, MIN_DESKTOP_WIDTH, TRANSITIONS, VIDEO_FORMATS, cameraPose, captionChunks, crossfadeArgs, fitScale, fitsFrame, getCaptionPositionCss, getGeometry, getLayoutName, getTransitionSeconds, isDesktopViewport, resolveLayout, rewindFrames, transitionFrames, unionRect, widePose, } from "./compose/timeline.js";
28
28
  export { composeFilm, filmTimes, resolveCameraTweens, } from "./compose/compose.js";
29
29
  export { DEFAULT_OG_SIZE, countOgSlides, getDefaultOgSize, OG_TEMPLATE_IDS, getOgPalette, loadOgFonts, renderConfiguredOgImage, renderOgImage, } from "./og/index.js";
30
30
  export { buildPosts, postsMarkdown } from "./posts/posts.js";
@@ -34,10 +34,11 @@ export { getScreenshotFile, takePageScreenshot, takeScreenshots, } from "./scree
34
34
  export { MIN_FAILING_STATUS, SCREENSHOT_GATES, findScrollFailure, findSizeFailure, findStatusFailure } from "./screenshot/gates.js";
35
35
  export { findStorageStateProblem } from "./screenshot/storage-state.js";
36
36
  export { getScreenshotNames, getScreenshotShots } from "./config/screenshot-names.js";
37
- export { CLIP_FITS, CLIP_ROLES, CUT_TRANSITIONS, DEFAULT_CUT, DEFAULT_FILLERS, DEFAULT_MUSIC_VOLUME, DEFAULT_TRANSITIONS, CAPTION_PRESETS, CAPTION_STYLES, DEFAULT_EDIT, getDefaultFillers, getFootageEdit, } from "./footage/film.js";
37
+ export { CLIP_FITS, CLIP_ROLES, CUT_TRANSITIONS, DEFAULT_AUTO_THRESHOLD, JUMP_TRANSITIONS, DEFAULT_CUT, DEFAULT_FILLERS, DEFAULT_MUSIC_VOLUME, DEFAULT_TRANSITIONS, CAPTION_MIN_FONT_SCALE, CAPTION_PRESETS, CAPTION_STYLES, DEFAULT_EDIT, getDefaultFillers, getFootageEdit, } from "./footage/film.js";
38
38
  export { MIN_CLIP_SECONDS, describeProbe, findFootageProblems, getTrimmedDuration, normalizeRotation, probeFile, probeFootage, readFootageProbe, runFfprobe, } from "./footage/probe.js";
39
39
  export { MUSIC_FILE_TYPES, checkMusicFileType, describeAudioProbe, probeAudio, readAudioProbe, } from "./footage/audio.js";
40
40
  export { FOOTAGE_FPS, FOOTAGE_SAMPLE_RATE, X264_PRESETS, buildNormalizeArgs, buildVideoFilter, normalizeFootage, resolveFit, toneMapFilter, } from "./footage/normalize.js";
41
+ export { ensureToneMapLut, getToneMapLutName, getToneMapTransfer, TONE_MAP_LUT_SIZE } from "./footage/tonemap-lut.js";
41
42
  export { describePaidSteps, toPaidAudio, } from "./footage/providers.js";
42
43
  export { ELEVENLABS_MUSIC_MODEL, ELEVENLABS_STT_MODEL, createElevenLabsFootageProviders, createElevenLabsIsolationProvider, createElevenLabsMusicProvider, createElevenLabsSttProvider, getMusicLengthMs, readReportedCredits, readScribeResponse, } from "./footage/elevenlabs.js";
43
44
  export { createFakeIsolationProvider, createFakeMusicProvider, createFakeSttProvider, makePlaceholderTranscript, } from "./footage/fake.js";
@@ -46,17 +47,19 @@ export { footageCacheKey, getFootageCachePath, hashFile, readCachedTranscript }
46
47
  export { MIN_SEGMENT_SECONDS, SEGMENT_MOTIONS, buildEdl, diffEdl, edlSchema, findEdlProblems, getEdlDuration, getEdlJsonSchema, getSegmentStarts, getSoundSpan, isFiller, normalizeWord, readEdl, remapWords, validateEdl, } from "./footage/edl.js";
47
48
  export { findRetakes, splitFilmSentences, splitSentences } from "./footage/sentences.js";
48
49
  export { CAPTION_SAFE_ZONES, findMissingCaptionGlyphs, getCaptionPresetLayout, getCaptionSpans, getFootageCaptionLayout, phraseChunks, } from "./footage/captions.js";
50
+ export { CUT_THUMBNAIL, buildCutFrameArgs, chooseCutTransition, chooseCutTransitions, findAutoCuts, measureFrameDifference, } from "./footage/cuts.js";
49
51
  export { MAX_FRAMES, buildFrameArgs, extractFrames, getFrameTimes } from "./footage/frames.js";
50
- export { duckingKeyframes, getSpeechSpans, volumeExpression } from "./footage/music.js";
52
+ export { duckingKeyframes, getDuckingOptions, getSpeechSpans, volumeExpression } from "./footage/music.js";
51
53
  export { END_CARD_SECONDS, FADE_SECONDS, composeFootage, getFootageFilmSeconds, getSegmentScales } from "./footage/compose.js";
52
- export { buildCutPreviewArgs, buildLastFrameArgs, buildMusicArgs, buildSpeechArgs } from "./footage/render.js";
54
+ export { buildCutPreviewArgs, buildLastFrameArgs, buildMusicArgs, buildSpeechArgs, getSpeechCutOptions } from "./footage/render.js";
53
55
  export { FOOTAGE_DRAFT_FONT, FOOTAGE_DRAFT_WIDTH, buildFootageDraftArgs, buildFootageDraftCaptions, getFootageDraftFrame, planFootageDraft, renderFootageDraft, } from "./footage/draft.js";
54
- export { DEFAULT_LOUDNESS, buildLoudnessArgs, buildLoudnessMeasureArgs, isSilent, normalizeLoudness, readLoudnessMeasurement, } from "./footage/loudness.js";
56
+ export { buildPictureConcatArgs, buildPictureList, buildPicturePieceArgs, getPictureFrames, planFootagePicture, } from "./footage/picture.js";
57
+ export { DEFAULT_LOUDNESS, buildLoudnessArgs, buildLoudnessMeasureArgs, getLoudnessFilter, isSilent, measureLoudness, normalizeLoudness, readLoudnessMeasurement, } from "./footage/loudness.js";
55
58
  export { buildCoverArgs, buildFinishArgs, clampCoverSeconds, findFinishProblems, getCoverPath, getDefaultCoverSeconds, isFastStart, isPublishableAudio, isPublishableVideo, probeFilmFacts, readFilmFacts, readTopLevelBoxes, } from "./footage/publish.js";
56
59
  export { readFfmpegProgressSeconds, runFfmpeg, runProcess } from "./footage/process.js";
57
60
  export { estimateFootageFilm, findCachedStep, getDownloadPath, } from "./footage/paid.js";
58
61
  export { RENDER_MIN_FREE_BYTES, findLowDiskProblems, getFreeBytes, getRenderTempDir } from "./footage/disk.js";
59
62
  export { DRAFT_FILTERS, REQUIRED_DECODERS, REQUIRED_FILTERS, checkFootageTools, findBrowserProblem, readFfmpegListing } from "./footage/tools.js";
60
- export { cutFootage, getEdlPath, getFrame, prepareFootage, getFootageSentences, readEdlFile, readRenderPercent, renderFootage, renderFootageFilm, transcribeFootage, } from "./footage/pipeline.js";
63
+ export { CUTS_FILE, cutFootage, cutFootageFilm, describeCutMeasures, getEdlPath, getFrame, prepareFootage, getFootageSentences, readEdlFile, readRenderPercent, renderFootage, renderFootageFilm, transcribeFootage, } from "./footage/pipeline.js";
61
64
  export { formatMessage, getMarketingMessages, marketingMessages, } from "./messages/index.js";
62
65
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,oGAAoG;AACpG,uGAAuG;AACvG,wGAAwG;AACxG,wHAAwH;AACxH,wEAAwE;AACxE,qEAAqE;AACrE,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,SAAS,EACT,UAAU,EACV,sBAAsB,EACtB,eAAe,GAKhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,aAAa,EACb,eAAe,GAOhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EAET,mBAAmB,GAUpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAwE,MAAM,oBAAoB,CAAC;AACrI,OAAO,EAAE,kBAAkB,EAA0B,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAsC,MAAM,oBAAoB,CAAC;AAC5G,OAAO,EACL,IAAI,EACJ,cAAc,EACd,UAAU,GAYX,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAiB,MAAM,gBAAgB,CAAC;AAC1J,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ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ACjB,wBAAwB,EACxB,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,uBAAuB,GAKxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,iBAAiB,GAElB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,SAAS,EAAE,UAAU,EAAmE,MAAM,sBAAsB,CAAC;AACzJ,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,eAAe,GAKhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,YAAY,EAAE,gBAAgB,EAAwB,MAAM,mBAAmB,CAAC;AACrI,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAA4B,MAAM,oBAAoB,CAAC;AAC5K,OAAO,EACL,SAAS,EACT,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,QAAQ,EACR,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,GAWlB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,iBAAiB,GAGlB,MAAM,qBAAqB,CAAC"}
@@ -33,3 +33,4 @@ ENV HYPERFRAMES_BROWSER_PATH=/opt/chrome-headless-shell-linux64/chrome-headless-
33
33
  # ENV TMPDIR=/data/tmp
34
34
  # (or renderFootage's tempDir). In a CPU-limited container set PRODUCER_MAX_WORKERS to the CPU quota; hyperframes
35
35
  # otherwise starts a capture worker per host core. HYPERFRAMES_EXTRACT_CACHE_MAX_MB caps the extraction cache (2048).
36
+ # Memory: a render needs about 0.75 GiB plus 10 MB per second of film (README, "Footage films in a worker").
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softure-ai/marketing-kit",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "SOFTURE AI marketing kit: a CLI that turns a project's real app into a vertical film (cached voiceover, frame-by-frame recording, HTML composition, hyperframes render) plus per-platform post copy and OG images.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -2752,13 +2752,14 @@
2752
2752
  "properties": {
2753
2753
  "jump": {
2754
2754
  "default": "cut",
2755
- "description": "A cut inside one talking clip: cut (the default), fade, zoom (a punch-in) or whoosh.",
2755
+ "description": "A cut inside one talking clip: cut (the default), fade, zoom (a punch-in), whoosh, or auto (zoom when the frames on both sides look alike, fade when the camera moved; measured when the cut is built).",
2756
2756
  "type": "string",
2757
2757
  "enum": [
2758
2758
  "cut",
2759
2759
  "fade",
2760
2760
  "zoom",
2761
- "whoosh"
2761
+ "whoosh",
2762
+ "auto"
2762
2763
  ]
2763
2764
  },
2764
2765
  "clip": {
@@ -2771,6 +2772,12 @@
2771
2772
  "zoom",
2772
2773
  "whoosh"
2773
2774
  ]
2775
+ },
2776
+ "autoThreshold": {
2777
+ "description": "With jump auto: the frame difference (0-1) from which a jump cut fades instead of zooming (default 0.08).",
2778
+ "type": "number",
2779
+ "minimum": 0,
2780
+ "maximum": 1
2774
2781
  }
2775
2782
  },
2776
2783
  "additionalProperties": false
@@ -2823,6 +2830,18 @@
2823
2830
  "type": "number",
2824
2831
  "minimum": 0,
2825
2832
  "maximum": 1
2833
+ },
2834
+ "attack": {
2835
+ "description": "Seconds the music takes to go down before speech (0-5, default 0.25).",
2836
+ "type": "number",
2837
+ "minimum": 0,
2838
+ "maximum": 5
2839
+ },
2840
+ "release": {
2841
+ "description": "Seconds the music takes to come back up after speech (0-5, default 0.5).",
2842
+ "type": "number",
2843
+ "minimum": 0,
2844
+ "maximum": 5
2826
2845
  }
2827
2846
  },
2828
2847
  "additionalProperties": false
@@ -2851,6 +2870,12 @@
2851
2870
  "all"
2852
2871
  ]
2853
2872
  },
2873
+ "captionMaxLines": {
2874
+ "description": "The most lines a caption card may take (1-4): the render shrinks a longer card's font, to 70 % at most; without it, no limit.",
2875
+ "type": "integer",
2876
+ "minimum": 1,
2877
+ "maximum": 4
2878
+ },
2854
2879
  "edit": {
2855
2880
  "description": "The cut's look; the defaults read as an ordinary phone video.",
2856
2881
  "default": {},
@@ -2858,10 +2883,17 @@
2858
2883
  "properties": {
2859
2884
  "zoomPercent": {
2860
2885
  "default": 108,
2861
- "description": "How far a zoom cut punches in (105-110 %, default 108).",
2886
+ "description": "How far a zoom cut punches in (105-112 %, default 108).",
2862
2887
  "type": "number",
2863
2888
  "minimum": 105,
2864
- "maximum": 110
2889
+ "maximum": 112
2890
+ },
2891
+ "zoomEaseFrames": {
2892
+ "default": 0,
2893
+ "description": "Frames at 30 fps a zoom cut eases into its scale over (0-15, default 0: a step; 3-5 reads as a smooth punch-in).",
2894
+ "type": "integer",
2895
+ "minimum": 0,
2896
+ "maximum": 15
2865
2897
  },
2866
2898
  "fadeFrames": {
2867
2899
  "default": 10,
@@ -2881,6 +2913,18 @@
2881
2913
  "default": false,
2882
2914
  "description": "Play the whoosh and pop as the end card comes in (default false).",
2883
2915
  "type": "boolean"
2916
+ },
2917
+ "cutAudioFadeMs": {
2918
+ "default": 20,
2919
+ "description": "The speech track's fade at every cut in milliseconds (10-100, default 20).",
2920
+ "type": "integer",
2921
+ "minimum": 10,
2922
+ "maximum": 100
2923
+ },
2924
+ "cutAudioCrossfade": {
2925
+ "default": false,
2926
+ "description": "Cross-fade the sound of the two sides of every cut over cutAudioFadeMs, centred on the cut, instead of a short dip to silence (default false).",
2927
+ "type": "boolean"
2884
2928
  }
2885
2929
  },
2886
2930
  "additionalProperties": false
@@ -2944,6 +2988,39 @@
2944
2988
  }
2945
2989
  ]
2946
2990
  },
2991
+ "mixLoudness": {
2992
+ "default": {
2993
+ "target": -14,
2994
+ "truePeak": -1
2995
+ },
2996
+ "description": "The finished film's mix (speech and music), measured after the render and normalized in two passes; false leaves the mix as rendered. Default -14 LUFS, -1 dBTP.",
2997
+ "anyOf": [
2998
+ {
2999
+ "type": "boolean",
3000
+ "const": false
3001
+ },
3002
+ {
3003
+ "type": "object",
3004
+ "properties": {
3005
+ "target": {
3006
+ "default": -14,
3007
+ "description": "Integrated loudness in LUFS (-40 to -5, default -14).",
3008
+ "type": "number",
3009
+ "minimum": -40,
3010
+ "maximum": -5
3011
+ },
3012
+ "truePeak": {
3013
+ "default": -1,
3014
+ "description": "The highest true peak in dBTP (-9 to 0, default -1).",
3015
+ "type": "number",
3016
+ "minimum": -9,
3017
+ "maximum": 0
3018
+ }
3019
+ },
3020
+ "additionalProperties": false
3021
+ }
3022
+ ]
3023
+ },
2947
3024
  "cover": {
2948
3025
  "default": {},
2949
3026
  "description": "The cover JPG written next to the film (its name with .jpg); false writes none.",
@@ -7306,6 +7383,12 @@
7306
7383
  "minimum": 0,
7307
7384
  "maximum": 1920
7308
7385
  },
7386
+ "bottom": {
7387
+ "description": "The caption's bottom edge, in px from the frame's bottom: the box grows upwards from it and top is ignored. Default none.",
7388
+ "type": "integer",
7389
+ "minimum": 0,
7390
+ "maximum": 1920
7391
+ },
7309
7392
  "left": {
7310
7393
  "description": "The caption's left margin, in px from the frame's left edge. Default 60.",
7311
7394
  "type": "integer",
@@ -7432,6 +7515,12 @@
7432
7515
  "minimum": 0,
7433
7516
  "maximum": 1080
7434
7517
  },
7518
+ "bottom": {
7519
+ "description": "The caption's bottom edge, in px from the frame's bottom: the box grows upwards from it and top is ignored. Default none.",
7520
+ "type": "integer",
7521
+ "minimum": 0,
7522
+ "maximum": 1080
7523
+ },
7435
7524
  "left": {
7436
7525
  "description": "The caption's left margin, in px from the frame's left edge. Default 60.",
7437
7526
  "type": "integer",
@@ -7558,6 +7647,12 @@
7558
7647
  "minimum": 0,
7559
7648
  "maximum": 1080
7560
7649
  },
7650
+ "bottom": {
7651
+ "description": "The caption's bottom edge, in px from the frame's bottom: the box grows upwards from it and top is ignored. Default none.",
7652
+ "type": "integer",
7653
+ "minimum": 0,
7654
+ "maximum": 1080
7655
+ },
7561
7656
  "left": {
7562
7657
  "description": "The caption's left margin, in px from the frame's left edge. Default 1100.",
7563
7658
  "type": "integer",
@@ -7684,6 +7779,12 @@
7684
7779
  "minimum": 0,
7685
7780
  "maximum": 1080
7686
7781
  },
7782
+ "bottom": {
7783
+ "description": "The caption's bottom edge, in px from the frame's bottom: the box grows upwards from it and top is ignored. Default none.",
7784
+ "type": "integer",
7785
+ "minimum": 0,
7786
+ "maximum": 1080
7787
+ },
7687
7788
  "left": {
7688
7789
  "description": "The caption's left margin, in px from the frame's left edge. Default 260.",
7689
7790
  "type": "integer",
@@ -4,7 +4,7 @@ import { join } from "node:path";
4
4
  import { findFootage, findMissingFootageFiles, formatConfigIssues, type FootageConfig, type MarketingConfig } from "../config/config.js";
5
5
  import { createElevenLabsFootageProviders } from "../footage/elevenlabs.js";
6
6
  import { findRetakes } from "../footage/sentences.js";
7
- import { cutFootage, getEdlPath, getFootageSentences, prepareFootage, readEdlFile, renderFootage, transcribeFootage, type RenderFootageOptions } from "../footage/pipeline.js";
7
+ import { cutFootageFilm, describeCutMeasures, getEdlPath, getFootageSentences, prepareFootage, readEdlFile, renderFootage, transcribeFootage, type RenderFootageOptions } from "../footage/pipeline.js";
8
8
  import { checkFootageTools } from "../footage/tools.js";
9
9
  import { postsMarkdown } from "../posts/posts.js";
10
10
  import { fail } from "./failure.js";
@@ -69,8 +69,10 @@ export async function runFootage(config: MarketingConfig, options: FootageOption
69
69
  const isRecut = options.step === "cut" || (options.step === "all" && !existsSync(edlPath));
70
70
  let edl;
71
71
  if (isRecut) {
72
- edl = cutFootage(film, clips.value, transcript.value.words, edlPath);
72
+ const cut = await cutFootageFilm(film, clips.value, transcript.value.words, edlPath);
73
+ edl = cut.edl;
73
74
  console.log(`cut: ${edl.segments.length} segments written to ${edlPath}; check or edit it, then softure-marketing footage ${film.id} --step=render.`);
75
+ for (const line of describeCutMeasures(cut.cuts)) console.log(` auto transition ${line}`);
74
76
  // Suggestions only: the EDL keeps every sentence until someone drops one.
75
77
  for (const suggestion of findRetakes(getFootageSentences(clips.value, transcript.value.words))) {
76
78
  console.log(` maybe drop ${suggestion.sentence} (${suggestion.kind}): ${suggestion.reason}`);
@@ -4,7 +4,17 @@ import type { Film } from "../film.js";
4
4
  import { formatMessage, type MarketingMessages } from "../messages/index.js";
5
5
  import type { RecordingLog } from "../record/record.js";
6
6
  import { escapeHtml, fontFaces, fontStack } from "./html.js";
7
- import { BROWSER_BAR_HEIGHT, cameraPose, captionChunks, getTransitionSeconds, widePose, type CameraPose, type Geometry } from "./timeline.js";
7
+ import {
8
+ BROWSER_BAR_HEIGHT,
9
+ cameraPose,
10
+ captionChunks,
11
+ getCaptionPillCss,
12
+ getCaptionPositionCss,
13
+ getTransitionSeconds,
14
+ widePose,
15
+ type CameraPose,
16
+ type Geometry,
17
+ } from "./timeline.js";
8
18
  import type { BeatVoice } from "../voice/voiceover.js";
9
19
 
10
20
  /**
@@ -323,8 +333,8 @@ ${windowParts.css}
323
333
  .touch{position:absolute;width:0;height:0}
324
334
  .touch .dot{position:absolute;left:-34px;top:-34px;width:68px;height:68px;border-radius:50%;background:rgba(232,238,245,.34);border:2px solid rgba(232,238,245,.75);opacity:0}
325
335
  .touch .ring{position:absolute;left:-34px;top:-34px;width:68px;height:68px;border-radius:50%;border:3px solid ${c.accent};opacity:0}
326
- .caption{position:absolute;left:${captionBox.left}px;right:${captionBox.right}px;top:${captionBox.top}px;display:flex;justify-content:center}
327
- .pill{font-weight:650;font-size:${captionBox.fontSize}px;line-height:1.18;letter-spacing:-.01em;text-align:center;padding:16px 28px;border-radius:22px;background:${c.captionBackground};box-shadow:0 14px 44px rgba(0,0,0,.5);color:${c.captionText}}
336
+ .caption{position:absolute;left:${captionBox.left}px;right:${captionBox.right}px;${getCaptionPositionCss(captionBox)};display:flex;justify-content:center}
337
+ .pill{${getCaptionPillCss(captionBox.fontSize)};border-radius:22px;background:${c.captionBackground};box-shadow:0 14px 44px rgba(0,0,0,.5);color:${c.captionText}}
328
338
  .pill span{display:inline-block}
329
339
  .persona{position:absolute;left:${px(persona.left)};right:${px(persona.right)};top:${persona.top}px;display:flex;justify-content:center}
330
340
  .persona .card{display:flex;align-items:center;gap:20px;padding:14px 30px 14px 14px;border-radius:999px;background:rgba(19,26,35,.9);border:1px solid rgba(130,150,173,.28)}
@@ -52,6 +52,27 @@ export interface TextBox {
52
52
 
53
53
  export interface CaptionLayout extends TextBox {
54
54
  fontSize: number;
55
+ /**
56
+ * The box's bottom edge, in px from the frame's bottom. When set, the box is anchored by its foot and grows upwards
57
+ * with its lines, and `top` is ignored; absent: the box hangs from `top` and grows downwards.
58
+ */
59
+ bottom?: number;
60
+ }
61
+
62
+ /** The caption text's line height, in font sizes (the pill and the phrase alike). */
63
+ export const CAPTION_LINE_HEIGHT = 1.18;
64
+
65
+ /** The highlight pill's padding around its text, in px. */
66
+ export const CAPTION_PILL_PADDING = { y: 16, x: 28 } as const;
67
+
68
+ /** The CSS that places a caption box: by its foot (`bottom`) when the layout gives one, else by its top edge. */
69
+ export function getCaptionPositionCss(caption: CaptionLayout): string {
70
+ return caption.bottom === undefined ? `top:${caption.top}px` : `bottom:${caption.bottom}px`;
71
+ }
72
+
73
+ /** The highlight pill's text CSS: weight, size, line height and padding (the colours are the caller's). */
74
+ export function getCaptionPillCss(fontSize: number): string {
75
+ return `font-weight:650;font-size:${fontSize}px;line-height:${CAPTION_LINE_HEIGHT};letter-spacing:-.01em;text-align:center;padding:${CAPTION_PILL_PADDING.y}px ${CAPTION_PILL_PADDING.x}px`;
55
76
  }
56
77
 
57
78
  export interface EndCardLayout extends TextBox {
@@ -144,6 +165,11 @@ function mergeTextBox(base: TextBox, override: Partial<TextBox> = {}): TextBox {
144
165
  return { top: override.top ?? base.top, left: override.left ?? base.left, right: override.right ?? base.right };
145
166
  }
146
167
 
168
+ function resolveCaption(base: CaptionLayout, override: Partial<CaptionLayout> = {}): CaptionLayout {
169
+ const bottom = override.bottom ?? base.bottom;
170
+ return { ...mergeTextBox(base, override), ...(bottom === undefined ? {} : { bottom }), fontSize: override.fontSize ?? base.fontSize };
171
+ }
172
+
147
173
  /** A layout with a project's override merged in, key by key; always fresh objects, never the table's. */
148
174
  export function resolveLayout(name: LayoutName, override: LayoutOverride = {}): Layout {
149
175
  const base = LAYOUTS[name];
@@ -155,7 +181,7 @@ export function resolveLayout(name: LayoutName, override: LayoutOverride = {}):
155
181
  frame: { ...base.frame },
156
182
  screenBox: { ...base.screenBox },
157
183
  cameraTarget: { ...base.cameraTarget },
158
- caption: { ...mergeTextBox(base.caption, override.caption), fontSize: override.caption?.fontSize ?? base.caption.fontSize },
184
+ caption: resolveCaption(base.caption, override.caption),
159
185
  persona: mergeTextBox(base.persona, override.persona),
160
186
  endCard: {
161
187
  ...mergeTextBox(base.endCard, endCard),
@@ -236,13 +236,29 @@ function resolveFootage(data: MarketingJson, at: (relative: string) => string):
236
236
  music:
237
237
  film.music === undefined
238
238
  ? { source: { kind: "none" }, ...DEFAULT_MUSIC_VOLUME }
239
- : { source: resolveMusicSource(film.music, at), volume: film.music.volume, duckedVolume: film.music.duckedVolume },
239
+ : {
240
+ source: resolveMusicSource(film.music, at),
241
+ volume: film.music.volume,
242
+ duckedVolume: film.music.duckedVolume,
243
+ ...(film.music.attack === undefined ? {} : { attack: film.music.attack }),
244
+ ...(film.music.release === undefined ? {} : { release: film.music.release }),
245
+ },
240
246
  captions: film.captions,
241
247
  captionStyle: film.captionStyle,
242
248
  ...(film.captionPreset === undefined ? {} : { captionPreset: film.captionPreset }),
243
- edit: { zoomPercent: film.edit.zoomPercent, fadeFrames: film.edit.fadeFrames, kenBurnsPercent: film.edit.kenBurnsPercent, isEndCardWhoosh: film.edit.endCardWhoosh },
249
+ ...(film.captionMaxLines === undefined ? {} : { captionMaxLines: film.captionMaxLines }),
250
+ edit: {
251
+ zoomPercent: film.edit.zoomPercent,
252
+ zoomEaseFrames: film.edit.zoomEaseFrames,
253
+ fadeFrames: film.edit.fadeFrames,
254
+ kenBurnsPercent: film.edit.kenBurnsPercent,
255
+ isEndCardWhoosh: film.edit.endCardWhoosh,
256
+ cutAudioFadeMs: film.edit.cutAudioFadeMs,
257
+ isCutAudioCrossfade: film.edit.cutAudioCrossfade,
258
+ },
244
259
  endCard: film.endCard ?? null,
245
260
  loudness: film.loudness === false ? null : film.loudness,
261
+ mixLoudness: film.mixLoudness === false ? null : film.mixLoudness,
246
262
  cover: film.cover === false ? null : film.cover,
247
263
  post:
248
264
  post === undefined
@@ -14,7 +14,7 @@ import {
14
14
  } from "../compose/timeline.js";
15
15
  import { bigNumberDataSchema, carouselDataSchema, headlineChartDataSchema, headlineCtaDataSchema } from "../og/templates/schemas.js";
16
16
  import { CHANNEL_CODE_MAX_LENGTH, CHANNEL_CODE_PATTERN, DEFAULT_LINK_IN_BIO, PLATFORMS } from "../platforms.js";
17
- import { CAPTION_PRESETS, CAPTION_STYLES, CLIP_FITS, CLIP_ROLES, CUT_TRANSITIONS } from "../footage/film.js";
17
+ import { CAPTION_PRESETS, CAPTION_STYLES, CLIP_FITS, CLIP_ROLES, CUT_TRANSITIONS, JUMP_TRANSITIONS } from "../footage/film.js";
18
18
  import { normalizeKeyTerms } from "../footage/keyterms.js";
19
19
  import { ELEVENLABS_DEFAULT_MODEL } from "../voice/voiceover.js";
20
20
  import { actionSchema, type SceneAction } from "./actions-schema.js";
@@ -520,8 +520,19 @@ const footageSchema = z
520
520
  maxSeconds: z.number().min(1).max(600).optional().describe("The cut's longest length in seconds; later segments are shortened or dropped."),
521
521
  transitions: z
522
522
  .strictObject({
523
- jump: z.enum(CUT_TRANSITIONS).default("cut").describe("A cut inside one talking clip: cut (the default), fade, zoom (a punch-in) or whoosh."),
523
+ jump: z
524
+ .enum(JUMP_TRANSITIONS)
525
+ .default("cut")
526
+ .describe(
527
+ "A cut inside one talking clip: cut (the default), fade, zoom (a punch-in), whoosh, or auto (zoom when the frames on both sides look alike, fade when the camera moved; measured when the cut is built).",
528
+ ),
524
529
  clip: z.enum(CUT_TRANSITIONS).default("cut").describe("A cut from one clip to the next: cut (the default), fade, zoom or whoosh."),
530
+ autoThreshold: z
531
+ .number()
532
+ .min(0)
533
+ .max(1)
534
+ .optional()
535
+ .describe("With jump auto: the frame difference (0-1) from which a jump cut fades instead of zooming (default 0.08)."),
525
536
  })
526
537
  .prefault({})
527
538
  .describe("Default transitions by kind of cut; each segment of the EDL can name its own."),
@@ -538,6 +549,8 @@ const footageSchema = z
538
549
  .describe("ElevenLabs Video to Music scored to the cut itself (paid with --commit, cached)."),
539
550
  volume: volume.default(0.35).describe("The music's volume between sentences (0-1, default 0.35)."),
540
551
  duckedVolume: volume.default(0.1).describe("The music's volume under speech (0-1, default 0.1)."),
552
+ attack: z.number().min(0).max(5).optional().describe("Seconds the music takes to go down before speech (0-5, default 0.25)."),
553
+ release: z.number().min(0).max(5).optional().describe("Seconds the music takes to come back up after speech (0-5, default 0.5)."),
541
554
  })
542
555
  .superRefine((music, context) => {
543
556
  const sources = [music.file, music.prompt, music.fromVideo].filter((source) => source !== undefined).length;
@@ -554,12 +567,31 @@ const footageSchema = z
554
567
  .enum(CAPTION_PRESETS)
555
568
  .optional()
556
569
  .describe("Keeps a 9:16 film's captions inside a platform's safe zone: reels, shorts, tiktok or all; without it, layout decides."),
570
+ captionMaxLines: z
571
+ .number()
572
+ .int()
573
+ .min(1)
574
+ .max(4)
575
+ .optional()
576
+ .describe("The most lines a caption card may take (1-4): the render shrinks a longer card's font, to 70 % at most; without it, no limit."),
557
577
  edit: z
558
578
  .strictObject({
559
- zoomPercent: z.number().min(105).max(110).default(108).describe("How far a zoom cut punches in (105-110 %, default 108)."),
579
+ zoomPercent: z.number().min(105).max(112).default(108).describe("How far a zoom cut punches in (105-112 %, default 108)."),
580
+ zoomEaseFrames: z
581
+ .number()
582
+ .int()
583
+ .min(0)
584
+ .max(15)
585
+ .default(0)
586
+ .describe("Frames at 30 fps a zoom cut eases into its scale over (0-15, default 0: a step; 3-5 reads as a smooth punch-in)."),
560
587
  fadeFrames: z.number().int().min(1).max(30).default(10).describe("A fade cut's length in frames at 30 fps (1-30, default 10)."),
561
588
  kenBurnsPercent: z.number().min(0).max(5).default(0).describe("How far b-roll zooms over its length (0-5 %, default 0: still)."),
562
589
  endCardWhoosh: z.boolean().default(false).describe("Play the whoosh and pop as the end card comes in (default false)."),
590
+ cutAudioFadeMs: z.number().int().min(10).max(100).default(20).describe("The speech track's fade at every cut in milliseconds (10-100, default 20)."),
591
+ cutAudioCrossfade: z
592
+ .boolean()
593
+ .default(false)
594
+ .describe("Cross-fade the sound of the two sides of every cut over cutAudioFadeMs, centred on the cut, instead of a short dip to silence (default false)."),
563
595
  })
564
596
  .prefault({})
565
597
  .describe("The cut's look; the defaults read as an ordinary phone video."),
@@ -574,6 +606,16 @@ const footageSchema = z
574
606
  ])
575
607
  .default({ target: -14, truePeak: -1 })
576
608
  .describe("The speech track's loudness, measured and normalized in two passes before the music goes under it; false leaves it as filmed. Default -14 LUFS, -1 dBTP."),
609
+ mixLoudness: z
610
+ .union([
611
+ z.literal(false),
612
+ z.strictObject({
613
+ target: z.number().min(-40).max(-5).default(-14).describe("Integrated loudness in LUFS (-40 to -5, default -14)."),
614
+ truePeak: z.number().min(-9).max(0).default(-1).describe("The highest true peak in dBTP (-9 to 0, default -1)."),
615
+ }),
616
+ ])
617
+ .default({ target: -14, truePeak: -1 })
618
+ .describe("The finished film's mix (speech and music), measured after the render and normalized in two passes; false leaves the mix as rendered. Default -14 LUFS, -1 dBTP."),
577
619
  cover: z
578
620
  .union([
579
621
  z.literal(false),
@@ -830,6 +872,13 @@ function layoutOverrideSchema(name: LayoutName) {
830
872
  caption: z
831
873
  .strictObject({
832
874
  top: y("The caption's top edge, in px from the frame's top.", caption.top),
875
+ bottom: z
876
+ .number()
877
+ .int()
878
+ .min(0)
879
+ .max(frame.height)
880
+ .optional()
881
+ .describe("The caption's bottom edge, in px from the frame's bottom: the box grows upwards from it and top is ignored. Default none."),
833
882
  left: x("The caption's left margin, in px from the frame's left edge.", caption.left),
834
883
  right: x("The caption's right margin, in px from the frame's right edge.", caption.right),
835
884
  fontSize: z.number().int().min(16).max(200).optional().describe(`The caption's font size in px (16-200). Default ${caption.fontSize}.`),
@@ -105,12 +105,16 @@ const FRAME_HEIGHT = 1920;
105
105
  const CAPTION_LINES_HEIGHT = 2.5;
106
106
  const CAPTION_PADDING = 40;
107
107
 
108
- /** The caption box of a 9:16 film with its bottom line kept above the preset's bottom margin, centred between equal sides. */
108
+ /**
109
+ * The caption box of a 9:16 film anchored by its foot at the preset's bottom margin, so a card of any number of lines
110
+ * grows upwards and never into the platform's interface; centred between equal sides. `top` is where a two-line box
111
+ * would start, for readers of it.
112
+ */
109
113
  export function getCaptionPresetLayout(preset: CaptionPreset, fontSize: number): CaptionLayout {
110
114
  const zone = CAPTION_SAFE_ZONES[preset];
111
115
  const side = Math.max(zone.left, zone.right);
112
116
  const top = Math.round(FRAME_HEIGHT - zone.bottom - CAPTION_LINES_HEIGHT * fontSize - CAPTION_PADDING);
113
- return { top, left: side, right: side, fontSize };
117
+ return { top, bottom: zone.bottom, left: side, right: side, fontSize };
114
118
  }
115
119
 
116
120
  /**