FfmpegError
Errors that can occur when running ffmpeg. This enum wraps errors from command execution, binary resolution, and cases where the ffmpeg binary cannot be found in the system PATH.Variants
An error occurred while executing the ffmpeg command.Fields:
inner_error: CommandError- The underlying command execution error
CommandError via the From trait.An error occurred while trying to locate the ffmpeg binary.Fields:
inner_error: WhichError- The underlying binary resolution error
WhichError via the From trait.Unable to locate ffmpeg on your PATH.To resolve this error:
- Set the
LIBFFMPEG_FFMPEG_PATHenvironment variable to point to the ffmpeg binary - Update your system PATH to include the directory containing ffmpeg
Example
FfprobeError
Errors that can occur when running ffprobe. This enum wraps errors from command execution, binary resolution, and cases where the ffprobe binary cannot be found in the system PATH.Variants
An error occurred while executing the ffprobe command.Fields:
inner_error: CommandError- The underlying command execution error
CommandError via the From trait.An error occurred while trying to locate the ffprobe binary.Fields:
inner_error: WhichError- The underlying binary resolution error
WhichError via the From trait.Unable to locate ffprobe on your PATH.To resolve this error:
- Set the
LIBFFMPEG_FFPROBE_PATHenvironment variable to point to the ffprobe binary - Update your system PATH to include the directory containing ffprobe
Example
DurationError
Errors that can occur when extracting a media file’s duration via ffprobe. This enum covers all failure modes of theget_duration function, including ffprobe execution errors, subprocess issues, and parsing failures.
Variants
An error occurred in the underlying ffprobe execution.Fields:
inner_error: FfprobeError- The ffprobe error that occurred
FfprobeError via the From trait.Process returned, but no exit status was present.Fields:
result: CommandExit- The incomplete command result containing stdout and stderr lines
ffprobe exited with a non-zero exit code.Fields:
exit_code: CommandExitCode- The exit code information from ffprobe
Expected ffprobe to output a line with the duration, but no output was received.Fields:
result: CommandExit- The command result showing the actual stdout and stderr lines received
Failed to parse the duration value provided by ffprobe.Fields:
inner_error: AnyError- The parsing error that occurred
Example
Related Functions
Theget_duration function returns this error type:
format=duration entry from the output.