@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.
- package/README.md +62 -2
- package/cli.mjs +149 -0
- package/lib/dependencies.mjs +384 -0
- package/lib/run.mjs +114 -0
- package/lib/workspace.mjs +167 -0
- package/package.json +240 -3
- package/workspace/.agents/skills/cleoedits/SKILL.md +29 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/audiogram.json +41 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/facebook.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/linkedin.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/podcast.json +23 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/reels.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/shorts.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/tiktok.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/x.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/youtube-shorts.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/youtube.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/assets/LICENSE-SimpleIcons +30 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/assets/logos.json +1 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Anton-Regular.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/ArchivoBlack-Regular.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/InstrumentSerif-Italic.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Inter.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/LICENSE-PermanentMarker.txt +202 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Montserrat.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-Anton.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-ArchivoBlack.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-InstrumentSerif.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-Inter.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-Montserrat.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-PlayfairDisplay.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-Poppins.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-SpaceMono.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/PermanentMarker-Regular.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/PlayfairDisplay-Italic.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/PlayfairDisplay.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Poppins-Black.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Poppins-Bold.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Poppins-ExtraBold.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/SpaceMono-Bold.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/LICENSE-MediaPipe +218 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/LICENSE-YuNet +21 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/NOTICE.md +4 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/selfie_segmenter.tflite +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/yunet.onnx +0 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/LICENSE +21 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/audio-app-ui/STYLE.md +65 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/blueprint/STYLE.md +53 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/blueprint/index.html +328 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/blueprint/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/data-story/STYLE.md +65 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/data-story/index.html +575 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/design-app-ui/STYLE.md +68 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/editor-ui/STYLE.md +73 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/editorial-paper/STYLE.md +54 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/editorial-paper/index.html +189 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/editorial-paper/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/explainer-diagram/STYLE.md +64 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/explainer-diagram/index.html +620 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/graphite-ui/STYLE.md +55 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/graphite-ui/index.html +238 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/graphite-ui/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/growing-city/STYLE.md +66 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/growing-city/index.html +602 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/ink-line/STYLE.md +66 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/ink-line/index.html +777 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/midnight-grid/STYLE.md +56 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/midnight-grid/index.html +186 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/midnight-grid/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/motion-app-ui/STYLE.md +68 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-cut/STYLE.md +56 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-cut/index.html +244 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-cut/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-world/STYLE.md +67 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-world/index.html +663 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/particle-field/STYLE.md +59 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/particle-field/index.html +395 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/poster-pop/STYLE.md +52 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/poster-pop/index.html +194 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/poster-pop/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/risograph/STYLE.md +58 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/risograph/index.html +242 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/risograph/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-grid/STYLE.md +53 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-grid/index.html +138 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-grid/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-kinetic/STYLE.md +63 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-kinetic/index.html +599 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/time-travel/STYLE.md +65 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/time-travel/index.html +1297 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/weather-widget/STYLE.md +69 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/weather-widget/index.html +674 -0
- package/workspace/.agents/skills/cleoedits/references/audio-clearervoice-elevenlabs.md +11 -0
- package/workspace/.agents/skills/cleoedits/references/ffmpeg-and-reels.md +15 -0
- package/workspace/.agents/skills/cleoedits/references/hyperframes-workflows.md +13 -0
- package/workspace/.agents/skills/cleoedits/references/kdenlive-cli-and-mcp.md +12 -0
- package/workspace/.agents/skills/cleoedits/references/motion-design-pipeline.md +7 -0
- package/workspace/.agents/skills/cleoedits/references/motion-taste-emil.md +5 -0
- package/workspace/.agents/skills/cleoedits/references/playwright-demo-capture.md +9 -0
- package/workspace/.agents/skills/cleoedits/references/remotion-workflows.md +13 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/LICENSE +21 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_ass_overlay.py +399 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/__init__.py +235 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/alpha.py +560 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/asr.py +1237 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/color.py +540 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/decision.py +2452 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/drawtext.py +290 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/emit.py +1309 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/emoji.py +518 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/fonts.py +875 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/pacing.py +263 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/pacing_edit.py +432 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/probe.py +1613 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/runner.py +3994 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/text.py +73 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/timeline.py +721 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/wrap.py +981 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_contract.py +2454 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_platforms.py +258 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_review.html +754 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_review.py +258 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_smartcut.py +450 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/audio.py +867 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/background.py +136 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/batch.py +1409 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/broll.py +282 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/caption.py +2207 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/check.py +815 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/color.py +695 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/crop.py +91 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/cropdetect.py +214 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/cut.py +2076 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/deinterlace.py +90 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/denoise.py +94 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/export.py +1033 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/fit.py +729 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/freeze.py +197 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/graphics.py +920 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/grid.py +235 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/insert.py +142 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/join.py +1083 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/look.py +475 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/loop.py +395 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/loudness.py +397 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/metadata.py +416 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/multicam.py +414 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/overlay.py +766 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/pad.py +121 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/probe.py +145 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/proxy.py +93 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/redact.py +162 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/render.py +2424 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/report.py +354 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/reverse.py +114 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/scenes.py +439 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/sequence.py +285 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/silence.py +945 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/speedramp.py +193 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/sphere.py +137 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/stabilize.py +141 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/straighten.py +120 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/sync.py +500 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/verify.py +411 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/waveform.py +502 -0
- package/workspace/.agents/skills/cleoedits/scripts/kdenlive_builder.py +284 -0
- package/workspace/.agents/skills/cleoedits/scripts/motion/LICENSE-claude-motion +21 -0
- package/workspace/.agents/skills/cleoedits/scripts/motion/LICENSE-motion-design +21 -0
- package/workspace/.agents/skills/cleoedits/scripts/motion/_media.py +43 -0
- package/workspace/.agents/skills/cleoedits/scripts/motion/pacing_check.py +90 -0
- package/workspace/.agents/skills/cleoedits/scripts/motion/storyboard.py +77 -0
- package/workspace/.agents/skills/cleoedits/scripts/reel_effects/LICENSE +26 -0
- package/workspace/.agents/skills/cleoedits/scripts/reel_effects/fx.py +2717 -0
- package/workspace/.agents/skills/cleoedits/scripts/reel_effects/logos.py +194 -0
- package/workspace/.agents/skills/cleoedits/scripts/reel_effects/sfx.py +105 -0
- package/workspace/.agents/skills/cleoedits/scripts/reel_effects/trim.py +99 -0
- package/workspace/.agents/skills/cleoedits/scripts/reel_effects/words.py +60 -0
- package/workspace/.claude/commands/blender-3d.md +12 -0
- package/workspace/.claude/commands/business-short-form-reels.md +12 -0
- package/workspace/.claude/commands/color-grade.md +12 -0
- package/workspace/.claude/commands/cutout-grid-reel.md +12 -0
- package/workspace/.claude/commands/depth-ui-reel.md +12 -0
- package/workspace/.claude/commands/explainer-panel-reel.md +12 -0
- package/workspace/.claude/commands/freeze-frame.md +12 -0
- package/workspace/.claude/commands/glass-graph.md +12 -0
- package/workspace/.claude/commands/over-the-shoulder.md +12 -0
- package/workspace/.claude/commands/personal-short-form-reels.md +12 -0
- package/workspace/.claude/commands/ranking-format.md +12 -0
- package/workspace/.claude/commands/relight.md +12 -0
- package/workspace/.claude/commands/reverse-engineer.md +12 -0
- package/workspace/.claude/commands/text-behind.md +12 -0
- package/workspace/.claude/commands/tier-list.md +12 -0
- package/workspace/.claude-plugin/plugin.json +8 -0
- package/workspace/.npmignore +15 -0
- package/workspace/AGENTS.md +30 -0
- package/workspace/README.md +63 -0
- package/workspace/assets/fonts/TikTokSans-OFL.txt +93 -0
- package/workspace/assets/fonts/TikTokSans-Variable.ttf +0 -0
- package/workspace/assets/luts/clean_warm.cube +4917 -0
- package/workspace/assets/luts/golden_hour.cube +4917 -0
- package/workspace/assets/luts/moody_dark.cube +4917 -0
- package/workspace/assets/luts/teal_orange.cube +4917 -0
- package/workspace/assets/sfx/NOTICE.txt +1 -0
- package/workspace/assets/sfx/click.wav +0 -0
- package/workspace/assets/sfx/pop.wav +0 -0
- package/workspace/assets/sfx/riser.wav +0 -0
- package/workspace/assets/sfx/whoosh.wav +0 -0
- package/workspace/generators/hyperframes/index.html +39 -0
- package/workspace/generators/hyperframes/package.json +15 -0
- package/workspace/generators/hyperframes/pnpm-lock.yaml +1181 -0
- package/workspace/generators/hyperframes/pnpm-workspace.yaml +10 -0
- package/workspace/generators/remotion/eslint.config.mjs +3 -0
- package/workspace/generators/remotion/package.json +36 -0
- package/workspace/generators/remotion/pnpm-lock.yaml +4179 -0
- package/workspace/generators/remotion/pnpm-workspace.yaml +10 -0
- package/workspace/generators/remotion/remotion.config.ts +13 -0
- package/workspace/generators/remotion/src/Root.tsx +52 -0
- package/workspace/generators/remotion/src/index.css +1 -0
- package/workspace/generators/remotion/src/index.ts +4 -0
- package/workspace/generators/remotion/tsconfig.json +15 -0
- package/workspace/pipeline/scripts/_codec.py +28 -0
- package/workspace/pipeline/scripts/ai_media_api.py +109 -0
- package/workspace/pipeline/scripts/blender_render.py +166 -0
- package/workspace/pipeline/scripts/composite.py +49 -0
- package/workspace/pipeline/scripts/melt.sh +68 -0
- package/workspace/pipeline/scripts/normalize_audio.py +39 -0
- package/workspace/pipeline/scripts/person_matte.py +216 -0
- package/workspace/pipeline/scripts/record_demo.py +69 -0
- package/workspace/pipeline/scripts/whisper_cut.py +98 -0
- package/workspace-manifest.json +908 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""One table per delivery destination (internal module, not a tool).
|
|
3
|
+
|
|
4
|
+
Before 1.14 the same destination was described three times: check.py held the
|
|
5
|
+
compliance spec (duration, aspect, codecs, loudness), export.py held the frame and
|
|
6
|
+
encoder settings, and nothing at all held the part of the frame the app's own UI
|
|
7
|
+
covers. A TikTok export therefore passed every check while its captions sat under
|
|
8
|
+
the description bar. This module is the single table the delivery tools read:
|
|
9
|
+
|
|
10
|
+
PLATFORMS[name] = {
|
|
11
|
+
"frame": {"w", "h", "aspect"} or None (audio-only destinations),
|
|
12
|
+
"fps": the frame rate a delivery is conformed to (None = leave alone),
|
|
13
|
+
"spec": check.py's compliance row values (max_duration, aspects,
|
|
14
|
+
min_height, fps_max, codecs, max_bytes, lufs, lufs_tol, tp,
|
|
15
|
+
sdr_only) -- the keys check.py's SPECS has always had;
|
|
16
|
+
max_duration and max_bytes are upload limits, guidance as of
|
|
17
|
+
UPLOAD_LIMITS_AS_OF rather than a requirement (#485),
|
|
18
|
+
"safe": the fraction of the frame each edge's UI covers
|
|
19
|
+
(top/bottom/left/right, 0..1) -- nothing readable goes there,
|
|
20
|
+
"caption": the caption defaults a template uses (size as a fraction of the
|
|
21
|
+
frame height, position, box, outline, animate),
|
|
22
|
+
"preset": the export.py preset that writes this destination's file,
|
|
23
|
+
"check": the check.py platform name a delivery is verified against.
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Read by check.py (SPECS), export.py (PRESETS/PLATFORM_OF), render.py (templates),
|
|
27
|
+
caption.py and graphics.py (--platform margins) and look.py (--safe).
|
|
28
|
+
|
|
29
|
+
Safe zones are the app's own overlay, measured from each platform's published
|
|
30
|
+
design guidance: TikTok's caption/description block and the like/comment column,
|
|
31
|
+
Instagram's Reels UI, the Shorts player. They are deliberately generous -- a
|
|
32
|
+
caption 2 % too high is readable, a caption under the share button is not. The
|
|
33
|
+
feed destinations (YouTube, X, LinkedIn, Facebook) have no persistent overlay, so
|
|
34
|
+
they carry the conventional 5 % title-safe border instead.
|
|
35
|
+
|
|
36
|
+
ASS note: caption.py's --size and --margin are in the 288-line ASS script grid, so
|
|
37
|
+
a fraction of the frame height is that fraction * 288 (ass_units() below); the
|
|
38
|
+
burn scales it back to the real frame. graphics.py and look.py work in pixels.
|
|
39
|
+
"""
|
|
40
|
+
from typing import Any, Dict, List, Optional
|
|
41
|
+
|
|
42
|
+
ASS_SCRIPT_HEIGHT = 288 # caption.py's --size/--margin reference grid
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def ass_units(fraction: float) -> int:
|
|
46
|
+
"""A fraction of the frame height as a caption.py --size / --margin value."""
|
|
47
|
+
return int(round(fraction * ASS_SCRIPT_HEIGHT))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# The edges a feed destination reserves: no app chrome, just the conventional title-safe border.
|
|
51
|
+
_SAFE_5 = {"top": 0.05, "bottom": 0.05, "left": 0.05, "right": 0.05}
|
|
52
|
+
_NO_SAFE = {"top": 0.0, "bottom": 0.0, "left": 0.0, "right": 0.0}
|
|
53
|
+
|
|
54
|
+
# caption defaults: size is a fraction of the frame height (0.0833 = the 24 that every
|
|
55
|
+
# vertical job in this repo has used since 1.2), position/box/outline/animate as the
|
|
56
|
+
# caption.py flags of the same name.
|
|
57
|
+
_CAP_VERTICAL = {"size": 0.0833, "position": "bottom", "box": False, "outline": 2, "animate": "pop"}
|
|
58
|
+
_CAP_WIDE = {"size": 0.0694, "position": "bottom", "box": False, "outline": 2, "animate": "none"}
|
|
59
|
+
|
|
60
|
+
# The one true-peak tolerance every tool applies to a dBTP ceiling, reported beside the verdict.
|
|
61
|
+
# Before 2.18 loudness.py allowed +0.1 dB, check.py +0.05 and export.py 0.0, so "verified" meant a
|
|
62
|
+
# different scale in each tool and export could fail a file check passed (the VDC paper's
|
|
63
|
+
# sensitivity run). 0.1 dB is loudness.py's margin: two loudnorm passes on the same encode differ
|
|
64
|
+
# by up to that much, so a tighter rule fails a file on measurement noise.
|
|
65
|
+
TP_TOLERANCE_DB = 0.1
|
|
66
|
+
|
|
67
|
+
# Upload limits are guidance (#485). A platform's maximum length and file size change often and
|
|
68
|
+
# differ by account; whoever uploads reads the current ones. The `max_duration` and `max_bytes`
|
|
69
|
+
# below are this table's as of the date here, the day the table as a whole was last decided --
|
|
70
|
+
# not a date each number was read from the platform. check.py reports a file over one of them as
|
|
71
|
+
# WARN with `basis: guidance`, never FAIL; the encoding values (codecs, aspects, fps, loudness,
|
|
72
|
+
# true peak) are the format a delivery is held to and stay requirements.
|
|
73
|
+
UPLOAD_LIMITS_AS_OF = "2026-10-30"
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def upload_limit_note(platform: str) -> str:
|
|
77
|
+
"""Why a row measured against this table's length or size limit is guidance, in one clause."""
|
|
78
|
+
return (f"the limit is this tool's table for {platform} as of {UPLOAD_LIMITS_AS_OF}; platforms change "
|
|
79
|
+
"upload limits, so whoever uploads checks the current one")
|
|
80
|
+
|
|
81
|
+
PLATFORMS: Dict[str, Dict[str, Any]] = {
|
|
82
|
+
"tiktok": {
|
|
83
|
+
"title": "TikTok",
|
|
84
|
+
"frame": {"w": 1080, "h": 1920, "aspect": "9:16"},
|
|
85
|
+
"fps": 30,
|
|
86
|
+
"spec": {"max_duration": 600, "aspects": ["9:16", "1:1"], "min_height": 1080, "fps_max": 60,
|
|
87
|
+
"codecs": ["h264", "hevc"], "max_bytes": 4 * 1024 ** 3,
|
|
88
|
+
"lufs": -14, "lufs_tol": 2.0, "tp": -1.0, "sdr_only": True},
|
|
89
|
+
# the description/caption block along the bottom, the like/comment/share column on the
|
|
90
|
+
# right, the status bar and the "Following | For You" tabs at the top
|
|
91
|
+
"safe": {"top": 0.10, "bottom": 0.22, "left": 0.05, "right": 0.14},
|
|
92
|
+
"caption": _CAP_VERTICAL,
|
|
93
|
+
"preset": "tiktok", "check": "tiktok",
|
|
94
|
+
},
|
|
95
|
+
"reels": {
|
|
96
|
+
"title": "Instagram Reels",
|
|
97
|
+
"frame": {"w": 1080, "h": 1920, "aspect": "9:16"},
|
|
98
|
+
"fps": 30,
|
|
99
|
+
"spec": {"max_duration": 90, "aspects": ["9:16", "4:5", "1:1"], "min_height": 1080, "fps_max": 60,
|
|
100
|
+
"codecs": ["h264", "hevc"], "max_bytes": 4 * 1024 ** 3,
|
|
101
|
+
"lufs": -14, "lufs_tol": 2.0, "tp": -1.0, "sdr_only": True},
|
|
102
|
+
"safe": {"top": 0.08, "bottom": 0.20, "left": 0.05, "right": 0.12},
|
|
103
|
+
"caption": _CAP_VERTICAL,
|
|
104
|
+
"preset": "reels", "check": "reels",
|
|
105
|
+
},
|
|
106
|
+
"shorts": {
|
|
107
|
+
"title": "YouTube Shorts",
|
|
108
|
+
"frame": {"w": 1080, "h": 1920, "aspect": "9:16"},
|
|
109
|
+
"fps": 30,
|
|
110
|
+
"spec": {"max_duration": 180, "aspects": ["9:16", "1:1"], "min_height": 1080, "fps_max": 60,
|
|
111
|
+
"codecs": ["h264", "hevc"], "max_bytes": 256 * 1024 ** 3,
|
|
112
|
+
"lufs": -14, "lufs_tol": 2.0, "tp": -1.0, "sdr_only": False},
|
|
113
|
+
"safe": {"top": 0.06, "bottom": 0.18, "left": 0.05, "right": 0.12},
|
|
114
|
+
"caption": _CAP_VERTICAL,
|
|
115
|
+
"preset": "shorts", "check": "shorts",
|
|
116
|
+
},
|
|
117
|
+
"youtube": {
|
|
118
|
+
"title": "YouTube",
|
|
119
|
+
"frame": {"w": 1920, "h": 1080, "aspect": "16:9"},
|
|
120
|
+
"fps": None,
|
|
121
|
+
"spec": {"max_duration": 12 * 3600, "aspects": ["16:9", "9:16", "1:1", "4:3"], "min_height": 720, "fps_max": 60,
|
|
122
|
+
"codecs": ["h264", "hevc", "prores", "av1", "vp9"], "max_bytes": 256 * 1024 ** 3,
|
|
123
|
+
"lufs": -14, "lufs_tol": 2.0, "tp": -1.0, "sdr_only": False},
|
|
124
|
+
"safe": _SAFE_5,
|
|
125
|
+
"caption": _CAP_WIDE,
|
|
126
|
+
"preset": "youtube", "check": "youtube",
|
|
127
|
+
},
|
|
128
|
+
"youtube-hdr": {
|
|
129
|
+
"title": "YouTube (HDR10)",
|
|
130
|
+
"frame": {"w": 1920, "h": 1080, "aspect": "16:9"},
|
|
131
|
+
"fps": None,
|
|
132
|
+
"spec": dict({"max_duration": 12 * 3600, "aspects": ["16:9", "9:16", "1:1", "4:3"], "min_height": 720, "fps_max": 60,
|
|
133
|
+
"codecs": ["h264", "hevc", "prores", "av1", "vp9"], "max_bytes": 256 * 1024 ** 3,
|
|
134
|
+
"lufs": -14, "lufs_tol": 2.0, "tp": -1.0, "sdr_only": False}),
|
|
135
|
+
"safe": _SAFE_5,
|
|
136
|
+
"caption": _CAP_WIDE,
|
|
137
|
+
"preset": "youtube-hdr", "check": "youtube",
|
|
138
|
+
},
|
|
139
|
+
"youtube-av1": {
|
|
140
|
+
"title": "YouTube (AV1)",
|
|
141
|
+
"frame": {"w": 1920, "h": 1080, "aspect": "16:9"},
|
|
142
|
+
"fps": None,
|
|
143
|
+
"spec": dict({"max_duration": 12 * 3600, "aspects": ["16:9", "9:16", "1:1", "4:3"], "min_height": 720, "fps_max": 60,
|
|
144
|
+
"codecs": ["h264", "hevc", "prores", "av1", "vp9"], "max_bytes": 256 * 1024 ** 3,
|
|
145
|
+
"lufs": -14, "lufs_tol": 2.0, "tp": -1.0, "sdr_only": False}),
|
|
146
|
+
"safe": _SAFE_5,
|
|
147
|
+
"caption": _CAP_WIDE,
|
|
148
|
+
"preset": "youtube-av1", "check": "youtube",
|
|
149
|
+
},
|
|
150
|
+
"x": {
|
|
151
|
+
"title": "X (Twitter)",
|
|
152
|
+
"frame": {"w": 1280, "h": 720, "aspect": "16:9"},
|
|
153
|
+
"fps": 30,
|
|
154
|
+
"spec": {"max_duration": 140, "aspects": ["16:9", "1:1", "9:16"], "min_height": 720, "fps_max": 60,
|
|
155
|
+
"codecs": ["h264"], "max_bytes": 512 * 1024 ** 2,
|
|
156
|
+
"lufs": -14, "lufs_tol": 3.0, "tp": -1.0, "sdr_only": True},
|
|
157
|
+
"safe": _SAFE_5,
|
|
158
|
+
"caption": _CAP_WIDE,
|
|
159
|
+
"preset": "x", "check": "x",
|
|
160
|
+
},
|
|
161
|
+
"linkedin": {
|
|
162
|
+
"title": "LinkedIn",
|
|
163
|
+
"frame": {"w": 1080, "h": 1080, "aspect": "1:1"},
|
|
164
|
+
"fps": 30,
|
|
165
|
+
"spec": {"max_duration": 600, "aspects": ["16:9", "1:1", "9:16", "4:5"], "min_height": 720, "fps_max": 60,
|
|
166
|
+
"codecs": ["h264"], "max_bytes": 5 * 1024 ** 3,
|
|
167
|
+
"lufs": -14, "lufs_tol": 3.0, "tp": -1.0, "sdr_only": True},
|
|
168
|
+
"safe": _SAFE_5,
|
|
169
|
+
"caption": _CAP_WIDE,
|
|
170
|
+
"preset": "linkedin", "check": "linkedin",
|
|
171
|
+
},
|
|
172
|
+
"facebook": {
|
|
173
|
+
"title": "Facebook",
|
|
174
|
+
"frame": {"w": 1920, "h": 1080, "aspect": "16:9"},
|
|
175
|
+
"fps": 30,
|
|
176
|
+
"spec": {"max_duration": 240 * 60, "aspects": ["16:9", "1:1", "9:16", "4:5"], "min_height": 720, "fps_max": 60,
|
|
177
|
+
"codecs": ["h264", "hevc"], "max_bytes": 4 * 1024 ** 3,
|
|
178
|
+
"lufs": -14, "lufs_tol": 3.0, "tp": -1.0, "sdr_only": True},
|
|
179
|
+
"safe": _SAFE_5,
|
|
180
|
+
"caption": _CAP_WIDE,
|
|
181
|
+
"preset": "facebook", "check": "facebook",
|
|
182
|
+
},
|
|
183
|
+
"podcast": {
|
|
184
|
+
"title": "Podcast (audio)",
|
|
185
|
+
"frame": None,
|
|
186
|
+
"fps": None,
|
|
187
|
+
"spec": {"max_duration": None, "aspects": None, "min_height": 0, "fps_max": None,
|
|
188
|
+
"codecs": None, "max_bytes": None,
|
|
189
|
+
"lufs": -16, "lufs_tol": 1.0, "tp": -1.0, "sdr_only": False},
|
|
190
|
+
"safe": _NO_SAFE,
|
|
191
|
+
"caption": _CAP_WIDE,
|
|
192
|
+
"preset": None, "check": "podcast",
|
|
193
|
+
},
|
|
194
|
+
# Not destinations an app owns, but compliance targets check.py has always had.
|
|
195
|
+
"broadcast": {
|
|
196
|
+
"title": "Broadcast (EBU R128)",
|
|
197
|
+
"frame": {"w": 1920, "h": 1080, "aspect": "16:9"},
|
|
198
|
+
"fps": None,
|
|
199
|
+
"spec": {"max_duration": None, "aspects": ["16:9"], "min_height": 1080, "fps_max": 60,
|
|
200
|
+
"codecs": ["prores", "dnxhd", "h264", "hevc", "mpeg2video"], "max_bytes": None,
|
|
201
|
+
"lufs": -23, "lufs_tol": 1.0, "tp": -1.0, "sdr_only": False},
|
|
202
|
+
"safe": _SAFE_5,
|
|
203
|
+
"caption": _CAP_WIDE,
|
|
204
|
+
"preset": "prores", "check": "broadcast",
|
|
205
|
+
},
|
|
206
|
+
"custom": {
|
|
207
|
+
"title": "Custom",
|
|
208
|
+
"frame": None,
|
|
209
|
+
"fps": None,
|
|
210
|
+
"spec": {"max_duration": None, "aspects": None, "min_height": 0, "fps_max": None,
|
|
211
|
+
"codecs": None, "max_bytes": None,
|
|
212
|
+
"lufs": None, "lufs_tol": 2.0, "tp": -1.0, "sdr_only": False},
|
|
213
|
+
"safe": _NO_SAFE,
|
|
214
|
+
"caption": _CAP_WIDE,
|
|
215
|
+
"preset": None, "check": "custom",
|
|
216
|
+
},
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
# The spellings people actually write for those destinations. resolve() maps them onto the
|
|
220
|
+
# canonical name, and every tool's --platform/--safe/--preset accepts both, so
|
|
221
|
+
# `--platform youtube-shorts` and `--platform shorts` are the same request everywhere.
|
|
222
|
+
ALIASES: Dict[str, str] = {"youtube-shorts": "shorts", "yt-shorts": "shorts", "yt": "youtube",
|
|
223
|
+
"instagram": "reels", "ig": "reels", "twitter": "x", "fb": "facebook"}
|
|
224
|
+
# One vocabulary for the word "platform": check.py, caption.py, graphics.py and look.py all
|
|
225
|
+
# offer this list (review 12 found three different ones). It is the compliance targets -- the
|
|
226
|
+
# destinations a delivery is checked against -- plus every alias; youtube-hdr and youtube-av1
|
|
227
|
+
# are export presets of the youtube target, not separate destinations, so they are not in it.
|
|
228
|
+
PLATFORM_CHOICES: List[str] = sorted({n for n in PLATFORMS if PLATFORMS[n]["check"] == n} | set(ALIASES))
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
def spec_of(name: str) -> Dict[str, Any]:
|
|
232
|
+
"""check.py's compliance row values for a destination."""
|
|
233
|
+
return dict(PLATFORMS[name]["spec"])
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
def safe_margins_px(name: str, width: int, height: int) -> Dict[str, int]:
|
|
237
|
+
"""The safe zone in pixels for a frame of this size, as whole pixels per edge."""
|
|
238
|
+
s = PLATFORMS[name]["safe"]
|
|
239
|
+
return {"top": int(round(s["top"] * height)), "bottom": int(round(s["bottom"] * height)),
|
|
240
|
+
"left": int(round(s["left"] * width)), "right": int(round(s["right"] * width))}
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def caption_defaults(name: str) -> Dict[str, Any]:
|
|
244
|
+
"""caption.py flag values for this destination: --size/--margin in ASS units."""
|
|
245
|
+
cap = dict(PLATFORMS[name]["caption"])
|
|
246
|
+
safe = PLATFORMS[name]["safe"]
|
|
247
|
+
edge = safe["top"] if cap["position"].startswith("top") else safe["bottom"]
|
|
248
|
+
cap["size"] = ass_units(cap["size"])
|
|
249
|
+
cap["margin"] = ass_units(edge)
|
|
250
|
+
return cap
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def resolve(name: Optional[str]) -> Optional[str]:
|
|
254
|
+
"""Accept the spellings people write for a destination ('youtube-shorts', 'ig')."""
|
|
255
|
+
if not name:
|
|
256
|
+
return None
|
|
257
|
+
key = str(name).strip().lower()
|
|
258
|
+
return ALIASES.get(key, key)
|