Expand description
Native FFmpeg 8 media adapter.
All rsmpeg and FFmpeg types remain private to this binding. Public callers
only observe the platform-neutral alpha2-media contracts.
Mixing a timeline project’s audio needs the timeline feature, which is
the only part of this crate that links the project model and the engine.
Structs§
- Audio
Stream Config - The audio stream an export encodes beside its video.
- AvEncode
Config - Configuration for transactional audio/video export.
- Codec
Thread Allocation - One export-wide software-codec allocation. Every software decoder receives
decoder_threads, every hardware onehardware_decoder_threads; the software video encoder receivesencoder_threads. - Codec
Thread Request - What one export needs from the shared software-codec worker budget.
- Concealed
Audio Gap - An interval decoded as silence, at the decoder’s output sample rate: where damaged input was dropped, or where the stream’s timestamps jump.
- Corrupt
Packet - One observed corruption. Timestamps use the selected stream’s time base.
- Decode
Diagnostic Counts - What decoders reported, counted: the summary a caller gives of the damage Tolerant decoding skipped and the silence it inserted. Samples are at the reporting decoder’s output rate.
- Decode
Diagnostics - Cumulative diagnostics. Records are bounded; overflow fails decoding.
- Decode
Progress Watch - Ends a
watch_decode_progresswatch, restoring the one before it. - Decode
Stage Timings - Where one video decode session’s wall time went.
- Decoded
Audio Sources - Decoded, project-rate planar audio held per source for offline mixing.
- Dropped
Audio Overlap - Samples whose timestamps put them over samples already decoded, dropped, at the decoder’s output sample rate.
- Encode
Call Watch - Ends a
watch_encode_callswatch, restoring the one before it. - Encode
Stage Timings - Where one encode sink’s wall time went.
- Encoder
Pool Stats - Surface-pool counters for one session.
- Encoder
Surface - One encoder-input surface on loan from its session’s pool.
- Encoder
Surface Descriptor - What one encoder-input surface is, independent of its backing.
- Ffmpeg
Runtime Identity FFmpegruntime and pinned SDK identity used by native diagnostics.- Frame
Score - How a frame would do as a thumbnail.
- Hardware
Encode Capability - What one hardware encoder accepts on this device, read from the device.
- Hardware
Encode Device - The renderer’s device, as a hardware encoder can use it.
- Hardware
Encode Input - The coordinator’s half of a hardware session.
- Hardware
Encode Request - One export’s encoder settings and output.
- Hardware
Encode Session - The encode worker’s half of a hardware session.
- Hardware
Open Error - A hardware decode session that could not be opened, with its typed reason.
- Host
Audio Config - Platform-neutral device range used by negotiation tests and cpal mapping.
- Input
Frame - A frame the coordinator has begun: its planes are the renderer’s to write
until
HardwareEncodeInput::submittakes it. - Native
Audio Decoder - Streaming
FFmpegaudio decoder normalized to project-rate planarf32. - Native
Audio Encoder Capability - One linked audio encoder available to the native sinks.
- Native
AvEncode Sink - Audio/video sink that encodes and interleaves through the linked
FFmpeglibraries without requiring command-line programs on the host. Video frames and audio blocks must be submitted in nondecreasing start-timestamp order; ready packets are muxed incrementally instead of retained for the full file. - Native
Codec Capabilities - Runtime codec inventory for the native sinks.
- Native
Decoder - Software video decoder with exact timestamp conversion and drain semantics.
- Native
Encoder Hardware Config - One hardware configuration a video encoder declares.
- Native
Encoder Library - A run-time loaded encoder library (
crate::OPENH264_ENCODER_NAME). - Native
Export Decoder - Export decoder producing
NativeVideoFrames from oneFFmpegsession. - Native
Hardware Decode Capabilities - Hardware decode registration reported by the linked
FFmpegbuild. - Native
Hardware Decode Capability - One codec’s hardware decode registration for this platform’s backend.
- Native
Rate Control Probe - Whether one encoder opened with one rate-control mechanism.
- Native
Video Encode Sink - Transactional
FFmpegvideo encoder and muxer. - Native
Video Encoder Capability - One linked video encoder available to the native sinks.
- Native
Video Encoder Fallback - One candidate encoder an export tried and moved past.
- Native
Video Encoder Probe - What one registered video encoder declares, and what happened when alpha2 opened it on this machine.
- Native
Video Encoder Selection - The encoder an export actually opened, and what it passed over.
- Native
Video Frame Metadata - Platform-neutral metadata carried identically by CPU and hardware frames.
- Native
WavEncode Sink - Transactional IEEE-f32 WAV encoder used by native offline audio export.
- Open
H264 Library - An
OpenH264library that loaded and passed its checks. - Output
Target - Where an output goes and what it does with a file already there.
- Packet
Copy - One or more copy runs written back to back into one output.
- Packet
Copy Audio - What a copied audio stream must match.
- Packet
Copy Plan - A copy that can be made, and what it copies.
- Packet
Copy Planner - Plans the runs of one export, reading each source file once however many runs it serves, and stopping when the export is cancelled.
- Packet
Copy Report - What a copy wrote.
- Packet
Copy Request - The stream an export copies from and what it must match.
- Probe
Result - Container-level probe and deterministic stream selection.
- Project
Audio Request - One offline project-audio render request.
- Video
Display - How encoded pictures are shown: what a container records beside them rather than in them.
- Video
Encode Config - Configuration for deterministic native video encoding.
- Video
Recovery Gap - Healthy video boundaries surrounding dropped data. Unknown endpoints remain absent.
- Vulkan
Decode Probe - Aggregate result from a bounded Vulkan hardware decode and surface probe.
- Vulkan
Encode Probe - What one Vulkan encode session turned out to require and produce.
- Yuv420p
Frame Buffer - A reusable
FFmpegYUV420P frame the caller writes into directly.
Enums§
- Applied
Rate Control - Which form of a resolved rate control an encoder actually ran.
- Copy
Audio - The audio a packet copy writes beside its video.
- Decode
Diagnostic - A recovery observation emitted synchronously before decoding continues.
- Decode
Policy - Damaged input handling. Initialization and resource errors are always fatal.
- Encoder
Input Handoff - How a packed frame reaches the encoder’s surface.
- Encoder
Input Layout - How the pixels of an encoder-input surface are laid out.
- Existing
Output - What an output does with a file already at its path.
- Hardware
Decode Fallback - Why a video source is decoded in software instead of on the GPU.
- Hardware
Encode Backend - The native API a hardware encode session drives.
- Hardware
Encode Open Error - Why a hardware session did not open.
- Host
Sample Format - Host sample representation considered during deterministic negotiation.
- Native
Audio Codec - Audio codecs implemented by the native encode sinks.
- Native
Encoder Class - How a concrete encoder executes, as the linked runtime declares it.
- Native
Encoder Rejection - Why one candidate encoder was not the one an export opened.
- Native
Plane Layout - Plane organization of a native export frame.
- Native
Video Codec - Video codecs implemented by the native encode sinks.
- Native
Video Frame - One decoded export frame with either owned CPU pixels or an opaque surface.
- Offline
Audio Error - Native offline-render failure.
- Open
H264 Provider - Who provided the library that loaded.
- Open
H264 Status - Whether
OpenH264can encode in this process, and if not, why. - Rate
Control Mechanism - A way of controlling an encoder’s rate, independent of how a family spells it.
Constants§
- DECODE_
WORK_ LIMIT - The longest a decoder operation (a seek, the next frame, an open’s first
frame) may go without producing a frame before it fails with “decode
progress budget exceeded”: the time since it started or since its last
decoded frame, between the
FFmpegcalls it makes. A seek that decodes from a distant keyframe at a steady pace takes as long as it needs; a loop that decodes nothing does not. - HARDWARE_
DECODER_ THREADS FFmpegworkers a hardware decode session opens with, whatever the budget.- OPEN
H264_ ENCODER_ NAME - The encoder name
--video-encodertakes forOpenH264. - OPEN
H264_ INSTALL_ COMMAND - What a user runs to install Cisco’s binary.
- OPEN
H264_ NOTICE - The text Cisco’s binary licence requires wherever the user controls the
codec (
noticeof the manifest). - OPEN
H264_ VERSION - The
OpenH264releaserelease/openh264/manifest.tomlpins (version). - PARTIAL_
OUTPUT_ IN_ USE - The words an output refused because a live export writes its partial file
(
EncodeError::OutputInUse) starts with. - SOURCE_
SAMPLE_ RATES - The sample rates a source’s audio may have: none is recorded below
1 kHz or above 768 kHz, the most
alpha2_audio::Resamplertakes. A file that declares 1 Hz would otherwise turn each of its samples into a project’s 48,000. - THUMBNAIL_
LUMA_ RANGE - Mean luma, as a fraction of full scale, below which a frame is black and above which it is white: neither makes a thumbnail.
Traits§
- Audio
Block Feed - The export’s mixed audio, block by block, for a copy that encodes it.
- Hardware
Frame Lease - Opaque decoder surface retained until GPU completion.
Functions§
- audio_
encoder_ capabilities - The audio encoders
codec_capabilitieslists, without looking at any video encoder. - check_
yuv_ transcode - Decides whether
source’s decoded pictures can become awidthxheightoutput’s frames as they are, with no conversion: the file side of a YUV transcode, whose project side is the same untouched tiling a copy needs. - choose_
thumbnail - The best thumbnail among scored frames: the sharpest that is neither
black nor white, or the sharpest of all when every frame is.
Nonefor no frames. - codec_
capabilities - Reports the encoders usable by alpha2’s native sinks: the linked
FFmpeg’s, andOpenH264when the user installed it. - codec_
thread_ allocation - Divides the export CPU budget across concurrently active codec contexts.
- codec_
thread_ budget - Returns the worker budget for one standalone software video codec context.
- codec_
thread_ override - The worker budget
settingnames:Noneunset, a positive count up to 64 (clamped), or the setting itself as the error when it is anything else (0, a word), which leaves the default in force. - configured_
codec_ thread_ override - The software-codec worker budget
ALPHA2_FFMPEG_THREADSsets (codec_thread_override). - copy_
packets - Writes
copy’s runs, back to back, into a newcontainerfile atoutput, withaudio. The runs were planned forcontainer(PacketCopyRequest::container). - downscale_
frame - The frame shrunk by
factor(2 for half size, 4 for quarter), each output sample the mean of thefactor x factorblock it covers, the visible size rounded down to even numbers so 4:2:0 encoders take it. - ffmpeg_
runtime_ identity - Returns the loaded
FFmpegidentity together with the release SDK pin. - h264_
encoder_ remedy - What a user can do on a machine that has no H.264 encoder for CPU
frames: install
OpenH264(or turn it back on), bring anFFmpegwithlibx264, or export another codec. - hardware_
decode_ backend - Backend this build decodes with, independent of any device being present.
- hardware_
decode_ capabilities - Reports which codecs the linked
FFmpegregisters for this backend. - hybrid_
encoders_ use_ hardware - Whether hybrid encoders are configured to run on the GPU.
- negotiate_
output_ config - Selects an output that plays stereo, requiring exact project-rate
f32support. - no_
video_ encoder_ message - Why an export of
codechas no encoder, and what to do about it. - openh264_
status OpenH264for this process, looked up once: the environment and the cache are read the first time anything asks.- plan_
packet_ copy - Decides whether
requestcan be served by copying packets. - probe
- Opens a local resource using the system
FFmpeg8 shared libraries. - probe_
video_ encoders - Opens every registered video encoder and reports what it actually does.
- probe_
vulkan_ decode - Decodes Vulkan frames without mapping, downloading, or uploading their planes.
- probe_
vulkan_ encode - Opens
h264_vulkanagainstdeviceand encodes one pool frame. - remove_
stale_ partial_ output - Removes a sibling partial file left by an interrupted transactional export.
- render_
offline - Runs the same graph used by realtime hosts and writes exact project-rate blocks.
- render_
project_ audio - Mixes a whole project audio range and writes exact project-rate blocks.
- require_
pinned_ ffmpeg_ for_ tests - Panics unless the loaded
FFmpegis the pinned SDK, for tests to call before they use it. - resize_
rgba - Straight-alpha RGBA
pixels,widthxheight, resized tonew_widthxnew_height: each axis resampled by a tent filter as wide as a source pixel or an output pixel, whichever is wider, so an axis that shrinks averages what each output pixel covers (as a proxy averages its blocks) and one that grows interpolates. Colour is weighted by alpha, so a transparent pixel’s colour does not bleed into its neighbours. An axis that keeps its size is left exactly as it is. - same_
chroma_ siting - Whether chroma sited at
sourceis whereoutputputs it, reading an unspecified location as centred, as import does. - score_
frame - Scores a frame on a fixed grid of luma samples, so the score does not depend on the frame’s size.
- software_
decode_ unsupported - Why this runtime cannot decode
streamwithout a hardware session, orNonewhen a software session can. A probe names the decoderFFmpegprefers (StreamInfo::codec); some of those decode only through a hardware session, and a runtime without libdav1d has no software AV1 decoder. - video_
encoder_ capabilities - The encoders usable for
codecalone, ascodec_capabilitieslists them. - video_
encoders_ without_ probing - The encoders
codec_capabilitieslists, found without opening any: what it would list from what is known so far, and the encoders whose open probe has not run yet, which it leaves out. - visit_
packet_ times - Visits the presentation time, in seconds, of each packet of the stream
with
AVStreamindexstream, in the order the file stores them, untilvisitreturns false or the file ends. A packet without a presentation time is visited at its decode time; one with neither is skipped. Only packets are read: nothing is decoded. - watch_
decode_ progress - Calls
progressedon this thread each time a decoder operation running on it produces a frame, or a packet copy’s plan reads a source packet, until the guard drops. - watch_
encode_ calls - Calls
beaton this thread before every encoder and muxer call an encode sink makes on it, until the returned guard drops. - write_
png - Writes
rgba,widthbyheight8-bit RGBA pixels with straight alpha, row by row, as a PNG attarget, published aswrite_wholepublishes a file: whole or not at all. - write_
whole - Writes a whole file at
target, published only oncewritehas written all of it:writefills the claimed partial file beside it (the same claim and lock a video output takes), which is synced and renamed into place as [publish] does. Any failure removes the partial and leaves what was at the target’s path. What is there is looked at before anything is written, and again at the rename, as it may have changed meanwhile.