diff --git a/src/previews/video.rs b/src/previews/video.rs index 491f573..bb55da3 100644 --- a/src/previews/video.rs +++ b/src/previews/video.rs @@ -12,6 +12,7 @@ pub struct VideoPath<'a>(pub &'a Path); impl<'a> Previewable for VideoPath<'a> { fn get_thumbnail(&self) -> Result>> { let duration_cmd = Command::new("ffprobe") + .args(["-threads", "1"]) .args(["-v", "error"]) .args(["-show_entries", "format=duration"]) .args(["-of", "default=noprint_wrappers=1:nokey=1"]) @@ -28,6 +29,7 @@ impl<'a> Previewable for VideoPath<'a> { .parse::()?; let outfile = tempfile::Builder::new().suffix(".webp").tempfile()?; let thumbnail_cmd = Command::new("ffmpeg") + .args(["-threads", "1"]) .args(["-i", &self.0.to_string_lossy()]) .args(["-vframes", "1"]) .args(["-ss", &(300f64.min(duration / 4.0)).to_string()])