This repository has no description
0

Configure Feed

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

💡 Comment ffmpeg invokation flags

+29 -8
+29 -8
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 - .args(["-i", (self.audiofile.to_str().unwrap())]) 112 - .args(["-f", ("rawvideo")]) 113 - .args(["-pixel_format", ("rgba")]) 114 - .args(["-video_size", &(format!("{width}x{height}"))]) 111 + // Audio // 112 + // File 113 + .args(["-i", self.audiofile.to_str().unwrap()]) 114 + // 115 + // Video // 116 + // Raw video input 117 + .args(["-f", "rawvideo"]) 118 + // RGBA Pixels 119 + .args(["-pixel_format", "rgba"]) 120 + // Dimensions 121 + .args(["-video_size", &format!("{width}x{height}")]) 122 + // FPS 115 123 .args(["-framerate", &self.fps.to_string()]) 116 - .args(["-i", ("-")]) 117 - .args(["-map", ("0:a")]) 118 - .args(["-map", ("1:v")]) 124 + // Input from pipe 125 + .args(["-i", "-"]) 126 + .stdin(std::process::Stdio::piped()) 127 + // 128 + // Mapping // 129 + // Audio from first input 130 + .args(["-map", "0:a"]) 131 + // Video from second input 132 + .args(["-map", "1:v"]) 133 + // Use shortest stream for final duration 119 134 .arg("-shortest") 135 + // 136 + // Output // 137 + // Write to file 120 138 .arg(output_path.to_str().unwrap()) 139 + // Debug ffmpeg too if shapemaker is debugging 121 140 .args([ 122 141 "-loglevel", 123 142 (if log::log_enabled!(log::Level::Debug) { ··· 126 145 "error" 127 146 }), 128 147 ]) 129 - .stdin(std::process::Stdio::piped()) 148 + // Put stdout/stderr here so that it doesn't mess with progress bars 130 149 .stdout(File::create("ffmpeg_stdout.log")?) 131 150 .stderr(File::create("ffmpeg_stderr.log")?) 151 + // 152 + // Spawn it! 132 153 .spawn()?) 133 154 } 134 155