Skip to main content

Crate oxframe_export

Crate oxframe_export 

Source
Expand description

Video export: raw RGBA frames are piped into ffmpeg (no intermediate files) from a writer thread, so encoding overlaps with rendering.

Status: oxframe is under very active development. The API is not stable yet and may change from version to version. Pin the exact version in your Cargo.toml and check the changelog before upgrading.

ffmpeg is looked up in PATH (or an explicit path); if it is missing, ExportError::FfmpegNotFound carries installation instructions.

Structs§

Audio
Soundtrack to mux into the video.
ExportOptions
What to export and where.
Exporter
Receives frames in order and writes them out.
Image
8-bit sRGB RGBA, straight alpha, row-major, no padding.
MixClip
One clip on the output timeline.
MixRequest
What to mix.
Mixed
Mono PCM at SAMPLE_RATE.

Enums§

ExportError
Why an export failed.
Format
Output format.
MixError
Why a mix failed.

Constants§

FFMPEG_HELP
Installation hint shown when ffmpeg is missing.
PREVIEW_RATE
Preview playback is coarser than the render mix.
SAMPLE_RATE
Samples per second of every mix. One rate keeps renders comparable.

Functions§

concat
Joins video files encoded with the same settings (segments, in order) into opts.out without re-encoding them, and adds opts.audio. Used by parallel rendering: each segment is encoded on its own, and the result does not depend on how many ran at once.
concat_args
Command line for concat() (without the program name): the segments listed in list joined without re-encoding, plus the soundtrack.
downsample
Average from Hz samples down to to Hz.
envelope
Peak envelope in 0..=1, one value per bucket.
ffmpeg_args
Command line for ffmpeg (without the program name).
find_ffmpeg
Finds ffmpeg: the explicit path if given, else the first match in PATH (with .exe on Windows).
media_duration
Duration of a media file in seconds (via ffmpeg’s decoder).
mix
Mix req into mono PCM.
probe_duration
Length of an audio file in seconds.
waveform
Peak envelope of an audio file for the editor’s waveform: buckets values in 0..=1, decoded with ffmpeg at 8 kHz mono.
write_wav
Write mono PCM as a stereo 16-bit WAV (both channels identical).