-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_edl.py
More file actions
138 lines (121 loc) · 6.67 KB
/
Copy pathbuild_edl.py
File metadata and controls
138 lines (121 loc) · 6.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/usr/bin/env python3
"""
build_edl.py — generate a curated edl.json for the ItoMarkets brand film.
Pulls from local footage and generated assets.
"""
import json, os, subprocess
BUILD = os.path.dirname(os.path.abspath(__file__))
def dur(path):
try:
out = subprocess.run(["ffprobe", "-v", "error", "-show_entries", "format=duration",
"-of", "csv=p=0", path], capture_output=True, text=True, timeout=30).stdout.strip()
return float(out or 0)
except Exception:
return 0
def clip(id, src, t_in, t_out, section, family, rating, subject, grade, note):
return {
"id": id,
"src": src,
"in": t_in,
"out": t_out,
"speed": 1.0,
"section": section,
"family": family,
"rating": rating,
"subject": subject,
"grade": grade,
"note": note
}
def main():
pool = []
# Generated still clips
stills = [
("h_euler", "assets/gen/still_euler.mp4", "history", "math", 5, "euler", ["mono", "gold"], "Euler portrait"),
("h_alkhwarizmi", "assets/gen/still_alkhwarizmi.mp4", "history", "math", 4, "alkhwarizmi", ["mono", "gold"], "Al-Khwarizmi"),
("h_riemann", "assets/gen/still_riemann.mp4", "history", "math", 5, "riemann", ["mono", "cool"], "Riemann portrait"),
("h_ito", "assets/gen/still_ito.mp4", "history", "math", 5, "ito", ["mono", "cool"], "Ito Kiyoshi"),
("h_simons", "assets/gen/still_simons.mp4", "history", "math", 4, "simons", ["crush_black"], "Jim Simons"),
("c_atlas", "assets/gen/still_atlas.mp4", "close", "myth", 5, "atlas", ["gold"], "Atlas Farnese"),
("c_globe", "assets/gen/still_globe.mp4", "close", "myth", 4, "globe", ["gold"], "Atlas globe"),
]
for id, src, sec, fam, rating, sub, grade, note in stills:
if os.path.exists(os.path.join(BUILD, src)):
pool.append(clip(id, src, 0.0, dur(os.path.join(BUILD, src)), sec, fam, rating, sub, grade, note))
# Generated Manim clips
manim = [
("m_sacred", "assets/gen/sacred_geo.mp4", "history", "geometry", 4, ["crush_black", "gold"], "Sacred geometry"),
("m_basket", "assets/gen/basket.mp4", "history", "geometry", 4, ["crush_black", "gold"], "Basket convergence"),
("m_web", "assets/gen/market_web.mp4", "solution", "network", 4, ["cool"], "Market network"),
]
for id, src, sec, fam, rating, grade, note in manim:
if os.path.exists(os.path.join(BUILD, src)):
pool.append(clip(id, src, 0.0, dur(os.path.join(BUILD, src)), sec, fam, rating, fam, grade, note))
# ItoMarkets existing brand video
ito_vid = "/Users/affoon/Downloads/itovault/ito_vid.mp4"
if os.path.exists(ito_vid):
d = dur(ito_vid)
pool.append(clip("p_ito", ito_vid, 0.0, min(d, 8.0), "solution", "product", 4, "product", ["crush_black"], "ito brand video"))
# Talking clips
talking = [
("/Users/affoon/Downloads/rawtalkingclips/2026-05-26 01-31-25.mov", "founder1"),
("/Users/affoon/Downloads/rawtalkingclips/IMG_0212.MOV", "founder2"),
("/Users/affoon/Downloads/rawtalkingclips/IMG_4763.MOV", "founder3"),
]
for i, (path, label) in enumerate(talking):
if os.path.exists(path):
d = dur(path)
pool.append(clip(f"f_{label}", path, 0.0, min(d, 6.0), "solution", "founder", 3, "founder", ["crush_black"], f"talking clip {label}"))
# Screen recordings / taste clips
screens = [
("/Users/affoon/Downloads/clipsfortaste/ScreenRecording_06-07-2026 07-55-27_1.mp4", "screen1", "problem"),
("/Users/affoon/Downloads/clipsfortaste/ScreenRecording_06-07-2026 08-04-44_1.mp4", "screen2", "problem"),
("/Users/affoon/Downloads/clipsfortaste/ScreenRecording_06-07-2026 08-53-06_1.mp4", "screen3", "problem"),
("/Users/affoon/Downloads/clipsfortaste/ScreenRecording_06-07-2026 09-29-14_1.mp4", "screen4", "product"),
("/Users/affoon/Downloads/clipsfortaste/ScreenRecording_06-07-2026 09-38-13_1.mp4", "screen5", "product"),
]
for path, label, sec in screens:
if os.path.exists(path):
d = dur(path)
pool.append(clip(f"s_{label}", path, 0.0, min(d, 5.0), sec, "screen", 3, "screen", ["crush_black"], f"screen recording {label}"))
# Free stock footage downloads
stock = [
("assets/raw/dareful_nyse_entrance.mp4", "nyse_entrance", "open", 4),
("assets/raw/vidsplay_stock_exchange.mp4", "stock_exchange", "history", 4),
("assets/raw/vidsplay_business_graph.mp4", "business_graph", "product", 3),
("assets/raw/vidsplay_office_building.mp4", "office_building", "close", 3),
("assets/raw/archive_vista_nyse_open.mp4", "vista_nyse_open", "open", 4),
("assets/raw/archive_vista_nyse_floor.mp4", "vista_nyse_floor", "history", 4),
("assets/raw/archive_behind_ticker_tape_open.mp4", "behind_ticker", "history", 4),
]
for src, label, sec, rating in stock:
path = os.path.join(BUILD, src)
if os.path.exists(path):
d = dur(path)
pool.append(clip(f"st_{label}", src, 0.0, min(d, 5.0), sec, "stock", rating, "broll", ["crush_black"], f"free stock {label}"))
# Raw footage selects — small subset of the best/unknown
raw = [
("/Users/affoon/Downloads/allrawfootageunsorted/ito_markets_intro.mp4", "ito_intro", "open"),
("/Users/affoon/Downloads/allrawfootageunsorted/video-75_singular_display.mov", "pov1", "open"),
("/Users/affoon/Downloads/allrawfootageunsorted/video-235_singular_display.mov", "pov2", "open"),
("/Users/affoon/Downloads/allrawfootageunsorted/dji_export_20260604_094245_1780580565393_compose_0.mov", "drone1", "close"),
("/Users/affoon/Downloads/allrawfootageunsorted/dji_export_20260604_101202_1780582322354_compose_0.mov", "drone2", "close"),
("/Users/affoon/Downloads/allrawfootageunsorted/IMG_0225.MOV", "city1", "open"),
("/Users/affoon/Downloads/allrawfootageunsorted/IMG_0590.MOV", "city2", "open"),
("/Users/affoon/Downloads/allrawfootageunsorted/IMG_3842.MOV", "city3", "close"),
]
for path, label, sec in raw:
if os.path.exists(path):
d = dur(path)
pool.append(clip(f"r_{label}", path, 0.0, min(d, 5.0), sec, "clip", 3, "broll", ["crush_black"], f"raw footage {label}"))
edl = {
"project": "itomarkets-brand-film",
"fps": 30,
"canvas": [1920, 1080],
"grade_base": "ito: deep contrast, warm-neutral highlights, cool shadows, subtle grain",
"pool": pool
}
with open(os.path.join(BUILD, "edl.json"), "w") as fh:
json.dump(edl, fh, indent=1)
print(f"wrote edl.json with {len(pool)} selects")
if __name__ == "__main__":
main()