This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

🎨 Use .args() when creating ffmpeg process

+16 -22
+16 -22
src/video/encoding.rs
··· 108 108 self.initial_canvas.resolution_to_size_even(self.resolution); 109 109 110 110 Ok(std::process::Command::new("ffmpeg") 111 - .arg("-i") 112 - .arg(self.audiofile.to_str().unwrap()) 113 - .arg("-f") 114 - .arg("rawvideo") 115 - .arg("-pixel_format") 116 - .arg("rgba") 117 - .arg("-video_size") 118 - .arg(format!("{width}x{height}")) 119 - .arg("-framerate") 120 - .arg(format!("{}", self.fps)) 121 - .arg("-i") 122 - .arg("-") 123 - .arg("-map") 124 - .arg("0:a") 125 - .arg("-map") 126 - .arg("1:v") 111 + .args(["-i", (self.audiofile.to_str().unwrap())]) 112 + .args(["-f", ("rawvideo")]) 113 + .args(["-pixel_format", ("rgba")]) 114 + .args(["-video_size", &(format!("{width}x{height}"))]) 115 + .args(["-framerate", &self.fps.to_string()]) 116 + .args(["-i", ("-")]) 117 + .args(["-map", ("0:a")]) 118 + .args(["-map", ("1:v")]) 127 119 .arg("-shortest") 128 120 .arg(output_path.to_str().unwrap()) 129 - .arg("-loglevel") 130 - .arg(if log::log_enabled!(log::Level::Debug) { 131 - "debug" 132 - } else { 133 - "error" 134 - }) 121 + .args([ 122 + "-loglevel", 123 + (if log::log_enabled!(log::Level::Debug) { 124 + "debug" 125 + } else { 126 + "error" 127 + }), 128 + ]) 135 129 .stdin(std::process::Stdio::piped()) 136 130 .stdout(File::create("ffmpeg_stdout.log")?) 137 131 .stderr(File::create("ffmpeg_stderr.log")?)