Add rust_video: Rust keyframe extraction Python module

Introduce the rust_video package, a Rust-based ultra-fast video keyframe extraction tool with SIMD and parallel optimizations. Includes Cargo.toml and pyproject.toml for Rust and Python packaging, Python type hints (rust_video.pyi), and the main Rust library (lib.rs) with PyO3 bindings, performance benchmarking, and system info utilities.
This commit is contained in:
雅诺狐
2025-08-30 00:09:22 +08:00
committed by Windpicker-owo
parent 01e06ae95b
commit b6da1ebfbd
4 changed files with 1268 additions and 0 deletions

31
rust_video/Cargo.toml Normal file
View File

@@ -0,0 +1,31 @@
[package]
name = "rust_video"
version = "0.1.0"
edition = "2021"
authors = ["VideoAnalysis Team"]
description = "Ultra-fast video keyframe extraction tool in Rust"
license = "MIT"
[dependencies]
anyhow = "1.0"
clap = { version = "4.0", features = ["derive"] }
rayon = "1.11"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
chrono = { version = "0.4", features = ["serde"] }
# PyO3 dependencies
pyo3 = { version = "0.22", features = ["extension-module"] }
[lib]
name = "rust_video"
crate-type = ["cdylib"]
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
strip = true