Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 62 variants NotStarted, Url(UrlError), OpenInputStream(OpenInputError), FindStream(FindStreamError), Decoder(DecoderError), FilterGraphParse(FilterGraphParseError), FilterDescUtf8, FilterNameUtf8, FilterZeroOutputs, FilterZeroInputs, ParseInteger, AllocOutputContext(AllocOutputContextError), OpenOutput(OpenOutputError), FileSameAsInput(String), FindDevices(FindDevicesError), AllocFrame(AllocFrameError), AllocPacket(AllocPacketError), FrameWritable(FrameWritableError), Muxing(MuxingOperationError), OpenEncoder(OpenEncoderOperationError), Encoding(EncodingOperationError), FilterGraph(FilterGraphOperationError), OpenDecoder(OpenDecoderOperationError), Decoding(DecodingOperationError), Demuxing(DemuxingOperationError), PacketScanner(PacketScannerError), FrameFilterInit(Box<dyn Error + Send + Sync>), FrameFilterProcess(Box<dyn Error + Send + Sync>), FrameFilterRequest(Box<dyn Error + Send + Sync>), FrameFilterTypeNoMatched(String, String), FrameFilterStreamTypeNoMatched(String, usize, String), FrameFilterDstFinished, FrameFilterFrameDuplicateFailed, FrameFilterThreadExited, WorkerPanicked(String), StartFailed, RtmpStreamAlreadyExists(String), RtmpCreateStream, RtmpRegistrationQueueFull, RtmpThreadExited, RtmpStreamClosed, RtmpServerAlreadyStarted, Subtitle(SubtitleError), WgpuFilter(WgpuFilterError), OpenGLFilter(OpenGLFilterError), IO(Error), EOF, Exit, Bug, InvalidRecipeArg(String), AnalysisFrame(Box<str>), HlsEncoderSelection(Box<HlsEncoderSelectionError>), HlsMasterWrite(Box<HlsMasterWriteError>), ContainerInfo(ContainerInfoError), FrameExport(FrameExportError), Writer(WriterError), Push(PushError), FrameSourceThreadExited, PacketSink(PacketSinkError), AmbiguousVideoSource { video_streams: usize, }, UnconsumedCliOption { site: String, option: String, }, HttpInput(Box<HttpInputError>),
}
Expand description

Top-level error type for all ez-ffmpeg operations.

Most variants wrap a stage-specific error enum (opening inputs and outputs, demuxing, decoding, filtering, encoding, muxing, …), so callers can match on the pipeline stage first and inspect the typed cause when they need to.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

NotStarted

Returned when an operation requires a scheduler that has been started, but it has not been.

§

Url(UrlError)

A URL or path string could not be converted into a C string for FFmpeg (see UrlError).

§

OpenInputStream(OpenInputError)

Opening an input file, stream, device, or custom input source failed.

§

FindStream(FindStreamError)

Probing stream information from an opened input failed.

§

Decoder(DecoderError)

Resolving a decoder failed (see DecoderError).

§

FilterGraphParse(FilterGraphParseError)

Parsing a filtergraph description failed.

§

FilterDescUtf8

Returned when a filtergraph link label could not be converted to a UTF-8 string.

§

FilterNameUtf8

Returned when a filter name could not be converted to a UTF-8 string.

§

FilterZeroOutputs

Returned when a filtergraph declares zero outputs, which is not supported.

§

FilterZeroInputs

Returned when a filtergraph declares zero inputs, which is not supported.

§

ParseInteger

Returned when a numeric field — such as a file index in a stream specifier or link label — could not be parsed as an integer.

§

AllocOutputContext(AllocOutputContextError)

Allocating an output format context failed.

§

OpenOutput(OpenOutputError)

Opening or configuring an output failed.

§

FileSameAsInput(String)

Returned when an output URL is identical to one of the input URLs; the payload is the offending path. In-place editing is not supported.

§

FindDevices(FindDevicesError)

Enumerating capture devices failed.

§

AllocFrame(AllocFrameError)

Allocating an AVFrame failed.

§

AllocPacket(AllocPacketError)

Allocating an AVPacket failed.

§

FrameWritable(FrameWritableError)

Making a frame’s data buffers writable failed (see FrameWritableError).

§

Muxing(MuxingOperationError)

A muxing operation failed while writing the output container.

§

OpenEncoder(OpenEncoderOperationError)

Opening or configuring an encoder failed.

§

Encoding(EncodingOperationError)

An encoding operation failed.

§

FilterGraph(FilterGraphOperationError)

A filtergraph runtime operation failed.

§

OpenDecoder(OpenDecoderOperationError)

Opening or configuring a decoder failed.

§

Decoding(DecodingOperationError)

A decoding operation failed.

§

Demuxing(DemuxingOperationError)

A demuxing operation failed.

§

PacketScanner(PacketScannerError)

A packet-scanning operation failed (see PacketScannerError).

§

FrameFilterInit(Box<dyn Error + Send + Sync>)

