mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Add generating file cli output
This commit is contained in:
parent
5c3f49e9f4
commit
a5e60ea6b7
2 changed files with 9 additions and 3 deletions
|
|
@ -307,7 +307,9 @@ impl Execute for Archive {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_mkv(&self, path, video_paths, audio_paths, subtitle_paths)?
|
let _progess_handler = progress!("Generating mkv");
|
||||||
|
generate_mkv(&self, path, video_paths, audio_paths, subtitle_paths)?;
|
||||||
|
info!("Mkv generated")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ async fn download_ffmpeg(ctx: &Context, download: &Download, variant_data: Varia
|
||||||
let (input_presets, output_presets) =
|
let (input_presets, output_presets) =
|
||||||
FFmpegPreset::ffmpeg_presets(download.ffmpeg_preset.clone())?;
|
FFmpegPreset::ffmpeg_presets(download.ffmpeg_preset.clone())?;
|
||||||
|
|
||||||
let ffmpeg = Command::new("ffmpeg")
|
let mut ffmpeg = Command::new("ffmpeg")
|
||||||
.stdin(Stdio::piped())
|
.stdin(Stdio::piped())
|
||||||
.stdout(Stdio::null())
|
.stdout(Stdio::null())
|
||||||
.stderr(Stdio::piped())
|
.stderr(Stdio::piped())
|
||||||
|
|
@ -259,7 +259,11 @@ async fn download_ffmpeg(ctx: &Context, download: &Download, variant_data: Varia
|
||||||
.arg(target.to_str().unwrap())
|
.arg(target.to_str().unwrap())
|
||||||
.spawn()?;
|
.spawn()?;
|
||||||
|
|
||||||
download_segments(ctx, &mut ffmpeg.stdin.unwrap(), None, variant_data).await?;
|
download_segments(ctx, &mut ffmpeg.stdin.take().unwrap(), None, variant_data).await?;
|
||||||
|
|
||||||
|
let _progress_handler = progress!("Generating output file");
|
||||||
|
ffmpeg.wait()?;
|
||||||
|
info!("Output file generated");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue