@auscera/cleoedits 0.0.0-stage → 0.1.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 (230) hide show
  1. package/README.md +62 -2
  2. package/cli.mjs +149 -0
  3. package/lib/dependencies.mjs +384 -0
  4. package/lib/run.mjs +114 -0
  5. package/lib/workspace.mjs +167 -0
  6. package/package.json +240 -3
  7. package/workspace/.agents/skills/cleoedits/SKILL.md +29 -0
  8. package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/audiogram.json +41 -0
  9. package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/facebook.json +48 -0
  10. package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/linkedin.json +48 -0
  11. package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/podcast.json +23 -0
  12. package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/reels.json +48 -0
  13. package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/shorts.json +48 -0
  14. package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/tiktok.json +48 -0
  15. package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/x.json +48 -0
  16. package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/youtube-shorts.json +48 -0
  17. package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/youtube.json +48 -0
  18. package/workspace/.agents/skills/cleoedits/assets/reel_effects/assets/LICENSE-SimpleIcons +30 -0
  19. package/workspace/.agents/skills/cleoedits/assets/reel_effects/assets/logos.json +1 -0
  20. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Anton-Regular.ttf +0 -0
  21. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/ArchivoBlack-Regular.ttf +0 -0
  22. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/InstrumentSerif-Italic.ttf +0 -0
  23. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Inter.ttf +0 -0
  24. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/LICENSE-PermanentMarker.txt +202 -0
  25. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Montserrat.ttf +0 -0
  26. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-Anton.txt +93 -0
  27. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-ArchivoBlack.txt +93 -0
  28. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-InstrumentSerif.txt +93 -0
  29. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-Inter.txt +93 -0
  30. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-Montserrat.txt +93 -0
  31. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-PlayfairDisplay.txt +93 -0
  32. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-Poppins.txt +93 -0
  33. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-SpaceMono.txt +93 -0
  34. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/PermanentMarker-Regular.ttf +0 -0
  35. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/PlayfairDisplay-Italic.ttf +0 -0
  36. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/PlayfairDisplay.ttf +0 -0
  37. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Poppins-Black.ttf +0 -0
  38. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Poppins-Bold.ttf +0 -0
  39. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Poppins-ExtraBold.ttf +0 -0
  40. package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/SpaceMono-Bold.ttf +0 -0
  41. package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/LICENSE-MediaPipe +218 -0
  42. package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/LICENSE-YuNet +21 -0
  43. package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/NOTICE.md +4 -0
  44. package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/selfie_segmenter.tflite +0 -0
  45. package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/yunet.onnx +0 -0
  46. package/workspace/.agents/skills/cleoedits/assets/video_styles/LICENSE +21 -0
  47. package/workspace/.agents/skills/cleoedits/assets/video_styles/audio-app-ui/STYLE.md +65 -0
  48. package/workspace/.agents/skills/cleoedits/assets/video_styles/blueprint/STYLE.md +53 -0
  49. package/workspace/.agents/skills/cleoedits/assets/video_styles/blueprint/index.html +328 -0
  50. package/workspace/.agents/skills/cleoedits/assets/video_styles/blueprint/studio.js +57 -0
  51. package/workspace/.agents/skills/cleoedits/assets/video_styles/data-story/STYLE.md +65 -0
  52. package/workspace/.agents/skills/cleoedits/assets/video_styles/data-story/index.html +575 -0
  53. package/workspace/.agents/skills/cleoedits/assets/video_styles/design-app-ui/STYLE.md +68 -0
  54. package/workspace/.agents/skills/cleoedits/assets/video_styles/editor-ui/STYLE.md +73 -0
  55. package/workspace/.agents/skills/cleoedits/assets/video_styles/editorial-paper/STYLE.md +54 -0
  56. package/workspace/.agents/skills/cleoedits/assets/video_styles/editorial-paper/index.html +189 -0
  57. package/workspace/.agents/skills/cleoedits/assets/video_styles/editorial-paper/studio.js +57 -0
  58. package/workspace/.agents/skills/cleoedits/assets/video_styles/explainer-diagram/STYLE.md +64 -0
  59. package/workspace/.agents/skills/cleoedits/assets/video_styles/explainer-diagram/index.html +620 -0
  60. package/workspace/.agents/skills/cleoedits/assets/video_styles/graphite-ui/STYLE.md +55 -0
  61. package/workspace/.agents/skills/cleoedits/assets/video_styles/graphite-ui/index.html +238 -0
  62. package/workspace/.agents/skills/cleoedits/assets/video_styles/graphite-ui/studio.js +57 -0
  63. package/workspace/.agents/skills/cleoedits/assets/video_styles/growing-city/STYLE.md +66 -0
  64. package/workspace/.agents/skills/cleoedits/assets/video_styles/growing-city/index.html +602 -0
  65. package/workspace/.agents/skills/cleoedits/assets/video_styles/ink-line/STYLE.md +66 -0
  66. package/workspace/.agents/skills/cleoedits/assets/video_styles/ink-line/index.html +777 -0
  67. package/workspace/.agents/skills/cleoedits/assets/video_styles/midnight-grid/STYLE.md +56 -0
  68. package/workspace/.agents/skills/cleoedits/assets/video_styles/midnight-grid/index.html +186 -0
  69. package/workspace/.agents/skills/cleoedits/assets/video_styles/midnight-grid/studio.js +57 -0
  70. package/workspace/.agents/skills/cleoedits/assets/video_styles/motion-app-ui/STYLE.md +68 -0
  71. package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-cut/STYLE.md +56 -0
  72. package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-cut/index.html +244 -0
  73. package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-cut/studio.js +57 -0
  74. package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-world/STYLE.md +67 -0
  75. package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-world/index.html +663 -0
  76. package/workspace/.agents/skills/cleoedits/assets/video_styles/particle-field/STYLE.md +59 -0
  77. package/workspace/.agents/skills/cleoedits/assets/video_styles/particle-field/index.html +395 -0
  78. package/workspace/.agents/skills/cleoedits/assets/video_styles/poster-pop/STYLE.md +52 -0
  79. package/workspace/.agents/skills/cleoedits/assets/video_styles/poster-pop/index.html +194 -0
  80. package/workspace/.agents/skills/cleoedits/assets/video_styles/poster-pop/studio.js +57 -0
  81. package/workspace/.agents/skills/cleoedits/assets/video_styles/risograph/STYLE.md +58 -0
  82. package/workspace/.agents/skills/cleoedits/assets/video_styles/risograph/index.html +242 -0
  83. package/workspace/.agents/skills/cleoedits/assets/video_styles/risograph/studio.js +57 -0
  84. package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-grid/STYLE.md +53 -0
  85. package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-grid/index.html +138 -0
  86. package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-grid/studio.js +57 -0
  87. package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-kinetic/STYLE.md +63 -0
  88. package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-kinetic/index.html +599 -0
  89. package/workspace/.agents/skills/cleoedits/assets/video_styles/time-travel/STYLE.md +65 -0
  90. package/workspace/.agents/skills/cleoedits/assets/video_styles/time-travel/index.html +1297 -0
  91. package/workspace/.agents/skills/cleoedits/assets/video_styles/weather-widget/STYLE.md +69 -0
  92. package/workspace/.agents/skills/cleoedits/assets/video_styles/weather-widget/index.html +674 -0
  93. package/workspace/.agents/skills/cleoedits/references/audio-clearervoice-elevenlabs.md +11 -0
  94. package/workspace/.agents/skills/cleoedits/references/ffmpeg-and-reels.md +15 -0
  95. package/workspace/.agents/skills/cleoedits/references/hyperframes-workflows.md +13 -0
  96. package/workspace/.agents/skills/cleoedits/references/kdenlive-cli-and-mcp.md +12 -0
  97. package/workspace/.agents/skills/cleoedits/references/motion-design-pipeline.md +7 -0
  98. package/workspace/.agents/skills/cleoedits/references/motion-taste-emil.md +5 -0
  99. package/workspace/.agents/skills/cleoedits/references/playwright-demo-capture.md +9 -0
  100. package/workspace/.agents/skills/cleoedits/references/remotion-workflows.md +13 -0
  101. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/LICENSE +21 -0
  102. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_ass_overlay.py +399 -0
  103. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/__init__.py +235 -0
  104. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/alpha.py +560 -0
  105. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/asr.py +1237 -0
  106. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/color.py +540 -0
  107. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/decision.py +2452 -0
  108. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/drawtext.py +290 -0
  109. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/emit.py +1309 -0
  110. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/emoji.py +518 -0
  111. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/fonts.py +875 -0
  112. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/pacing.py +263 -0
  113. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/pacing_edit.py +432 -0
  114. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/probe.py +1613 -0
  115. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/runner.py +3994 -0
  116. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/text.py +73 -0
  117. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/timeline.py +721 -0
  118. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/wrap.py +981 -0
  119. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_contract.py +2454 -0
  120. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_platforms.py +258 -0
  121. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_review.html +754 -0
  122. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_review.py +258 -0
  123. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_smartcut.py +450 -0
  124. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/audio.py +867 -0
  125. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/background.py +136 -0
  126. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/batch.py +1409 -0
  127. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/broll.py +282 -0
  128. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/caption.py +2207 -0
  129. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/check.py +815 -0
  130. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/color.py +695 -0
  131. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/crop.py +91 -0
  132. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/cropdetect.py +214 -0
  133. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/cut.py +2076 -0
  134. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/deinterlace.py +90 -0
  135. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/denoise.py +94 -0
  136. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/export.py +1033 -0
  137. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/fit.py +729 -0
  138. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/freeze.py +197 -0
  139. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/graphics.py +920 -0
  140. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/grid.py +235 -0
  141. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/insert.py +142 -0
  142. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/join.py +1083 -0
  143. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/look.py +475 -0
  144. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/loop.py +395 -0
  145. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/loudness.py +397 -0
  146. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/metadata.py +416 -0
  147. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/multicam.py +414 -0
  148. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/overlay.py +766 -0
  149. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/pad.py +121 -0
  150. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/probe.py +145 -0
  151. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/proxy.py +93 -0
  152. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/redact.py +162 -0
  153. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/render.py +2424 -0
  154. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/report.py +354 -0
  155. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/reverse.py +114 -0
  156. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/scenes.py +439 -0
  157. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/sequence.py +285 -0
  158. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/silence.py +945 -0
  159. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/speedramp.py +193 -0
  160. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/sphere.py +137 -0
  161. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/stabilize.py +141 -0
  162. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/straighten.py +120 -0
  163. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/sync.py +500 -0
  164. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/verify.py +411 -0
  165. package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/waveform.py +502 -0
  166. package/workspace/.agents/skills/cleoedits/scripts/kdenlive_builder.py +284 -0
  167. package/workspace/.agents/skills/cleoedits/scripts/motion/LICENSE-claude-motion +21 -0
  168. package/workspace/.agents/skills/cleoedits/scripts/motion/LICENSE-motion-design +21 -0
  169. package/workspace/.agents/skills/cleoedits/scripts/motion/_media.py +43 -0
  170. package/workspace/.agents/skills/cleoedits/scripts/motion/pacing_check.py +90 -0
  171. package/workspace/.agents/skills/cleoedits/scripts/motion/storyboard.py +77 -0
  172. package/workspace/.agents/skills/cleoedits/scripts/reel_effects/LICENSE +26 -0
  173. package/workspace/.agents/skills/cleoedits/scripts/reel_effects/fx.py +2717 -0
  174. package/workspace/.agents/skills/cleoedits/scripts/reel_effects/logos.py +194 -0
  175. package/workspace/.agents/skills/cleoedits/scripts/reel_effects/sfx.py +105 -0
  176. package/workspace/.agents/skills/cleoedits/scripts/reel_effects/trim.py +99 -0
  177. package/workspace/.agents/skills/cleoedits/scripts/reel_effects/words.py +60 -0
  178. package/workspace/.claude/commands/blender-3d.md +12 -0
  179. package/workspace/.claude/commands/business-short-form-reels.md +12 -0
  180. package/workspace/.claude/commands/color-grade.md +12 -0
  181. package/workspace/.claude/commands/cutout-grid-reel.md +12 -0
  182. package/workspace/.claude/commands/depth-ui-reel.md +12 -0
  183. package/workspace/.claude/commands/explainer-panel-reel.md +12 -0
  184. package/workspace/.claude/commands/freeze-frame.md +12 -0
  185. package/workspace/.claude/commands/glass-graph.md +12 -0
  186. package/workspace/.claude/commands/over-the-shoulder.md +12 -0
  187. package/workspace/.claude/commands/personal-short-form-reels.md +12 -0
  188. package/workspace/.claude/commands/ranking-format.md +12 -0
  189. package/workspace/.claude/commands/relight.md +12 -0
  190. package/workspace/.claude/commands/reverse-engineer.md +12 -0
  191. package/workspace/.claude/commands/text-behind.md +12 -0
  192. package/workspace/.claude/commands/tier-list.md +12 -0
  193. package/workspace/.claude-plugin/plugin.json +8 -0
  194. package/workspace/.npmignore +15 -0
  195. package/workspace/AGENTS.md +30 -0
  196. package/workspace/README.md +63 -0
  197. package/workspace/assets/fonts/TikTokSans-OFL.txt +93 -0
  198. package/workspace/assets/fonts/TikTokSans-Variable.ttf +0 -0
  199. package/workspace/assets/luts/clean_warm.cube +4917 -0
  200. package/workspace/assets/luts/golden_hour.cube +4917 -0
  201. package/workspace/assets/luts/moody_dark.cube +4917 -0
  202. package/workspace/assets/luts/teal_orange.cube +4917 -0
  203. package/workspace/assets/sfx/NOTICE.txt +1 -0
  204. package/workspace/assets/sfx/click.wav +0 -0
  205. package/workspace/assets/sfx/pop.wav +0 -0
  206. package/workspace/assets/sfx/riser.wav +0 -0
  207. package/workspace/assets/sfx/whoosh.wav +0 -0
  208. package/workspace/generators/hyperframes/index.html +39 -0
  209. package/workspace/generators/hyperframes/package.json +15 -0
  210. package/workspace/generators/hyperframes/pnpm-lock.yaml +1181 -0
  211. package/workspace/generators/hyperframes/pnpm-workspace.yaml +10 -0
  212. package/workspace/generators/remotion/eslint.config.mjs +3 -0
  213. package/workspace/generators/remotion/package.json +36 -0
  214. package/workspace/generators/remotion/pnpm-lock.yaml +4179 -0
  215. package/workspace/generators/remotion/pnpm-workspace.yaml +10 -0
  216. package/workspace/generators/remotion/remotion.config.ts +13 -0
  217. package/workspace/generators/remotion/src/Root.tsx +52 -0
  218. package/workspace/generators/remotion/src/index.css +1 -0
  219. package/workspace/generators/remotion/src/index.ts +4 -0
  220. package/workspace/generators/remotion/tsconfig.json +15 -0
  221. package/workspace/pipeline/scripts/_codec.py +28 -0
  222. package/workspace/pipeline/scripts/ai_media_api.py +109 -0
  223. package/workspace/pipeline/scripts/blender_render.py +166 -0
  224. package/workspace/pipeline/scripts/composite.py +49 -0
  225. package/workspace/pipeline/scripts/melt.sh +68 -0
  226. package/workspace/pipeline/scripts/normalize_audio.py +39 -0
  227. package/workspace/pipeline/scripts/person_matte.py +216 -0
  228. package/workspace/pipeline/scripts/record_demo.py +69 -0
  229. package/workspace/pipeline/scripts/whisper_cut.py +98 -0
  230. package/workspace-manifest.json +908 -0
