Skip to main content

Crate framefinery

Crate framefinery 

Source
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§

CliOptionManifest
Manifest for one public ff option or documented positional form.
CodecId
Stable codec identifier used by CLI, manifests, and library callers.
DecodedPictureBuffer
Small validated decoded picture buffer for codec reference-frame storage.
DpbEntry
One decoded or reconstructed picture tracked by a decoded picture buffer.
EncodePipelineStats
Counters returned after running a frame-to-packet encode pipeline.
EncodedVideoChunk
Encoded bytes plus timing and keyframe metadata.
FilterManifest
Public manifest entry for a compiled filter.
FilterPipelineBuilder
Builder for a parsed filter pipeline specification.
FilterPipelineSpec
Parsed filter pipeline specification.
FilterPipelineStats
Counters returned after running a frame-filter pipeline.
FilterStageSpec
Parsed filter stage spec.
FilteredRawVideoFrameSource
Raw-frame source wrapper that applies a frame-filter chain on demand.
Frame
Owned raw frame buffer paired with validated frame metadata.
FrameEncodeMetrics
Per-frame encode metrics returned by session-style encoders.
FrameInfo
Validated raw frame geometry and pixel format.
FramePsnr
Per-plane and aggregate PSNR values for a reconstructed frame.
FrameRate
Rational frame rate metadata.
FrameRef
Borrowed raw frame buffer paired with validated frame metadata.
FrameSourceRawVideoAdapter
Adapter that exposes a Source of owned frames as a raw-frame callback.
Packet
Encoded packet passed between generic pipeline stages.
PictureId
Stable identifier for a picture stored in a decoded picture buffer.
RawVideoFrameReadSource
RawVideoFrameSource adapter for any Read implementation.
RawVideoFrameSourceReadAdapter
Read adapter for any RawVideoFrameSource implementation.
SampleBitDepth
Checked planar sample bit depth for raw frame formats.
StreamId
Identifier for a logical stream within a media pipeline.
Timestamp
Integer timestamp used by packet and encoded-chunk metadata.
VideoEncodeFrameMetrics
Per-frame metrics passed to source-driven encode callbacks.
VideoEncodeOutput
Output produced by one encoder-session operation.
VideoEncoderBuilder
Fluent builder for a codec-neutral video encoder configuration.
VideoEncoderConfig
Codec-neutral configuration for constructing or driving a video encoder.
VideoEncoderManifest
Discovery manifest for one compiled video encoder.
VideoEncoderSetting
One codec extension setting in a VideoEncoderConfig.

Enums§

ChromaSampling
Chroma subsampling layout for planar YUV or monochrome data.
CliOptionScope
Area of the ff interface where an option is used.
CliOptionValue
Value shape expected after a command-line option.
MediaError
Error type shared by FrameFinery media primitives and public codec APIs.
PixelFormat
Raw pixel layout accepted by FrameFinery frame buffers.
ReconstructionMode
Reconstruction data requested from a video encoder.
VideoChunkKind
Encoded chunk category emitted by video encoders.
VideoRateControl
Rate-control mode requested from a video encoder.
VideoSettingValue
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 framefinery facade crate and ff binary.

Traits§

Encoder
Frame-to-packet encoder stage for the generic pipeline helpers.
Filter
Frame-to-frame transform stage.
RawVideoFrameSource
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.
VideoEncoderSession
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 ff option manifest compiled into this build.
cli_options_for_scope
Return documented ff option 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 source using the codec selected by config.
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 ff command-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.
VideoEncodeFrameMetricsCallback
Callback type used to receive source-driven per-frame metrics.