A frame filter failed to initialize; carries the error returned by the filter’s init.

§

FrameFilterProcess(Box<dyn Error + Send + Sync>)

A frame filter failed while processing a frame; carries the error returned by the filter’s filter_frame.

§

FrameFilterRequest(Box<dyn Error + Send + Sync>)

A frame filter failed while generating a frame; carries the error returned by the filter’s request_frame.

§

FrameFilterTypeNoMatched(String, String)

Returned while building a frame pipeline when no stream of the required media type exists at the named pipeline end; fields are the pipeline end (input/output) and the media type.

§

FrameFilterStreamTypeNoMatched(String, usize, String)

Returned while building a frame pipeline when no stream at the named pipeline end matches both the requested stream index and media type; fields are the pipeline end, the stream index, and the media type.

§

FrameFilterDstFinished

Returned when a frame pipeline tries to deliver a frame to a destination that has already finished.

§

FrameFilterFrameDuplicateFailed

Returned when a frame pipeline fails to duplicate a frame required for an additional destination.

§

FrameFilterThreadExited

Returned when spawning a frame pipeline’s worker thread fails, so the pipeline never ran.

§

WorkerPanicked(String)

A worker thread panicked; the payload is the worker’s thread name. Output may be incomplete.

§

StartFailed

Recorded as the scheduler result when start() fails after some worker threads were already launched. start() itself returns the actual init error to its caller; this recorded value is what concurrent observers (packet-sink terminal callbacks) report, so a sink can never mistake a torn-down startup for a settled-Ok job.

§

RtmpStreamAlreadyExists(String)

Returned when publishing to the embedded RTMP server with a stream key that is already in use; the payload is the key.

§

RtmpCreateStream

Returned when a stream could not be created on the embedded RTMP server, typically because the server has stopped.

§

RtmpRegistrationQueueFull

Returned when too many streams are waiting to be registered on the embedded RTMP server.

§

RtmpThreadExited

Returned when the embedded RTMP server’s thread has exited.

§

RtmpStreamClosed

Returned when the embedded RTMP server is no longer consuming a published stream.

§

RtmpServerAlreadyStarted

Returned when starting an embedded RTMP server that was already started; clones of one server share a single lifecycle that can be started only once.

§

Subtitle(SubtitleError)

A subtitle processing operation failed.

§

WgpuFilter(WgpuFilterError)

A wgpu GPU filter operation failed.

§

OpenGLFilter(OpenGLFilterError)

An OpenGL filter operation failed (deprecated opengl feature).

§

IO(Error)

An I/O error from the standard library.

§

EOF

Internal end-of-stream marker passed between pipeline stages; a normal end of input is consumed internally rather than reported as a job failure.

§

Exit

Internal control-flow marker instructing pipeline stages to shut down; normally consumed internally.

§

Bug

Internal invariant violation that should never occur; indicates a bug in this crate rather than a problem with user input.

§

InvalidRecipeArg(String)

Returned when a recipe or analysis option is invalid (out of range, malformed, or inconsistent); the payload describes the problem.

§

AnalysisFrame(Box<str>)

A decoded frame could not be analyzed (unsupported pixel format, interlaced fields, or a hardware surface). This is a runtime frame condition, not a recipe/config error — those stay InvalidRecipeArg. Boxed so Error stays within the 64-byte layout contract.

§

HlsEncoderSelection(Box<HlsEncoderSelectionError>)

HLS ladder video-encoder selection failed. Boxed so the payload stays inside the crate-wide Error size contract.

§

HlsMasterWrite(Box<HlsMasterWriteError>)

HLS master playlist write failed after every rendition transcode succeeded. Boxed so the payload stays inside the crate-wide Error size contract.

§

ContainerInfo(ContainerInfoError)

A container-info query was called with an out-of-range index.

§

FrameExport(FrameExportError)

A frame-export operation failed.

§

Writer(WriterError)

Building or opening a video writer failed.

§

Push(PushError)

Pushing a frame into a video writer failed.

§

FrameSourceThreadExited

Returned when a frame-source input’s worker thread failed to start.

§

PacketSink(PacketSinkError)

A packet-sink output failed (see PacketSinkError).

§

AmbiguousVideoSource

CLI-compat pipelines only: a -vf command was lowered onto an input whose OPENED demuxer does not carry exactly one video stream. The check runs on the demuxer instance the pipeline actually executes with (no separate probe opening, no TOCTOU window). The facade maps this to its public AmbiguousFilterSource diagnostic.

Fields

§video_streams: usize

Number of video streams carried by the opened input.

§

UnconsumedCliOption

Strict AVOption handling (CLI-compat pipelines): an option the caller supplied was not consumed by the component it targeted. The default builder path only WARNS about such leftovers; pipelines built through the cli feature’s entry points fail instead, mirroring fftools’ check_avoptions abort. Only exists with the cli feature — the feature-off API surface is unchanged.

Fields

§site: String

Human-readable description of the component that should have consumed the option (e.g. “the muxer of output 0”).

