docs.rs failed to build ff-pipeline-0.7.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
ff-pipeline-0.3.0
ff-pipeline
Wire decode, filter, and encode into a single configured pipeline. Instead of managing three separate contexts, set an input path, an output path with codec settings, and an optional filter chain — the builder validates the configuration before any processing begins.
Installation
[]
= "0.6"
Building a Pipeline
use ;
use ;
use BitrateMode;
let config = builder
.video_codec
.audio_codec
.bitrate_mode
.resolution
.build;
let pipeline = builder
.input
.output
.on_progress
.build?;
pipeline.run?;
Configuration Validation
build() validates the full configuration before allocating any FFmpeg context:
| Error variant | Condition |
|---|---|
PipelineError::NoInput |
No input path was provided to the builder |
PipelineError::NoOutput |
No output path or encoder config was provided |
These errors are returned from build(), not from run().
Progress and Cancellation
The progress callback receives a Progress value on each encoded frame:
| Field / Method | Type | Description |
|---|---|---|
p.frames_processed |
u64 |
Number of frames encoded so far |
p.total_frames |
Option<u64> |
Total frames if known from container |
p.elapsed |
Duration |
Wall-clock time since run() was called |
p.percent() |
Option<f64> |
(frames_processed / total_frames) * 100 |
Return false from the callback to stop processing. The pipeline will drain in-flight frames and return Err(PipelineError::Cancelled).
Error Handling
| Variant | When it occurs |
|---|---|
PipelineError::NoInput |
Builder has no input path |
PipelineError::NoOutput |
Builder has no output path or encoder config |
PipelineError::Decode |
Wrapped DecodeError from the decode stage |
PipelineError::Filter |
Wrapped FilterError from the filter stage |
PipelineError::Encode |
Wrapped EncodeError from the encode stage |
PipelineError::Cancelled |
Progress callback returned false |
MSRV
Rust 1.93.0 (edition 2024).
License
MIT OR Apache-2.0