a02d892f831f
test_movie.rs
//! Write a synthetic colour-bar test movie (H.264 in MP4, 320x192, 24 fps).
//!
//! `cargo run -p soundcraft-video --example test_movie -- out.mp4 [seconds]`
fn main() {
let mut args = std::env::args().skip(1);
let out = args.next().unwrap_or_else(|| "test_pattern.mp4".into());
let secs = args.next().and_then(|s| s.parse().ok()).unwrap_or(4);
match soundcraft_video::synth::test_pattern_mp4(secs).map(|b| std::fs::write(&out, b)) {
Ok(Ok(())) => println!("wrote {out}"),
Ok(Err(e)) => eprintln!("{out}: {e}"),
Err(e) => eprintln!("{e}"),
}
}
No file is open. Choose one in the tree, or press Ctrl+O (⌘O on a Mac) to find one by name.
Syntax highlighting could not load. The unmodified read-only text remains available above.