Expand description
Public FrameFinery facade crate.
The package also ships the ff command-line binary. Library users can depend
on framefinery directly, while advanced users may depend on
framefinery-api or framefinery-codecs for narrower APIs.
use framefinery::{encoder, Frame, FrameInfo, PixelFormat};
let info = FrameInfo::new(16, 16, PixelFormat::Yuv420p8)?;
let frame = Frame::blank(info);
let output = encoder("av2")?
.input(info)
.lossless()
.reconstruction_frames()
.encode_frame(frame)?;
assert_eq!(output.reconstructions.len(), 1);Re-exports§
pub use framefinery_api as core;
Structs§
- CliOption
Manifest - Manifest for one public
ffoption or documented positional form. - CodecId
- Stable codec identifier used by CLI, manifests, and library callers.
- Decoded
Picture Buffer - Small validated decoded picture buffer for codec reference-frame storage.
- DpbEntry
- One decoded or reconstructed picture tracked by a decoded picture buffer.
- Encode
Pipeline Stats - Counters returned after running a frame-to-packet encode pipeline.
- Encoded
Video Chunk - Encoded bytes plus timing and keyframe metadata.
- Filter
Manifest - Public manifest entry for a compiled filter.
- Filter
Pipeline Builder - Builder for a parsed filter pipeline specification.
- Filter
Pipeline Spec - Parsed filter pipeline specification.
- Filter
Pipeline Stats - Counters returned after running a frame-filter pipeline.
- Filter
Stage Spec - Parsed filter stage spec.
- Filtered
RawVideo Frame Source - Raw-frame source wrapper that applies a frame-filter chain on demand.
- Frame
- Owned raw frame buffer paired with validated frame metadata.
- Frame
Encode Metrics - Per-frame encode metrics returned by session-style encoders.
- Frame
Info - Validated raw frame geometry and pixel format.
- Frame
Psnr - Per-plane and aggregate PSNR values for a reconstructed frame.
- Frame
Rate - Rational frame rate metadata.
- Frame
Ref - Borrowed raw frame buffer paired with validated frame metadata.
- Frame
Source RawVideo Adapter - Adapter that exposes a
Sourceof owned frames as a raw-frame callback. - Packet
- Encoded packet passed between generic pipeline stages.
- Picture
Id - Stable identifier for a picture stored in a decoded picture buffer.
- RawVideo
Frame Read Source RawVideoFrameSourceadapter for anyReadimplementation.- RawVideo
Frame Source Read Adapter Readadapter for anyRawVideoFrameSourceimplementation.- Sample
BitDepth - Checked planar sample bit depth for raw frame formats.
- Stream
Id - Identifier for a logical stream within a media pipeline.
- Timestamp
- Integer timestamp used by packet and encoded-chunk metadata.
- Video
Encode Frame Metrics - Per-frame metrics passed to source-driven encode callbacks.
- Video
Encode Output - Output produced by one encoder-session operation.
- Video
Encoder Builder - Fluent builder for a codec-neutral video encoder configuration.
- Video
Encoder Config - Codec-neutral configuration for constructing or driving a video encoder.
- Video
Encoder Manifest - Discovery manifest for one compiled video encoder.
- Video
Encoder Setting - One codec extension setting in a
VideoEncoderConfig.
Enums§
- Chroma
Sampling - Chroma subsampling layout for planar YUV or monochrome data.
- CliOption
Scope - Area of the
ffinterface where an option is used. - CliOption
Value - Value shape expected after a command-line option.
- Media
Error - Error type shared by FrameFinery media primitives and public codec APIs.
- Pixel
Format - Raw pixel layout accepted by FrameFinery frame buffers.
- Reconstruction
Mode - Reconstruction data requested from a video encoder.
- Video
Chunk Kind - Encoded chunk category emitted by video encoders.
- Video
Rate Control - Rate-control mode requested from a video encoder.
- Video
Setting Value - Typed value for a codec extension setting.
- VvcProfile
- VVC profile selection for the experimental VVC encoder.
Constants§
- ENCODERS
- Video encoder manifests compiled into this build.
- FILTERS
- Filter manifests compiled into this build.
- VERSION
- Version of the
framefineryfacade crate andffbinary.
Traits§
- Encoder
- Frame-to-packet encoder stage for the generic pipeline helpers.
- Filter
- Frame-to-frame transform stage.
- RawVideo
Frame Source - Pull-based raw video source used by source-driven encoders.
- Sink
- Push-based terminal stage for generic media pipelines.
- Source
- Pull-based source stage for generic media pipelines.
- Video
Encoder Session - One continuous video stream with persistent codec state.
Functions§
- apply_
encoder_ settings - Apply CLI-compatible encoder setting specs through the selected manifest.
- build_
filter_ transform - Build an executable transform filter from a parsed stage spec.
- build_
raw_ video_ source_ filter - Build an executable source filter as a raw-frame callback.
- build_
source_ filter - Build an executable source filter from a parsed stage spec.
- cli_
options - Return every documented
ffoption manifest compiled into this build. - cli_
options_ for_ scope - Return documented
ffoption manifests for one interface area. - convert_
frame_ format - Convert between closely related raw frame formats.
- convert_
planar_ frame_ bit_ depth - Convert a planar YUV or gray frame between supported bit depths.
- create_
encoder - Create a persistent encoder session from a codec-neutral config.
- effective_
encoder_ settings - Render effective encoder setting specs through the selected manifest.
- encode_
frame - Encode one frame using the codec selected by
config. - encode_
source - Encode frames pulled from
sourceusing the codec selected byconfig. - encoder
- Start a fluent encoder builder for one compiled codec.
- fetch_
encoder_ manifest - Fetch a compiled video encoder manifest or return a structured error.
- filter_
manifest - Find a compiled filter manifest by name.
- find_
encoder_ manifest - Find a compiled video encoder manifest by codec id.
- frame_
psnr - Compute PSNR between a source frame and reconstruction.
- generate_
source_ filter_ stream - Generate raw video bytes from an executable source filter.
- parse_
filter_ pipeline_ specs - Parse and validate an ordered set of filter specs for an encode pipeline.
- planar_
sample_ sse - Compute sum of squared error for two equally sized planar sample buffers.
- read_
planar_ sample - Read one little-endian planar sample from a raw sample buffer.
- run
- Run the
ffcommand-line frontend with an iterator of raw OS arguments. - run_
frame_ encode_ pipeline - Run a source through zero or more frame filters, an encoder, and a packet sink.
- run_
frame_ filter_ pipeline - Run a source through zero or more frame filters into a frame sink.
- scale_
sample_ bit_ depth - Scale one sample value between two bit depths with rounding.
- write_
planar_ sample - Write one little-endian planar sample into a raw sample buffer.
Type Aliases§
- Result
- Result type used by FrameFinery core APIs.
- Video
Encode Frame Metrics Callback - Callback type used to receive source-driven per-frame metrics.