pub enum EncodeError {
Show 20 variants
CannotCreateFile {
path: PathBuf,
},
UnsupportedCodec {
codec: String,
},
NoSuitableEncoder {
codec: String,
tried: Vec<String>,
},
EncodingFailed {
frame: u64,
reason: String,
},
InvalidConfig {
reason: String,
},
HwEncoderUnavailable {
encoder: String,
},
EncoderUnavailable {
codec: String,
hint: String,
},
MuxingFailed {
reason: String,
},
Ffmpeg {
code: i32,
message: String,
},
Io(Error),
InvalidOption {
name: String,
reason: String,
},
UnsupportedContainerCodecCombination {
container: String,
codec: String,
hint: String,
},
InvalidDimensions {
width: u32,
height: u32,
},
InvalidBitrate {
bitrate: u64,
},
InvalidChannelCount {
count: u32,
},
InvalidSampleRate {
rate: u32,
},
Cancelled,
WorkerPanicked,
MediaOperationFailed {
reason: String,
},
PresetConstraintViolation {
preset: String,
reason: String,
},
}Expand description
Encoding error type.
Variants§
CannotCreateFile
Cannot create output file
UnsupportedCodec
Unsupported codec
NoSuitableEncoder
No suitable encoder found
EncodingFailed
Encoding failed at specific frame
InvalidConfig
Invalid configuration
Hardware encoder unavailable
Specific encoder is unavailable — the hint explains what is needed.
MuxingFailed
Muxing failed
Ffmpeg
FFmpeg error
Fields
Io(Error)
IO error
InvalidOption
Invalid option value
UnsupportedContainerCodecCombination
Codec is incompatible with the target container format
Fields
InvalidDimensions
Video dimensions are outside the supported range [2, 32768].
InvalidBitrate
Target bitrate exceeds the 800 Mbps maximum.
InvalidChannelCount
Audio channel count exceeds the supported maximum of 8.
InvalidSampleRate
Audio sample rate is outside the supported range [8000, 384000] Hz.
Cancelled
Encoding cancelled by user
WorkerPanicked
Async encoder worker thread panicked or disconnected unexpectedly
MediaOperationFailed
A media operation (trim, extract, replace, …) failed.
Returned by StreamCopyTrim and other
media_ops types when a structural precondition is violated or an
FFmpeg mux/remux call fails.
PresetConstraintViolation
An export preset violated a platform-specific constraint.
Returned by ExportPreset::validate()
when the preset’s configuration conflicts with a platform rule (e.g.
fps > 60 for a YouTube preset).
Trait Implementations§
Source§impl Debug for EncodeError
impl Debug for EncodeError
Source§impl Display for EncodeError
impl Display for EncodeError
Source§impl Error for EncodeError
impl Error for EncodeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()