§option: String

The option key that was left unconsumed.

§

HttpInput(Box<HttpInputError>)

Boxed so Error stays within the 64-byte layout contract.

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<AllocFrameError> for Error

Source§

fn from(source: AllocFrameError) -> Self

Converts to this type from the input type.
Source§

impl From<AllocOutputContextError> for Error

Source§

fn from(source: AllocOutputContextError) -> Self

Converts to this type from the input type.
Source§

impl From<AllocPacketError> for Error

Source§

fn from(source: AllocPacketError) -> Self

Converts to this type from the input type.
Source§

impl From<ContainerInfoError> for Error

Source§

fn from(source: ContainerInfoError) -> Self

Converts to this type from the input type.
Source§

impl From<DecoderError> for Error

Source§

fn from(source: DecoderError) -> Self

Converts to this type from the input type.
Source§

impl From<DecodingOperationError> for Error

Source§

fn from(source: DecodingOperationError) -> Self

Converts to this type from the input type.
Source§

impl From<DemuxingOperationError> for Error

Source§

fn from(source: DemuxingOperationError) -> Self

Converts to this type from the input type.
Source§

impl From<EncodingOperationError> for Error

Source§

fn from(source: EncodingOperationError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for CliError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for StreamError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FilterGraphOperationError> for Error

Source§

fn from(source: FilterGraphOperationError) -> Self

Converts to this type from the input type.
Source§

impl From<FilterGraphParseError> for Error

Source§

fn from(source: FilterGraphParseError) -> Self

Converts to this type from the input type.
Source§

impl From<FindDevicesError> for Error

Source§

fn from(source: FindDevicesError) -> Self

Converts to this type from the input type.
Source§

impl From<FindStreamError> for Error

Source§

fn from(source: FindStreamError) -> Self

Converts to this type from the input type.
Source§

impl From<FrameExportError> for Error

Source§

fn from(source: FrameExportError) -> Self

Converts to this type from the input type.
Source§

impl From<FrameWritableError> for Error

Source§

fn from(source: FrameWritableError) -> Self

Converts to this type from the input type.
Source§

impl From<HlsEncoderSelectionError> for Error

Source§

fn from(err: HlsEncoderSelectionError) -> Self

Converts to this type from the input type.
Source§

impl From<HlsMasterWriteError> for Error

Source§

fn from(err: HlsMasterWriteError) -> Self

Converts to this type from the input type.
Source§

impl From<HttpInputError> for Error

Available on crate feature http-input only.
Source§

fn from(err: HttpInputError) -> Self

Converts to this type from the input type.
Source§

impl From<MuxingOperationError> for Error

Source§

fn from(source: MuxingOperationError) -> Self

Converts to this type from the input type.
Source§

impl From<NulError> for Error

Source§

fn from(err: NulError) -> Self

Converts to this type from the input type.
Source§

impl From<OpenDecoderOperationError> for Error

Source§

fn from(source: OpenDecoderOperationError) -> Self

Converts to this type from the input type.
Source§

impl From<OpenEncoderOperationError> for Error

Source§

fn from(source: OpenEncoderOperationError) -> Self

Converts to this type from the input type.
Source§

impl From<OpenGLFilterError> for Error

Available on crate feature opengl only.
Source§

fn from(err: OpenGLFilterError) -> Self

Converts to this type from the input type.
Source§

impl From<OpenInputError> for Error

Source§

fn from(source: OpenInputError) -> Self

Converts to this type from the input type.
Source§

impl From<OpenOutputError> for Error

Source§

fn from(source: OpenOutputError) -> Self

Converts to this type from the input type.
Source§

impl From<OwnedPushError> for Error

Drops the recovered frame and wraps the cause as crate::error::Error::Push, so ? composes in functions returning crate::error::Result. Destructure the error first when the buffer should be reused.

Source§

fn from(rejected: OwnedPushError) -> Self

Converts to this type from the input type.
Source§

impl From<PacketScannerError> for Error

Source§

fn from(source: PacketScannerError) -> Self

Converts to this type from the input type.
Source§

impl From<PacketSinkError> for Error

Source§

fn from(source: PacketSinkError) -> Self

Converts to this type from the input type.
Source§

impl From<PushError> for Error

Source§

fn from(source: PushError) -> Self

Converts to this type from the input type.
Source§

impl From<SubtitleError> for Error

Source§

fn from(source: SubtitleError) -> Self

Converts to this type from the input type.
Source§

impl From<UrlError> for Error

Source§

fn from(source: UrlError) -> Self

Converts to this type from the input type.
Source§

impl From<WgpuFilterError> for Error

Source§

fn from(source: WgpuFilterError) -> Self

Converts to this type from the input type.
Source§

impl From<WriterError> for Error

Source§

fn from(source: WriterError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Error

Source§

fn eq(&self, other: &Self) -> bool

Structural equality for payload-less variants only. Variants carrying an inner error compare unequal even to themselves — use matches! on the variant when that is what you mean.

1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more