From 5c50b3325151f027a7ece4553985e5b2654eed05 Mon Sep 17 00:00:00 2001 From: Dominic Date: Sat, 6 Jan 2024 18:55:27 +0100 Subject: [PATCH] allow preprocessing to keep stereo; asks which files to use --- src/main.rs | 33 ++++++++++++++++++++++++++++++--- src/render/ffmpeg.rs | 23 ++++++++++++++++------- src/render/mod.rs | 2 +- 3 files changed, 47 insertions(+), 11 deletions(-) diff --git a/src/main.rs b/src/main.rs index a6715b6..52e8565 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,12 +37,17 @@ struct Args { course: String, /// The memory limit for external tools like ffmpeg. - #[clap(short, long, default_value = "8G")] + #[clap(short, long, default_value = "12G")] mem_limit: String, /// Transcode the final video clip down to the minimum resolution specified. #[clap(short, long)] - transcode: Option + transcode: Option, + + /// Treat the audio as stereo. By default, only one channel from the input stereo will + /// be used, assuming either the other channel is backup or the same as the used. + #[clap(short, long, default_value = "false")] + stereo: bool } macro_rules! resolutions { @@ -133,6 +138,7 @@ struct ProjectLecture { #[derive(Deserialize, Serialize)] struct ProjectSource { files: Vec, + stereo: bool, #[serde_as(as = "Option")] start: Option