@@ -0,0 +1,10 @@
1
+ allowBuilds:
2
+ '@google/genai': true
3
+ esbuild: true
4
+ onnxruntime-node: true
5
+ protobufjs: true
6
+ sharp: true
7
+
8
+ minimumReleaseAgeExclude:
9
+ - '@remotion/*'
10
+ - 'remotion'
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Note: When using the Node.JS APIs, the config file
3
+ * doesn't apply. Instead, pass options directly to the APIs.
4
+ *
5
+ * All configuration options: https://remotion.dev/docs/config
6
+ */
7
+
8
+ import { Config } from "@remotion/cli/config";
9
+ import { enableTailwind } from '@remotion/tailwind-v4';
10
+
11
+ Config.setVideoImageFormat("jpeg");
12
+ Config.setOverwriteOutput(true);
13
+ Config.overrideWebpackConfig(enableTailwind);
@@ -0,0 +1,52 @@
1
+ import {
2
+ AbsoluteFill,
3
+ Composition,
4
+ interpolate,
5
+ spring,
6
+ useCurrentFrame,
7
+ useVideoConfig,
8
+ } from "remotion";
9
+
10
+ const Starter = ({ title }: { title: string }) => {
11
+ const frame = useCurrentFrame();
12
+ const { fps } = useVideoConfig();
13
+ const progress = spring({ frame, fps, config: { damping: 20 } });
14
+
15
+ return (
16
+ <AbsoluteFill
17
+ style={{
18
+ alignItems: "center",
19
+ backgroundColor: "#102420",
20
+ color: "#f2f7ee",
21
+ display: "flex",
22
+ fontFamily: "system-ui, sans-serif",
23
+ justifyContent: "center",
24
+ }}
25
+ >
26
+ <h1
27
+ style={{
28
+ borderBottom: "6px solid #a7e9ba",
29
+ fontSize: 104,
30
+ margin: 0,
31
+ opacity: interpolate(progress, [0, 1], [0.86, 1]),
32
+ paddingBottom: 18,
33
+ transform: `translateY(${interpolate(progress, [0, 1], [18, 0])}px)`,
34
+ }}
35
+ >
36
+ {title}
37
+ </h1>
38
+ </AbsoluteFill>
39
+ );
40
+ };
41
+
42
+ export const RemotionRoot = () => (
43
+ <Composition
44
+ id="CleoEditsStarter"
45
+ component={Starter}
46
+ durationInFrames={90}
47
+ fps={30}
48
+ width={1920}
49
+ height={1080}
50
+ defaultProps={{ title: "CleoEdits" }}
51
+ />
52
+ );
@@ -0,0 +1 @@
1
+ @import "tailwindcss";
@@ -0,0 +1,4 @@
1
+ import { registerRoot } from "remotion";
2
+ import { RemotionRoot } from "./Root";
3
+
4
+ registerRoot(RemotionRoot);
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2018",
4
+ "module": "commonjs",
5
+ "jsx": "react-jsx",
6
+ "strict": true,
7
+ "noEmit": true,
8
+ "lib": ["es2015"],
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "noUnusedLocals": true
13
+ },
14
+ "exclude": ["remotion.config.ts"]
15
+ }
@@ -0,0 +1,28 @@
1
+ """Shared H.264 encoder selection for Fedora ffmpeg-free compatibility."""
2
+ import functools
3
+ import subprocess
4
+
5
+
6
+ @functools.lru_cache(maxsize=1)
7
+ def has_libx264() -> bool:
8
+ """Return True when system ffmpeg exposes libx264."""
9
+ res = subprocess.run(
10
+ ["ffmpeg", "-hide_banner", "-encoders"],
11
+ capture_output=True,
12
+ text=True,
13
+ )
14
+ return "libx264" in res.stdout
15
+
16
+
17
+ def h264_encode_args(crf: int = 18, preset: str = "fast", bitrate: str = "16M", maxrate: str = "20M") -> list[str]:
18
+ """Return libx264 args when available, otherwise Fedora-safe libopenh264 args."""
19
+ if has_libx264():
20
+ return ["-c:v", "libx264", "-crf", str(crf), "-preset", preset, "-pix_fmt", "yuv420p"]
21
+ return [
22
+ "-c:v", "libopenh264",
23
+ "-profile:v", "high",
24
+ "-b:v", bitrate,
25
+ "-maxrate", maxrate,
26
+ "-allow_skip_frames", "0",
27
+ "-pix_fmt", "yuv420p",
28
+ ]
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ ai_media_api.py: Cloud AI media dispatcher for Linux CPU workstations (relighting,
4
+ lip-sync, generative B-roll/VFX, character generation) using standard library only.
5
+
6
+ Supported providers (read keys from environment or .env, never printed):
7
+ - FAL_KEY -> fal.ai (IC-Light relighting, LatentSync lip-sync, Kling/Wan video, Flux images)
8
+ - REPLICATE_API_TOKEN -> Replicate models
9
+ - SYNC_API_KEY -> Sync.so (lip-sync)
10
+
11
+ Safety: `run` refuses to spend credits without `--yes`; run `check` or omit `--yes` for dry-run.
12
+ """
13
+ import argparse
14
+ import json
15
+ import os
16
+ import sys
17
+ import urllib.error
18
+ import urllib.request
19
+
20
+
21
+ ENDPOINTS = {
22
+ "relight": {
23
+ "provider": "fal",
24
+ "model": "fal-ai/iclight-v2",
25
+ "desc": "Relight a talking-head frame/image with one of the 25 lighting styles (e.g., Rembrandt, Neon light).",
26
+ },
27
+ "lipsync": {
28
+ "provider": "fal",
29
+ "model": "fal-ai/latentsync",
30
+ "desc": "Sync video lip movements to a target audio/voiceover file.",
31
+ },
32
+ "video-vfx": {
33
+ "provider": "fal",
34
+ "model": "fal-ai/kling-video/v2.1/standard/image-to-video",
35
+ "desc": "Generate AI B-roll or VFX shots (e.g., fairy flying, scene transition) from a reference frame + prompt.",
36
+ },
37
+ "character": {
38
+ "provider": "fal",
39
+ "model": "fal-ai/flux/dev",
40
+ "desc": "Generate consistent characters, props, or moon/studio backgrounds.",
41
+ },
42
+ }
43
+
44
+
45
+ def load_env_key(name: str) -> str | None:
46
+ if os.environ.get(name):
47
+ return os.environ[name].strip()
48
+ for base in (os.getcwd(), os.path.dirname(os.getcwd())):
49
+ env_file = os.path.join(base, ".env")
50
+ if os.path.exists(env_file):
51
+ with open(env_file) as f:
52
+ for line in f:
53
+ s = line.strip()
54
+ if s.startswith(name + "="):
55
+ return s.split("=", 1)[1].strip().strip('"').strip("'")
56
+ return None
57
+
58
+
59
+ def main() -> None:
60
+ ap = argparse.ArgumentParser(description="Cloud AI media API dispatcher (relight, lipsync, video-vfx, character)")
61
+ sub = ap.add_subparsers(dest="cmd", required=True)
62
+
63
+ sub.add_parser("check", help="Check which API keys are configured (prints yes/no only)")
64
+ sub.add_parser("list", help="List supported tasks and default cloud endpoints")
65
+
66
+ run_p = sub.add_parser("run", help="Submit a cloud AI job (requires --yes to spend credits)")
67
+ run_p.add_argument("task", choices=list(ENDPOINTS.keys()))
68
+ run_p.add_argument("--payload", required=True, help="JSON string or path to JSON payload file")
69
+ run_p.add_argument("--yes", action="store_true", help="Confirm spending API credits")
70
+
71
+ args = ap.parse_args()
72
+ if args.cmd == "check":
73
+ for k in ("FAL_KEY", "REPLICATE_API_TOKEN", "SYNC_API_KEY", "ELEVENLABS_API_KEY", "HIGGSFIELD_API_KEY"):
74
+ print(f"{k}: {'yes' if load_env_key(k) else 'no'}")
75
+ return
76
+
77
+ if args.cmd == "list":
78
+ for k, v in ENDPOINTS.items():
79
+ print(f"- {k:10s} [{v['model']}]: {v['desc']}")
80
+ return
81
+
82
+ spec = ENDPOINTS[args.task]
83
+ payload = json.load(open(args.payload)) if os.path.exists(args.payload) else json.loads(args.payload)
84
+ url = f"https://queue.fal.run/{spec['model']}"
85
+
86
+ if not args.yes:
87
+ print(f"[DRY RUN] Would POST to {url} with keys: {list(payload.keys())}")
88
+ print("Re-run with --yes after confirming cost/storyboard.")
89
+ return
90
+
91
+ key = load_env_key("FAL_KEY")
92
+ if not key:
93
+ sys.exit("[ERROR] FAL_KEY is not set in environment or .env")
94
+
95
+ req = urllib.request.Request(
96
+ url,
97
+ data=json.dumps(payload).encode(),
98
+ method="POST",
99
+ headers={"Authorization": f"Key {key}", "Content-Type": "application/json"},
100
+ )
101
+ try:
102
+ with urllib.request.urlopen(req, timeout=60) as resp:
103
+ print(resp.read().decode())
104
+ except urllib.error.HTTPError as e:
105
+ sys.exit(f"[ERROR] HTTP {e.code}: {e.read().decode(errors='replace')[:400]}")
106
+
107
+
108
+ if __name__ == "__main__":
109
+ main()
@@ -0,0 +1,166 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ blender_render.py: Headless Blender 3D generator for transparent .mov overlays.
4
+ Runs `/usr/bin/blender -b --python ...` on Linux CPU (Cycles/EEVEE-Next) to produce
5
+ 3D extruded text or floating 3D cards with true RGBA transparency, then encodes to ProRes 4444 .mov.
6
+
7
+ Usage:
8
+ .venv/bin/python pipeline/scripts/blender_render.py --mode text --text "20K" -o pipeline/work/3d_text.mov
9
+ .venv/bin/python pipeline/scripts/blender_render.py --mode card --text "+46%" -o pipeline/work/3d_card.mov
10
+ """
11
+ import argparse
12
+ import os
13
+ import shutil
14
+ import subprocess
15
+ import sys
16
+ import tempfile
17
+
18
+
19
+ BLENDER_SCRIPT = r'''
20
+ import math, os, sys
21
+ import bpy
22
+
23
+ argv = sys.argv[sys.argv.index("--") + 1:]
24
+ mode, text_val, out_dir, width, height, frames, fps, color_hex = (
25
+ argv[0], argv[1], argv[2], int(argv[3]), int(argv[4]), int(argv[5]), int(argv[6]), argv[7]
26
+ )
27
+
28
+ bpy.ops.wm.read_factory_settings(use_empty=True)
29
+ scene = bpy.context.scene
30
+ scene.render.engine = "BLENDER_EEVEE_NEXT" if "BLENDER_EEVEE_NEXT" in [e.identifier for e in bpy.types.RenderSettings.bl_rna.properties["engine"].enum_items] else "CYCLES"
31
+ scene.render.resolution_x = width
32
+ scene.render.resolution_y = height
33
+ scene.render.fps = fps
34
+ scene.render.film_transparent = True
35
+ scene.render.image_settings.file_format = "PNG"
36
+ scene.render.image_settings.color_mode = "RGBA"
37
+ scene.frame_start = 1
38
+ scene.frame_end = frames
39
+ scene.render.filepath = os.path.join(out_dir, "frame_")
40
+
41
+ # Lighting
42
+ world = bpy.data.worlds.new("World")
43
+ scene.world = world
44
+ world.use_nodes = True
45
+
46
+ key_data = bpy.data.lights.new(name="Key", type="AREA")
47
+ key_data.energy = 600
48
+ key_data.size = 4.0
49
+ key = bpy.data.objects.new(name="Key", object_data=key_data)
50
+ scene.collection.objects.link(key)
51
+ key.location = (3.5, -4.0, 4.5)
52
+ key.rotation_euler = (math.radians(45), 0, math.radians(35))
53
+
54
+ rim_data = bpy.data.lights.new(name="Rim", type="AREA")
55
+ rim_data.energy = 450
56
+ rim_data.color = (0.55, 0.85, 1.0)
57
+ rim = bpy.data.objects.new(name="Rim", object_data=rim_data)
58
+ scene.collection.objects.link(rim)
59
+ rim.location = (-3.5, 2.5, 3.0)
60
+ rim.rotation_euler = (math.radians(-50), 0, math.radians(-140))
61
+
62
+ # Camera
63
+ cam_data = bpy.data.cameras.new("Camera")
64
+ cam = bpy.data.objects.new("Camera", cam_data)
65
+ scene.collection.objects.link(cam)
66
+ scene.camera = cam
67
+ cam.location = (0, -6.5, 0)
68
+ cam.rotation_euler = (math.radians(90), 0, 0)
69
+
70
+ def hex_to_rgba(h):
71
+ h = h.lstrip("#")
72
+ return tuple(int(h[i:i+2], 16)/255.0 for i in (0, 2, 4)) + (1.0,)
73
+
74
+ mat = bpy.data.materials.new(name="AccentMat")
75
+ mat.use_nodes = True
76
+ bsdf = mat.node_tree.nodes.get("Principled BSDF")
77
+ if bsdf:
78
+ bsdf.inputs["Base Color"].default_value = hex_to_rgba(color_hex)
79
+ bsdf.inputs["Metallic"].default_value = 0.25
80
+ bsdf.inputs["Roughness"].default_value = 0.25
81
+
82
+ if mode == "text":
83
+ bpy.ops.object.text_add(location=(0, 0, 0))
84
+ obj = bpy.context.active_object
85
+ obj.data.body = text_val
86
+ obj.data.align_x = "CENTER"
87
+ obj.data.align_y = "CENTER"
88
+ obj.data.extrude = 0.18
89
+ obj.data.bevel_depth = 0.03
90
+ obj.rotation_euler = (math.radians(90), 0, 0)
91
+ obj.data.materials.append(mat)
92
+ else:
93
+ bpy.ops.mesh.primitive_cube_add(size=1.0, location=(0, 0, 0))
94
+ obj = bpy.context.active_object
95
+ obj.scale = (2.6, 0.14, 1.5)
96
+ obj.data.materials.append(mat)
97
+
98
+ # Smooth ease-out entrance + subtle float animation
99
+ obj.location = (0, 0, -0.4)
100
+ obj.scale = tuple(s * 0.92 for s in obj.scale)
101
+ obj.keyframe_insert(data_path="location", frame=1)
102
+ obj.keyframe_insert(data_path="scale", frame=1)
103
+ obj.keyframe_insert(data_path="rotation_euler", frame=1)
104
+
105
+ mid = min(frames, max(2, int(fps * 0.45)))
106
+ obj.location = (0, 0, 0)
107
+ obj.scale = (1.0, 1.0, 1.0) if mode == "text" else (2.6, 0.14, 1.5)
108
+ obj.rotation_euler = (math.radians(90), math.radians(-8), 0) if mode == "text" else (0, 0, math.radians(-6))
109
+ obj.keyframe_insert(data_path="location", frame=mid)
110
+ obj.keyframe_insert(data_path="scale", frame=mid)
111
+ obj.keyframe_insert(data_path="rotation_euler", frame=mid)
112
+
113
+ obj.rotation_euler = (math.radians(90), math.radians(8), 0) if mode == "text" else (0, 0, math.radians(6))
114
+ obj.keyframe_insert(data_path="rotation_euler", frame=frames)
115
+
116
+ bpy.ops.render.render(animation=True)
117
+ '''
118
+
119
+
120
+ def main() -> None:
121
+ ap = argparse.ArgumentParser(description="Headless Blender 3D transparent .mov renderer")
122
+ ap.add_argument("--mode", choices=["text", "card"], default="text")
123
+ ap.add_argument("--text", default="AI STUDIO", help="3D text string")
124
+ ap.add_argument("-o", "--output", required=True, help="Output transparent ProRes 4444 .mov")
125
+ ap.add_argument("--width", type=int, default=1080)
126
+ ap.add_argument("--height", type=int, default=1920)
127
+ ap.add_argument("--duration", type=float, default=3.0)
128
+ ap.add_argument("--fps", type=int, default=30)
129
+ ap.add_argument("--color", default="#F59E0B", help="Hex accent color")
130
+ args = ap.parse_args()
131
+
132
+ blender = shutil.which("blender")
133
+ if not blender:
134
+ sys.exit("[ERROR] blender binary not found on PATH")
135
+
136
+ frames = max(2, int(round(args.duration * args.fps)))
137
+ with tempfile.TemporaryDirectory() as tmp:
138
+ py_path = os.path.join(tmp, "scene.py")
139
+ frames_dir = os.path.join(tmp, "frames")
140
+ os.makedirs(frames_dir, exist_ok=True)
141
+ with open(py_path, "w") as f:
142
+ f.write(BLENDER_SCRIPT)
143
+
144
+ cmd = [
145
+ blender, "-b", "--python", py_path, "--",
146
+ args.mode, args.text, frames_dir,
147
+ str(args.width), str(args.height), str(frames), str(args.fps), args.color,
148
+ ]
149
+ subprocess.run(cmd, check=True)
150
+
151
+ os.makedirs(os.path.dirname(os.path.abspath(args.output)), exist_ok=True)
152
+ subprocess.run(
153
+ [
154
+ "ffmpeg", "-y",
155
+ "-framerate", str(args.fps),
156
+ "-i", os.path.join(frames_dir, "frame_%04d.png"),
157
+ "-c:v", "prores_ks", "-profile:v", "4", "-pix_fmt", "yuva444p10le",
158
+ args.output,
159
+ ],
160
+ check=True,
161
+ )
162
+ print(f"[OK] 3D transparent overlay rendered to {args.output}")
163
+
164
+
165
+ if __name__ == "__main__":
166
+ main()
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ composite.py: Layers transparent graphic overlays (ProRes 4444 / WebM) or picture-in-picture scenes onto base footage.
4
+ Usage:
5
+ python3 composite.py base.mp4 overlay.mov output.mp4 [--start-time 2.5] [--x 0] [--y 0]
6
+ """
7
+
8
+ import sys
9
+ import argparse
10
+ import subprocess
11
+
12
+ from _codec import h264_encode_args
13
+
14
+ def composite(base_file, overlay_file, output_file, start_time=0.0, x=0, y=0):
15
+ filter_complex = f"[0:v][1:v]overlay=x={x}:y={y}:enable='gte(t,{start_time})':eof_action=pass[outv]"
16
+ cmd = [
17
+ "ffmpeg", "-y",
18
+ "-i", base_file,
19
+ "-itsoffset", str(start_time),
20
+ "-i", overlay_file,
21
+ "-filter_complex", filter_complex,
22
+ "-map", "[outv]",
23
+ "-map", "0:a?",
24
+ *h264_encode_args(crf=18, preset="fast"),
25
+ "-c:a", "copy",
26
+ output_file
27
+ ]
28
+ print(f"[INFO] Compositing {overlay_file} onto {base_file} at t={start_time}s...")
29
+ res = subprocess.run(cmd)
30
+ if res.returncode == 0:
31
+ print(f"[OK] Composited output saved to: {output_file}")
32
+ else:
33
+ print(f"[ERROR] Compositing failed with code {res.returncode}")
34
+ sys.exit(res.returncode)
35
+
36
+ def main():
37
+ parser = argparse.ArgumentParser(description="Transparent Video Overlay Compositor")
38
+ parser.add_argument("base_video", help="Base footage (MP4/MOV)")
39
+ parser.add_argument("overlay_video", help="Transparent overlay (ProRes 4444 MOV / WebM)")
40
+ parser.add_argument("output_video", help="Output composited video")
41
+ parser.add_argument("--start-time", type=float, default=0.0, help="Offset start time in seconds (default: 0.0)")
42
+ parser.add_argument("--x", type=int, default=0, help="X pixel offset (default: 0)")
43
+ parser.add_argument("--y", type=int, default=0, help="Y pixel offset (default: 0)")
44
+
45
+ args = parser.parse_args()
46
+ composite(args.base_video, args.overlay_video, args.output_video, args.start_time, args.x, args.y)
47
+
48
+ if __name__ == "__main__":
49
+ main()
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/env bash
2
+ # melt.sh — run the MLT renderer bundled inside the Kdenlive AppImage.
3
+ #
4
+ # Why: the system FFmpeg (Fedora ffmpeg-free) has no libx264, but Kdenlive's AppImage ships an
5
+ # FFmpeg WITH libx264. This wrapper unpacks the AppImage once into a cache folder and runs its
6
+ # `melt` with the right library paths, so .kdenlive projects render headlessly at full quality.
7
+ #
8
+ # Self-healing: re-unpacks automatically if the cache is cleared or the AppImage changes
9
+ # (e.g. after a Kdenlive update). The cache is ~730 MB and lives OUTSIDE the repo.
10
+ #
11
+ # Usage:
12
+ # pipeline/scripts/melt.sh project.kdenlive -consumer avformat:out.mp4 vcodec=libx264 crf=16 ...
13
+ # pipeline/scripts/melt.sh --check # unpack if needed, print version, exit 0 if usable
14
+ #
15
+ # Env overrides: KDENLIVE_APPIMAGE (path to the AppImage), MELT_CACHE_DIR (unpack location).
16
+ set -euo pipefail
17
+
18
+ find_appimage() {
19
+ if [[ -n "${KDENLIVE_APPIMAGE:-}" ]]; then echo "$KDENLIVE_APPIMAGE"; return; fi
20
+ local k
21
+ k=$(command -v kdenlive 2>/dev/null || true)
22
+ if [[ -n "$k" ]]; then
23
+ k=$(readlink -f "$k")
24
+ if [[ "$k" == *.AppImage ]]; then echo "$k"; return; fi
25
+ fi
26
+ ls -t "$HOME"/Downloads/package/kdenlive-*.AppImage "$HOME"/Applications/kdenlive*.AppImage 2>/dev/null | head -1
27
+ }
28
+
29
+ APPIMAGE=$(find_appimage)
30
+ if [[ -z "$APPIMAGE" || ! -f "$APPIMAGE" ]]; then
31
+ echo "melt.sh: Kdenlive AppImage not found (set KDENLIVE_APPIMAGE)" >&2
32
+ exit 3
33
+ fi
34
+
35
+ CACHE=${MELT_CACHE_DIR:-"${XDG_CACHE_HOME:-$HOME/.cache}/ai-video-studio/kdenlive-appimage"}
36
+ STAMP="$CACHE/.source"
37
+ WANT="$APPIMAGE $(stat -c '%s %Y' "$APPIMAGE")"
38
+ ROOT="$CACHE/squashfs-root"
39
+
40
+ if [[ ! -x "$ROOT/usr/bin/melt" || ! -f "$STAMP" || "$(cat "$STAMP")" != "$WANT" ]]; then
41
+ echo "melt.sh: unpacking $(basename "$APPIMAGE") into $CACHE (one-time, ~730 MB)…" >&2
42
+ rm -rf "$CACHE.tmp"
43
+ mkdir -p "$CACHE.tmp"
44
+ (cd "$CACHE.tmp" && "$APPIMAGE" --appimage-extract >/dev/null)
45
+ rm -rf "$CACHE"
46
+ mv "$CACHE.tmp" "$CACHE"
47
+ echo "$WANT" > "$STAMP"
48
+ fi
49
+
50
+ export LD_LIBRARY_PATH="$ROOT/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
51
+ export MLT_REPOSITORY="$ROOT/usr/lib/mlt-7/"
52
+ export MLT_DATA="$ROOT/usr/share/mlt-7/"
53
+ export MLT_ROOT_DIR="$ROOT/usr/"
54
+ export MLT_APPDIR="$ROOT/usr/"
55
+ export MLT_PROFILES_PATH="$ROOT/usr/share/mlt-7/profiles/"
56
+ export MLT_PRESETS_PATH="$ROOT/usr/share/mlt-7/presets/"
57
+ export FREI0R_PATH="$ROOT/usr/lib/frei0r-1"
58
+ export LADSPA_PATH="$ROOT/usr/lib/ladspa"
59
+
60
+ if [[ "${1:-}" == "--check" ]]; then
61
+ ver=$("$ROOT/usr/bin/melt" --version 2>&1) || true
62
+ codecs=$("$ROOT/usr/bin/melt" -query vcodecs 2>/dev/null) || true
63
+ echo "${ver%%$'\n'*}"
64
+ if [[ "$codecs" == *libx264* ]]; then echo "libx264: available"; exit 0; fi
65
+ echo "libx264: MISSING" >&2; exit 4
66
+ fi
67
+
68
+ exec "$ROOT/usr/bin/melt" "$@"
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ normalize_audio.py: Applies EBU R128 loudness normalization and true-peak limiting.
4
+ Usage:
5
+ python3 normalize_audio.py input.mp4 output.mp4 [--lufs -16] [--tp -1.5]
6
+ """
7
+
8
+ import sys
9
+ import argparse
10
+ import subprocess
11
+
12
+ def normalize(input_file, output_file, lufs=-16.0, true_peak=-1.5, lra=11.0):
13
+ cmd = [
14
+ "ffmpeg", "-y", "-i", input_file,
15
+ "-af", f"loudnorm=I={lufs}:TP={true_peak}:LRA={lra}",
16
+ "-c:v", "copy",
17
+ "-c:a", "aac", "-b:a", "192k",
18
+ output_file
19
+ ]
20
+ print(f"[INFO] Normalizing audio to {lufs} LUFS (TP: {true_peak}dB)...")
21
+ res = subprocess.run(cmd)
22
+ if res.returncode == 0:
23
+ print(f"[OK] Normalized media saved to: {output_file}")
24
+ else:
25
+ print(f"[ERROR] Audio normalization failed with code {res.returncode}")
26
+ sys.exit(res.returncode)
27
+
28
+ def main():
29
+ parser = argparse.ArgumentParser(description="EBU R128 Audio Normalizer")
30
+ parser.add_argument("input_media", help="Input video/audio file")
31
+ parser.add_argument("output_media", help="Output video/audio file")
32
+ parser.add_argument("--lufs", type=float, default=-16.0, help="Integrated loudness target in LUFS (default: -16.0)")
33
+ parser.add_argument("--tp", type=float, default=-1.5, help="True peak limit in dB (default: -1.5)")
34
+
35
+ args = parser.parse_args()
36
+ normalize(args.input_media, args.output_media, args.lufs, args.tp)
37
+
38
+ if __name__ == "__main__":
39
+ main()