mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2025-12-11 20:15:30 +01:00
* Renaming error type on ffmpeg subcrate * Version manager overhaul * Reworked thumbnail actor * Updating sharding scheme * New migration system for thumbnails * Updating search to new actor * Updating custom_uri to new thumbnail improvements * Updating library to new thumbnail stuff * LibraryId type alias * Updating indexer to new thumbnail actor * Updating watcher to new thumbnail actor * Update location manager to use LibraryId type alias * Updating location metadata to new LibraryId type alias * New LocationPubId type alias * Updating ephemeral walker to new thumbnail stuff * Updating media processor to new thumbnail actor * New thumbnailer actor state manager * Introducing the concept of job phases * Segregating the thumbnailer actor worker fn * Fixes on job pausing * Processing batches with progress reporting * Updated actor * Updated media processor * Small tweaks * Updating non indexed walker * Changing a UI string
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
}