change video preview format to webp
parent
ba02f20dc2
commit
6b70d706fa
|
@ -26,7 +26,7 @@ impl<'a> Previewable for VideoPath<'a> {
|
||||||
let duration = String::from_utf8_lossy(&duration_cmd.stdout)
|
let duration = String::from_utf8_lossy(&duration_cmd.stdout)
|
||||||
.trim()
|
.trim()
|
||||||
.parse::<f64>()?;
|
.parse::<f64>()?;
|
||||||
let outfile = tempfile::Builder::new().suffix(".png").tempfile()?;
|
let outfile = tempfile::Builder::new().suffix(".webp").tempfile()?;
|
||||||
let thumbnail_cmd = Command::new("ffmpeg")
|
let thumbnail_cmd = Command::new("ffmpeg")
|
||||||
.args(["-i", &self.0.to_string_lossy()])
|
.args(["-i", &self.0.to_string_lossy()])
|
||||||
.args(["-vframes", "1"])
|
.args(["-vframes", "1"])
|
||||||
|
|
Loading…
Reference in New Issue