mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-20 08:19:11 +00:00
9d72de352b
* Improve bash setup script (less silent!) * use proper FFmpeg capitalization in relevant docs * Fix typo in Homebrew error message Co-authored-by: maxichrome <maxichrome@users.noreply.github.com>
904 B
904 B
FFmpeg Thumbnailer RS
Rust implementation of a thumbnail generation for video files using FFmpeg. Based on https://github.com/dirkvdb/ffmpegthumbnailer
For now only implements the minimum API for Spacedrive needs. PRs are welcome
Usage
use ffmpegthumbnailer_rs::{to_thumbnail, ThumbnailerError};
#[tokio::main]
async fn main() -> Result<(), ThumbnailerError> {
to_thumbnail("input.mp4", "output.webp", 256, 100.0).await
}
Or you can use a builder to change the default options
use ffmpegthumbnailer_rs::{ThumbnailerBuilder, ThumbnailerError};
#[tokio::main]
async fn main() -> Result<(), ThumbnailerError> {
let thumbnailer = ThumbnailerBuilder::new()
.width_and_height(420, 315)
.seek_percentage(0.25)?
.with_film_strip(false)
.quality(80.0)?
.build();
thumbnailer.process("input.mp4", "output.webp").await
}