Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
CC2a: raea export capcut finds a composition's footage where the render did: a staticFile path (/media/x) in the edit's media/, then the project's media/ and assets/ (raea-core-scene's media_path, the renderer's own lookup). It read /media/x as a file at the disk's root, so every project that names its footage with staticFile was refused (found making the release post's draft). The summary line says 1 clip and 1 sound, not 1 clips
shinyobjectzfddaf29fb1e7
diff --git a/Cargo.lock b/Cargo.lockindex 1741ebac..b2ea663d 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -13602,6 +13602,7 @@ name = "raea-app-capcut"version = "0.1.0"dependencies = ["image",+ "raea-core-scene","raea-io-alpha","raea-io-capcut","raea-io-home",diff --git a/apps/capcut/Cargo.toml b/apps/capcut/Cargo.tomlindex 29ae4bc7..bd218504 100644--- a/apps/capcut/Cargo.toml+++ b/apps/capcut/Cargo.toml@@ -12,5 +12,7 @@ raea-io-capcut = { path = "../../io/capcut" }raea-io-alpha = { path = "../../io/alpha" }raea-io-media = { path = "../../io/media", default-features = false, features = ["soft-audio", "apple"] }raea-io-home = { path = "../../io/home" }+# the renderer's own lookup of a staticFile path (/media/x), so the export finds the files the render drew+raea-core-scene = { path = "../../core/scene" }serde_json = "1"image = { version = "0.25", default-features = false, features = ["jpeg"] }diff --git a/apps/capcut/src/lib.rs b/apps/capcut/src/lib.rsindex 658139a0..59df849b 100644--- a/apps/capcut/src/lib.rs+++ b/apps/capcut/src/lib.rs@@ -193,15 +193,15 @@ fn export(args: &[String]) -> R<String> {};let count = |k: Kind, n: &str| tl.tracks.iter().filter(|t| t.kind == k && t.name.starts_with(n)).map(|t| t.clips.len()).sum::<usize>();let mut said = format!(- "APPLIED CapCut draft \"{name}\" at {}: {} tracks, {} footage clips, {} overlay clips ({}, {:.1} MB){}, {} sounds; {:.2} s at {fps} fps, {w}x{h}; {listed}; markers from {}\n the reference render and the movies raea drew: {}",+ "APPLIED CapCut draft \"{name}\" at {}: {} tracks, {}, {} ({}, {:.1} MB){}, {}; {:.2} s at {fps} fps, {w}x{h}; {listed}; markers from {}\n the reference render and the movies raea drew: {}",written.dir.display(),tl.tracks.len(),- count(Kind::Video, "") - count(Kind::Video, "raea "),- count(Kind::Video, "raea overlay"),+ many(count(Kind::Video, "") - count(Kind::Video, "raea "), "footage clip"),+ many(count(Kind::Video, "raea overlay"), "overlay clip"),codec.name(),made.bytes as f64 / 1e6,- under.as_ref().map_or(String::new(), |(_, m)| format!(", {} clips under the footage ({:.1} MB)", count(Kind::Video, "raea under"), m.bytes as f64 / 1e6)),- count(Kind::Audio, ""),+ under.as_ref().map_or(String::new(), |(_, m)| format!(", {} under the footage ({:.1} MB)", many(count(Kind::Video, "raea under"), "clip"), m.bytes as f64 / 1e6)),+ many(count(Kind::Audio, ""), "sound"),written.duration_us as f64 / 1e6,markers.from.as_deref().map_or("CapCut 8.5.0 (no draft CapCut made is in the store)".to_string(), |d| format!("the draft \"{d}\" CapCut made")),work.display()@@ -212,6 +212,11 @@ fn export(args: &[String]) -> R<String> {Ok(said)}+/// "1 clip", "4 clips"+fn many(k: usize, what: &str) -> String {+ if k == 1 { format!("1 {what}") } else { format!("{k} {what}s") }+}+/// Where CapCut's project list is copied before a draft is entered in it: the person's own folder, ~/.raea/capcut/backups/// ($RAEA_CAPCUT_BACKUPS; %LOCALAPPDATA%\raea\capcut\backups on Windows, which sets no HOME). Never raea's home, which/// is its install or, from a checkout, the source tree (11-11: a list's backup landed in the repository).diff --git a/apps/capcut/src/plan.rs b/apps/capcut/src/plan.rsindex ed23c652..99f48757 100644--- a/apps/capcut/src/plan.rs+++ b/apps/capcut/src/plan.rs@@ -174,9 +174,9 @@ pub fn lay(kind: Kind, name: &str, clips: Vec<Clip>) -> Vec<Track> {tracks}-/// A file the manifest names, as a path: relative to the composition's folder unless it's absolute.+/// A file the manifest names, as a path, found as the renderer finds it: a staticFile path (/media/x) in the edit's+/// media/, then the project's media/ and assets/; else absolute; else relative to the composition's folder.pub fn resolve(dir: &Path, src: &str) -> PathBuf {- let p = Path::new(src);- let p = if p.is_absolute() { p.to_path_buf() } else { dir.join(p) };+ let p = raea_core_scene::media_path(dir, src);p.canonicalize().unwrap_or(p)}diff --git a/apps/capcut/src/tests.rs b/apps/capcut/src/tests.rsindex c29150e7..dcd95da7 100644--- a/apps/capcut/src/tests.rs+++ b/apps/capcut/src/tests.rs@@ -69,3 +69,17 @@ fn clips_go_on_as_few_tracks_as_hold_them() {let t = lay(Kind::Audio, "sound", vec![c(0, 90), c(10, 5), c(15, 10), c(90, 5)]);assert_eq!(t.iter().map(|t| (t.name.as_str(), t.clips.len())).collect::<Vec<_>>(), [("sound", 2), ("sound 2", 2)]);}++/// staticFile("x.mp4") is "/media/x.mp4" in the manifest: the export finds it where the render did, in media/ beside+/// the edit, as it finds a relative path; an absolute path stays as it is+#[test]+fn a_static_file_is_found_in_the_edits_media_folder() {+ let dir = std::env::temp_dir().join(format!("raea-capcut-resolve-{}", std::process::id()));+ std::fs::create_dir_all(dir.join("media")).unwrap();+ std::fs::write(dir.join("media/a.mp4"), "").unwrap();+ let want = dir.join("media/a.mp4").canonicalize().unwrap();+ assert_eq!(resolve(&dir, "/media/a.mp4"), want);+ assert_eq!(resolve(&dir, "media/a.mp4"), want);+ assert_eq!(resolve(&dir, want.to_str().unwrap()), want);+ std::fs::remove_dir_all(&dir).unwrap();+}diff --git a/docs/capcut.feature b/docs/capcut.featureindex 5d9bd275..0421abd8 100644--- a/docs/capcut.feature+++ b/docs/capcut.feature@@ -47,6 +47,9 @@ Feature: A composition handed to CapCut, ready in its timeline, and transparentAnd the footage's own sound stays on its clip at the composition's gain when the manifest plays it there (itssound clip of the same file over the same frames from the same time); otherwise the clip is muted, and anyother sound of the file is an audio clip (CC2c), so nothing plays twice+ And each file is the one the render drew: a staticFile path (/media/x) in the edit's media/, then the+ project's media/ and assets/, as the renderer finds it (on 11-11 the export read /media/x as a file at the disk's+ root and refused every project that used staticFile)Scenario: CC2b. What raea draws is transparent overlay clips above the footage, and under it what's under itGiven the composition rendered again with its footage hidden, --alpha (RAEA_HIDE_MEDIA=1), the backgrounds of