Expand description
Media file repair and recovery tools for OxiMedia.
This crate provides comprehensive tools for detecting and repairing corrupted media files, including:
- Corruption detection and analysis
- Header repair for various container formats
- Index rebuilding and seek table reconstruction
- Timestamp validation and correction
- Packet recovery and interpolation
- Audio/video synchronization fixes
- Truncation recovery and file finalization
- Metadata repair and reconstruction
- Partial file recovery
- Frame reordering
- Error concealment
§Example
use oximedia_repair::{RepairEngine, RepairMode, RepairOptions};
use std::path::Path;
let engine = RepairEngine::new();
let options = RepairOptions {
mode: RepairMode::Balanced,
create_backup: true,
verify_after_repair: true,
..Default::default()
};
let result = engine.repair_file(Path::new("corrupted.mp4"), &options)?;
println!("Repaired: {}", result.success);
println!("Issues fixed: {}", result.issues_fixed);Modules§
- audio_
repair - Audio artifact detection and repair.
- audio_
restore - Audio restoration: click removal, dropout recovery, and level restoration.
- bitstream_
repair - Bitstream-level error detection and repair for media streams.
- checksum_
repair - Checksum detection and repair for media files.
- codec_
probe - Codec parameter identification from raw bitstreams.
- color_
repair - Color repair: desaturation fix, color cast removal, and tone restoration.
- conceal
- Error concealment.
- container_
migrate - Re-muxing repaired streams into a clean container without re-encoding.
- container_
repair - Container-level structure repair for media files.
- conversion
- Format conversion error repair.
- corruption_
map - Media corruption mapping.
- corruption_
simulator - Controlled corruption injection for testing repair algorithms.
- detect
- Media corruption detection and analysis.
- dropout_
concealment - Dropout detection and concealment for video and audio streams.
- error_
correction - Error correction for corrupted media frames.
- frame_
concealment - Frame concealment strategies.
- frame_
repair - Frame-level damage detection and repair for video media.
- gap_
fill - Gap filling and interpolation for corrupted or missing media segments.
- header
- Header repair for various container formats.
- index
- Index rebuilding for seekable media files.
- integrity
- File integrity checking.
- level_
repair - Audio level repair and correction utilities.
- metadata
- Metadata repair and reconstruction.
- metadata_
repair - Metadata repair and reconstruction for media files.
- packet
- Packet recovery and repair.
- packet_
recovery - RTP/UDP packet-loss detection and recovery using Forward Error Correction.
- packet_
repair - Packet-level repair and loss recovery for media streams.
- parallel_
repair - Parallel batch repair of independent media files using rayon.
- partial
- Partial file recovery.
- reorder
- Frame reordering.
- repair_
log - Structured logging of repair actions taken on a media file.
- repair_
profile - Repair configuration presets per container format.
- report
- Repair report generation.
- scratch
- Scratch and artifact repair: detection, inpainting approximation, and temporal consistency.
- stream_
recovery - Elementary stream recovery from damaged container files.
- stream_
splice - Extract playable segments from partially corrupt files.
- sync
- Audio/video synchronization.
- sync_
repair - Audio/video synchronization analysis and repair.
- timestamp
- Timestamp validation and correction.
- truncation
- Truncation detection and recovery.
- verify
- Verification of repaired files.
Structs§
- Custom
Repair Config - Repair mode determines the aggressiveness of repair operations.
Per-issue aggressiveness configuration for
RepairMode::Custom. - Issue
- Detected issue in a media file.
- Repair
Engine - Main repair engine.
- Repair
Options - Options for repair operations.
- Repair
Result - Result of a repair operation.
Enums§
- Issue
Type - Types of issues that can be detected and repaired.
- Repair
Error - Errors that can occur during media repair operations.
- Repair
Mode - Repair aggressiveness mode controlling the tradeoff between data preservation and recovery completeness.
- Severity
- Issue severity level.
Type Aliases§
- Progress
Callback - Progress callback type: called after each issue is processed. Arguments: (issues_done, issues_total, current_issue_description).
- Result
- Result type for repair operations.