Add download ffmpeg error output

This commit is contained in:
ByteDream 2023-01-13 16:04:53 +01:00
parent 08c4e30a06
commit 3d145b021b

View file

@ -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 {