mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2025-12-11 20:15:30 +01:00
* Migrate to Tauri v2 Release Canidate * Formatting * Update pnpm * Update all tauri deps (js and rust) to Release Candidate 2 - A lot of misc fixes due to changes in the new versions of tauri, rspc and specta * Recreate pnpm-lock * Fix pnpm-lock * Formatting * Use 10 chars SHA for git deps - Update a couple of rust dependencies - Add taplo for toml auto formatting - Adjust some formatting configurations - Updated prettier and its plugins * Fix formatter settings * Minor improvements to Cargo.toml format --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
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)?
.quality(80.0)?
.build();
thumbnailer.process("input.mp4", "output.webp").await
}