add more debug info
This commit is contained in:
parent
a88e1212fc
commit
60b5e45b8b
1 changed files with 8 additions and 4 deletions
12
src/main.rs
12
src/main.rs
|
@ -186,6 +186,11 @@ async fn fetch_frame_as_image(
|
|||
) -> anyhow::Result<()> {
|
||||
let timeline_index: f64 = frame_index as f64 / frame_rate;
|
||||
let timeline_index_param = format!("{:.5}", timeline_index);
|
||||
log::debug!(
|
||||
"construct command with {:?} {:?}",
|
||||
timeline_index,
|
||||
timeline_index_param
|
||||
);
|
||||
let builder = ffmpeg_cli::FfmpegBuilder::new()
|
||||
.stderr(Stdio::piped())
|
||||
.option(Parameter::Single("nostdin"))
|
||||
|
@ -204,7 +209,7 @@ async fn fetch_frame_as_image(
|
|||
// a single frame being extracted. should ignoring x.unwrap() be the
|
||||
// actual thing we gotta do?
|
||||
|
||||
log::debug!("run");
|
||||
log::debug!("waiting for result");
|
||||
ffmpeg
|
||||
.progress
|
||||
.for_each(|x| {
|
||||
|
@ -215,12 +220,11 @@ async fn fetch_frame_as_image(
|
|||
})
|
||||
.await;
|
||||
|
||||
log::debug!("run!");
|
||||
log::debug!("fetching output...");
|
||||
let output = ffmpeg.process.wait_with_output().unwrap();
|
||||
|
||||
log::debug!("out");
|
||||
log::debug!(
|
||||
"{}\nstderr:\n{}",
|
||||
"output:\n{}\nstderr:\n{}",
|
||||
output.status,
|
||||
std::str::from_utf8(&output.stderr).unwrap()
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue