diff --git a/examples/game_of_life.rs b/examples/game_of_life.rs new file mode 100644 index 0000000..a2c5b7b --- /dev/null +++ b/examples/game_of_life.rs @@ -0,0 +1,15 @@ +use anyhow::Result; +use std::process::Command; + +/// Conway's Game of Life in FFmpeg +/// +/// +pub fn main() -> Result<()> { + Command::new("ffplay") + .arg("-hide_banner") + .arg("-f").arg("lavfi") + .arg("-i").arg("life=s=300x200:mold=10:r=60:ratio=0.08:death_color=#C83232:life_color=#00ff00,scale=1200:800:flags=16") + .spawn()? + .wait()?; + Ok(()) +}