From 3d145b021baa207016b9ca419c33cfbd4bf8aa46 Mon Sep 17 00:00:00 2001 From: ByteDream Date: Fri, 13 Jan 2023 16:04:53 +0100 Subject: [PATCH] Add download ffmpeg error output --- crunchy-cli-core/src/cli/download.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crunchy-cli-core/src/cli/download.rs b/crunchy-cli-core/src/cli/download.rs index 9885b3c..66027a2 100644 --- a/crunchy-cli-core/src/cli/download.rs +++ b/crunchy-cli-core/src/cli/download.rs @@ -340,6 +340,7 @@ async fn download_ffmpeg( }; let mut ffmpeg = Command::new("ffmpeg") + .stdout(Stdio::null()) .stderr(Stdio::piped()) .arg("-y") .args(input_presets) @@ -350,7 +351,9 @@ async fn download_ffmpeg( .spawn()?; let _progress_handler = progress!("Generating output file"); - ffmpeg.wait()?; + if !ffmpeg.wait()?.success() { + bail!("{}", std::io::read_to_string(ffmpeg.stderr.unwrap())?) + } info!("Output file generated"); if let Some(mut stdout_file) = stdout_tempfile {