From 964d1049af953bfeaf9d2a75485f245e4cb0ffe0 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 17 Mar 2026 22:03:19 -0400 Subject: [PATCH] new ffmpeg crate --- Cargo.lock | 8 ++++++++ Cargo.toml | 2 ++ crates/lib/ffmpeg_utils/Cargo.toml | 24 ++++++++++++++++++++++++ crates/lib/ffmpeg_utils/src/lib.rs | 19 +++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 crates/lib/ffmpeg_utils/Cargo.toml create mode 100644 crates/lib/ffmpeg_utils/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 2af3f9fb68..faf63a0994 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4242,6 +4242,14 @@ dependencies = [ "subtle", ] +[[package]] +name = "ffmpeg_utils" +version = "0.0.1" +dependencies = [ + "errors", + "workspace-build-acceleration", +] + [[package]] name = "ffprobe" version = "0.4.0" diff --git a/Cargo.toml b/Cargo.toml index 5f679f507a..935028609d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,6 +65,7 @@ members = [ "crates/lib/easyenv", # NB: Vendored version of https://github.com/echelon/easyenv.rs that we'll improve. "crates/lib/email_sender", "crates/lib/errors", + "crates/lib/ffmpeg_utils", "crates/lib/files/archives", "crates/lib/files/file_to_base64_url", "crates/lib/files/filesys", @@ -233,6 +234,7 @@ easyenv = { path = "crates/lib/easyenv" } enums = { path = "crates/schema/public/enums" } enums_public = { path = "crates/schema/public/enums_public" } errors = { path = "crates/lib/errors" } +ffmpeg_utils = { path = "crates/lib/ffmpeg_utils" } fal_client = { path = "crates/api_clients/fal_client" } file_to_base64_url = { path = "crates/lib/files/file_to_base64_url" } filesys = { path = "crates/lib/files/filesys" } diff --git a/crates/lib/ffmpeg_utils/Cargo.toml b/crates/lib/ffmpeg_utils/Cargo.toml new file mode 100644 index 0000000000..caaa2910aa --- /dev/null +++ b/crates/lib/ffmpeg_utils/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "ffmpeg_utils" +description = "Common tools and commands for ffmpeg and ffprobe." +edition = "2024" +version = "0.0.1" +authors = [ + "Brandon Thomas ", + "Brandon Thomas ", +] +publish = false + +[lib] +name = "ffmpeg_utils" +path = "src/lib.rs" + +[package.metadata.cargo-udeps.ignore] +normal = ["workspace-build-acceleration"] + +[dependencies] +# cargo-hakari workspace hack (faster compile times) +workspace-build-acceleration.workspace = true + +# Internal +errors.workspace = true diff --git a/crates/lib/ffmpeg_utils/src/lib.rs b/crates/lib/ffmpeg_utils/src/lib.rs new file mode 100644 index 0000000000..6eb70013b9 --- /dev/null +++ b/crates/lib/ffmpeg_utils/src/lib.rs @@ -0,0 +1,19 @@ +//! ffmpeg_utils +//! +//! Common tools and commands for ffmpeg and ffprobe. +//! + +// Never allow these +#![forbid(private_bounds)] +#![forbid(private_interfaces)] +#![forbid(unused_must_use)] // NB: It's unsafe to not close/check some things + +// Okay to toggle +#![forbid(unreachable_patterns)] +#![forbid(unused_imports)] +#![forbid(unused_mut)] +#![forbid(unused_variables)] + +// Always allow +#![allow(dead_code)] +#![allow(non_snake_case)]