Files
spacedrive/crates/ffmpeg
0xBA5E64 f68b387840 Update CONTRIBUTING.md (#2820)
* docs: Remove extranious `clean` commands, `pnpm clean` already runs all three.

* docs: Update recommended Rust version to reflect current `rust-toolchain.toml`

* docs: Refactor the Desktop clients developer setup guides

* docs: Refactor the Troubleshooting section for developer setup

* docs: `dev:web` is deprecated, according to @Rocky43007

* docs: Specify that the Tauri app doesn't play with `sd-server`

* docs: Nevermind! `dev:web` is still on the menu!

* docs: GitHub.md "Alerts" don't like indentation.

* fix: "You're just like the team now, just committing random fixes to whatever branch" - @rocky43007

* Apply suggestions from code review

Thanks Lynx!

Co-authored-by: Lynx <141365347+iLynxcat@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Lynx <141365347+iLynxcat@users.noreply.github.com>

* docs: Completely rewritten Mobile App section in `CONTRIBUTING.md`

* docs: Polish polish polish

* docs: Poleish?

* docs: Trimming & Trimming

* docs: Add final step clarification for running Android app

* docs: Try fixing the tip line embed

* Update CONTRIBUTING.md

Co-authored-by: Philipp <34287258+Phippe@users.noreply.github.com>

* Fix minor grammar & spelling mistakes

* Fix Github Docs Contributing link

---------

Co-authored-by: Lynx <141365347+iLynxcat@users.noreply.github.com>
Co-authored-by: Philipp <34287258+Phippe@users.noreply.github.com>
Co-authored-by: Arnab Chakraborty <11457760+Rocky43007@users.noreply.github.com>
2024-11-30 16:38:37 -05:00
..
2024-11-30 16:38:37 -05:00
2022-09-29 21:02:29 -07:00

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
}