feat: remote unuse json
This commit is contained in:
@@ -70,7 +70,11 @@ let custom_template = TemplateBuilder::new("My Custom Template")
|
||||
.enable_enhancement("prob-4")
|
||||
.enhancement_params(30, 20, 10) // denoise, detail, sharpen
|
||||
.enable_stabilization(60, 1) // smoothness, method
|
||||
.output_settings(6, 60.0) // FHD, 60fps
|
||||
.resolution(1920, 1080) // Custom resolution
|
||||
.video_codec("hevc_nvenc", Some(20)) // H.265 NVENC with CRF 20
|
||||
.preset("slow") // Encoding preset
|
||||
.audio_settings("aac", 192, 2) // AAC 192kbps stereo
|
||||
.hardware_acceleration("cuda", Some("0")) // GPU acceleration
|
||||
.build()?;
|
||||
|
||||
sdk.add_template(custom_template)?;
|
||||
@@ -166,6 +170,7 @@ Templates are JSON files with the following structure:
|
||||
|
||||
The SDK includes several built-in template presets:
|
||||
|
||||
### Basic Presets
|
||||
- `TemplatePresets::upscale_to_4k()` - Upscale video to 4K resolution
|
||||
- `TemplatePresets::convert_to_60fps()` - Convert video to 60 FPS
|
||||
- `TemplatePresets::remove_noise()` - Remove noise using AI
|
||||
@@ -173,6 +178,61 @@ The SDK includes several built-in template presets:
|
||||
- `TemplatePresets::slow_motion_4x()` - Create 4x slow motion effect
|
||||
- `TemplatePresets::comprehensive_enhancement()` - Complete enhancement
|
||||
|
||||
### Advanced Presets
|
||||
- `TemplatePresets::high_quality_nvenc()` - High-quality NVIDIA NVENC encoding
|
||||
- `TemplatePresets::hdr_processing()` - HDR content processing with proper color settings
|
||||
- `TemplatePresets::streaming_optimized()` - Optimized for live streaming
|
||||
- `TemplatePresets::mobile_optimized()` - Small file sizes for mobile devices
|
||||
- `TemplatePresets::archival_quality()` - Maximum quality for archival purposes
|
||||
|
||||
## Extended Output Settings
|
||||
|
||||
The SDK supports comprehensive FFmpeg output configuration:
|
||||
|
||||
### Video Settings
|
||||
- **Custom Resolution**: Set exact width and height
|
||||
- **Video Codecs**: H.264, H.265, AV1, and hardware-accelerated variants
|
||||
- **Quality Control**: CRF (Constant Rate Factor) or bitrate-based encoding
|
||||
- **Encoding Presets**: ultrafast, fast, medium, slow, veryslow
|
||||
- **Profiles & Levels**: baseline, main, high, main10, etc.
|
||||
- **Advanced Parameters**: GOP size, B-frames, pixel format
|
||||
|
||||
### Audio Settings
|
||||
- **Audio Codecs**: AAC, MP3, FLAC, Opus, etc.
|
||||
- **Quality**: Bitrate, sample rate, channel configuration
|
||||
- **Lossless Support**: FLAC and ALAC with proper validation
|
||||
|
||||
### Color & HDR Support
|
||||
- **Color Spaces**: bt709, bt2020nc, etc.
|
||||
- **Color Primaries**: bt709, bt2020, etc.
|
||||
- **Transfer Characteristics**: bt709, smpte2084 (HDR10), etc.
|
||||
- **Pixel Formats**: yuv420p, yuv420p10le (10-bit), etc.
|
||||
|
||||
### Hardware Acceleration
|
||||
- **Methods**: CUDA, OpenCL, QSV, AMF
|
||||
- **GPU Selection**: Specify device index for multi-GPU systems
|
||||
- **Codec-Specific**: NVENC, AMF, QSV variants
|
||||
|
||||
### Example: Advanced Template
|
||||
```rust
|
||||
let advanced_template = TemplateBuilder::new("Professional 4K HDR")
|
||||
.description("Professional 4K HDR encoding")
|
||||
.enable_enhancement("prob-4")
|
||||
.resolution(3840, 2160) // 4K
|
||||
.video_codec("hevc_nvenc", Some(16)) // High quality H.265
|
||||
.preset("slow") // Best compression
|
||||
.profile_level("main10", Some("5.1")) // 10-bit profile
|
||||
.pixel_format("yuv420p10le") // 10-bit pixel format
|
||||
.color_settings("bt2020nc", "bt2020", "smpte2084") // HDR10
|
||||
.audio_settings("aac", 256, 2) // High quality audio
|
||||
.hardware_acceleration("cuda", Some("0")) // GPU 0
|
||||
.custom_params(vec![
|
||||
"-color_range tv".to_string(),
|
||||
"-max_muxing_queue_size 1024".to_string(),
|
||||
])
|
||||
.build()?;
|
||||
```
|
||||
|
||||
## Hardware Acceleration Support
|
||||
|
||||
### NVIDIA (NVENC/NVDEC)
|
||||
@@ -241,6 +301,9 @@ cargo run --example template_management
|
||||
|
||||
# FFmpeg command generation
|
||||
cargo run --example ffmpeg_generation
|
||||
|
||||
# Advanced output settings
|
||||
cargo run --example advanced_output_settings
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Reference in New Issue
Block a user