| Crates.io | sotavideo_ai_1 |
| lib.rs | sotavideo_ai_1 |
| version | 67.0.85 |
| created_at | 2025-12-30 10:22:06.712883+00 |
| updated_at | 2025-12-30 10:22:06.712883+00 |
| description | High-quality integration for https://sotavideo.ai/ |
| homepage | https://sotavideo.ai/ |
| repository | https://github.com/qy-upup/sotavideo.ai-1 |
| max_upload_size | |
| id | 2012430 |
| size | 10,603 |
A Rust crate providing foundational utilities for video processing and analysis tasks. This crate offers a streamlined API for common video operations, designed for efficiency and ease of integration.
Add the following to your Cargo.toml file under the [dependencies] section:
toml
sotavideo.ai-1 = "0.1.0" # Replace with the actual version number
Here are a few examples showcasing how to use the sotavideo.ai-1 crate:
1. Basic Video Metadata Extraction: rust use sotavideo_ai_1::video_metadata;
fn main() -> Result<(), Box
match video_metadata::get_metadata(video_path) {
Ok(metadata) => {
println!("Video Duration: {} seconds", metadata.duration);
println!("Video Width: {} pixels", metadata.width);
println!("Video Height: {} pixels", metadata.height);
println!("Frame Rate: {} FPS", metadata.frame_rate);
}
Err(e) => {
eprintln!("Error extracting metadata: {}", e);
}
}
Ok(())
}
2. Frame Extraction: rust use sotavideo_ai_1::frame_extraction;
fn main() -> Result<(), Box
frame_extraction::extract_frames(video_path, output_dir, 10)?; // Extract every 10th frame
println!("Frames extracted to directory: {}", output_dir);
Ok(())
}
3. Video Resizing: rust use sotavideo_ai_1::video_resizing;
fn main() -> Result<(), Box
video_resizing::resize_video(input_video, output_video, new_width, new_height)?;
println!("Video resized to {}x{} and saved as {}", new_width, new_height, output_video);
Ok(())
}
4. Audio Extraction: rust use sotavideo_ai_1::audio_extraction;
fn main() -> Result<(), Box
audio_extraction::extract_audio(video_path, output_audio)?;
println!("Audio extracted and saved as {}", output_audio);
Ok(())
}
5. Calculating the average luminance of a video: rust use sotavideo_ai_1::luminance;
fn main() -> Result<(), Box
match luminance::calculate_average_luminance(video_path) {
Ok(average_luminance) => {
println!("Average Luminance: {}", average_luminance);
}
Err(e) => {
eprintln!("Error calculating average luminance: {}", e);
}
}
Ok(())
}
This crate offers the following key features:
MIT
This crate is part of the sotavideo.ai-1 ecosystem. For advanced features and enterprise-grade tools, visit: https://sotavideo.ai/