Expand description
Portable core types for frame-accurate video and synchronized audio I/O.
The crate provides checked timeline and media values, byte I/O, codec and transfer contracts, exact-frame decoding, indexed MP4 and WebM output, and a browser-facing WebAssembly boundary. Production container, codec, and playback backends build on these types without leaking platform-specific values into the common API.
Re-exports§
pub use api::Capability;pub use api::Error;pub use api::ErrorKind;pub use api::Limits;pub use api::Result;pub use api::Support;pub use api::TransferMode;pub use audio::AacDecoder;pub use audio::AacSampleReader;pub use audio::AudioDecoder;pub use audio::AudioEdit;pub use audio::AudioSampleReader;pub use audio::AudioTrackTiming;pub use audio::EncodedAudioSample;pub use av1::Av1CodecConfigurationRecord;pub use av1::Av1ColorConfig;pub use av1::Av1FrameHeader;pub use av1::Av1FrameType;pub use av1::Av1Metadata;pub use av1::Av1Obu;pub use av1::Av1ObuHeader;pub use av1::Av1ObuType;pub use av1::Av1OperatingPoint;pub use av1::Av1Parser;pub use av1::Av1SequenceHeader;pub use av1::Av1SyntaxSupport;pub use av1::Av1TileGroup;pub use av1_entropy::AV1_CDF_MAX;pub use av1_entropy::Av1SymbolDecoder;pub use av1_entropy::validate_cdf;pub use av1_filters::CdefStrength;pub use av1_filters::FilmGrainParams;pub use av1_filters::FilterFrame;pub use av1_filters::FilterPlane;pub use av1_filters::LoopFilterParams;pub use av1_filters::MatrixCoefficients;pub use av1_filters::RestorationUnit;pub use av1_filters::TxSizeGrid;pub use av1_filters::apply_film_grain;pub use av1_filters::apply_restoration_unit;pub use av1_filters::cdef_frame;pub use av1_filters::convert_to_rgba8;pub use av1_filters::deblock_frame;pub use av1_filters::super_resolution_upscale;pub use av1_inter_decoder::Av1InterDecoder;pub use av1_intra::Av1IntraBlock;pub use av1_intra::Av1IntraFrame;pub use av1_intra::Av1IntraMode;pub use av1_intra::Av1TxType;pub use av1_intra::Tx1d;pub use av1_intra::get_ac_quant;pub use av1_intra::get_dc_quant;pub use av1_intra::inverse_transform;pub use av1_intra::inverse_wht_4x4;pub use av1_intra_decoder::decode_av1_lossless_intra;pub use av1_intra_decoder::decode_av1_lossless_intra_with_tx_sizes;pub use av1_intra_pred::Av1IntraSimd;pub use av1_intra_pred::SmoothMode;pub use av1_intra_pred::add_residual_row;pub use av1_intra_pred::av1_intra_simd;pub use av1_intra_pred::directional_row;pub use av1_intra_pred::paeth_row;pub use av1_intra_pred::smooth_row;pub use av1_intra_pred::sum_samples;pub use codec::AudioDrain;pub use codec::AudioEncoder;pub use codec::AudioEncoderConfig;pub use codec::AudioEncoderFactory;pub use codec::AudioEncoderFormat;pub use codec::AudioGapless;pub use codec::CancellationToken;pub use codec::CodecImplementation;pub use codec::CodecProfile;pub use codec::CodecSupport;pub use codec::DecodeStatistics;pub use codec::DecodedVideoFrame;pub use codec::EncodedSample;pub use codec::EncodedVideoSample;pub use codec::EncoderConfig;pub use codec::EncoderFuture;pub use codec::ExactFrameReader;pub use codec::HardwarePreference;pub use codec::SEEK_LATENCY_BUDGET;pub use codec::SampleDependency;pub use codec::Seek;pub use codec::SeekPreviewSource;pub use codec::TrackKind;pub use codec::VideoDecoder;pub use codec::VideoDecoderConfig;pub use codec::VideoDecoderFactory;pub use codec::VideoEncoder;pub use codec::VideoEncoderConfig;pub use codec::VideoEncoderFactory;pub use codec::VideoEncoderFormat;pub use codec::uncompressed_video_decoder_factory;pub use codec_config::DerivedCodecString;pub use codec_config::Vp9CodecConfig;pub use codec_config::derive_codec_string;pub use conformance::ExpectedVideoFrame;pub use conformance::FrameDigest;pub use conformance::VideoDecoderConformanceReport;pub use conformance::VideoDecoderConformanceVector;pub use conformance::VideoEncoderConformanceReport;pub use conformance::VideoEncoderConformanceVector;pub use conformance::verify_video_decoder_conformance;pub use conformance::verify_video_encoder_conformance;pub use container::container_capabilities;pub use container::probe_container;pub use cover::COVER_THUMBNAIL_MAX_EDGE;pub use cover::CoverSource;pub use cover::DEFAULT_COVER_FRAME;pub use media::AudioBuffer;pub use media::Codec;pub use media::ColorRange;pub use media::Container;pub use media::PixelFormat;pub use media::Plane;pub use media::VideoDimensions;pub use media::VideoFrame;pub use mp4::CoverArt;pub use mp4::CoverArtFormat;pub use mp4_demux::AacTrackConfig;pub use mp4_demux::EditMapping;pub use mp4_demux::Mp4Demuxer;pub use mp4_demux::Mp4DemuxerOptions;pub use mp4_demux::Mp4Sample;pub use mp4_demux::Mp4Track;pub use mp4_demux::probe_mp4;pub use opus::NativeOpusDecoder;pub use opus::native_opus_audio_encoder_factory;pub use opus::OPUS_PREROLL_SAMPLES;pub use opus::OPUS_SAMPLE_RATE;pub use opus::OpusHead;pub use opus::opus_packet_samples;pub use opus::opus_preroll_packets;pub use output::MediaOutput;pub use output::OutputOptions;pub use playback::AudioOutputBackend;pub use playback::AudioOutputKind;pub use playback::IndexedPresentationTimeline;pub use playback::NativeAudioOutput;pub use playback::PlaybackAudioOutput;pub use playback::PlaybackAudioSource;pub use playback::PlaybackController;pub use playback::PlaybackOptions;pub use playback::PlaybackVideoSource;pub use playback::Presentation;pub use playback::WebAudioOutput;pub use previews::PreviewOptions;pub use previews::PreviewPass;pub use previews::PreviewStore;pub use timeline::FrameIndex;pub use timeline::FrameRate;pub use timeline::Rational;pub use timeline::SampleRange;pub use timeline::Timeline;pub use transfer::ColorConversion;pub use transfer::ContextIdentity;pub use transfer::CpuFrameDestination;pub use transfer::CpuFrameSource;pub use transfer::CpuPlaneDestination;pub use transfer::ExecutionOwner;pub use transfer::FrameDestination;pub use transfer::FrameSource;pub use transfer::GraphicsAdapter;pub use transfer::GraphicsApi;pub use transfer::GraphicsResource;pub use transfer::Orientation;pub use transfer::ResourceKind;pub use transfer::ResourceOwnership;pub use transfer::ScaleFilter;pub use transfer::TransferCapability;pub use transfer::TransferPolicy;pub use transfer::TransferStage;pub use transfer::execute_transfer;pub use transfer::inspect_transfer;pub use vorbis::NativeVorbisDecoder;pub use vorbis::native_vorbis_audio_encoder_factory;pub use vorbis::VORBIS_PREROLL_PACKETS;pub use vorbis::VorbisConfig;pub use zvidlib_core::SimdIsa;pub use webm::WebmMuxer;pub use webm_demux::WebmAudioTrim;pub use webm_demux::WebmCuePoint;pub use webm_demux::WebmDemuxer;pub use webm_demux::WebmDemuxerOptions;pub use webm_demux::WebmSeekPoint;pub use webm_demux::WebmSkippedTrack;pub use webm_demux::probe_webm;pub use previews::PreviewIndex;
Modules§
- api
- audio
- Exact audio sample reads with gapless and edit-list timeline mapping.
- av1
- Bounded AV1 low-overhead bitstream and configuration parsing.
- av1_
entropy - Bounded arithmetic-symbol primitives used by the native AV1 decoder.
- av1_
filters - Post-reconstruction AV1 in-loop filtering and output color conversion.
- av1_
inter_ decoder - Dependency-free stateful decoding of bounded AV1 Main-profile inter
frames, building on the intra reconstruction published by
crate::av1_intra_decoder. - av1_
intra - Bounded pixel primitives used by AV1 intra-frame reconstruction.
- av1_
intra_ decoder - Dependency-free reconstruction of bounded AV1 Main-profile intra frames. The implemented syntax is the standards-compliant reduced-still, 8-bit monochrome, single-tile subset used by zvidlib’s native AV1 encoder. Every other syntax branch is rejected explicitly.
- av1_
intra_ pred - SIMD-accelerated pixel kernels shared by AV1 intra prediction and reconstruction.
- av1_mc
- AV1 inter prediction primitives (motion compensation) with SIMD backends.
- av1_
simd - Runtime-dispatched SIMD kernels for the AV1 transforms and in-loop filters.
- codec
- codec_
config - Portable derivation of WebCodecs codec strings and
CodecProfilevalues from raw MP4hvcC/av1C/vpcCcodec configuration boxes and for VP8, which has none, and the VP9 codec configuration record (Vp9CodecConfig). - conformance
- Backend-independent video codec conformance helpers.
- container
- Container detection and capability discovery across MP4 and WebM.
- cover
- Cover art generated from a recorded video frame (issue #510).
- io
- media
- mp4
- Deterministic seekable ISO BMFF/MP4 muxing.
- mp4_
demux - Bounded, read-only ISO BMFF/MP4 probing and sample indexing.
- opus
- Opus configuration records, packet timing and, with the
opus-decoderoropus-encoderfeature, the native Opus codec. Opus audio: decoder configuration, native decoding and native encoding. - output
- Strict synchronized indexed writing built on encoder and muxer contracts.
- playback
- Audio-clock-driven playback shared by native and browser adapters.
- previews
- A bounded preview tier over a track: one shrunk picture every N frames.
- simd
- The process-wide SIMD instruction-set override shared by every codec kernel.
- timeline
- transfer
- Frame transfer contracts shared by CPU, native OpenGL, and browser WebGL backends.
- vorbis
- Vorbis audio: decoder configuration, packet timing and native decoding.
- webm
- Deterministic seekable WebM muxing.
- webm_
demux - Bounded, read-only WebM (Matroska/EBML) probing and sample indexing.
Structs§
- Default
Audio Output - A raw-PCM adapter for the system default output device.
- Native
AacDecoder - AAC-LC access-unit decoder: AudioToolbox on macOS, Media Foundation on Windows, and Symphonia’s decoder on the native targets with no platform AAC decoder, such as Linux.
Functions§
- forward_
transform - Applies the non-lossless forward transform for one
size x sizeblock, returning row-major coefficients ready for quantization. - native_
aac_ audio_ encoder_ factory - Returns the native AAC-LC encoder backend.
- native_
av1_ video_ decoder_ factory - Returns the dependency-free native AV1 Main-profile (8-bit 4:2:0 and monochrome) software decoder backend.
- native_
av1_ video_ encoder_ factory - Returns the native software AV1 encoder backend.
- native_
hevc_ video_ decoder_ factory - Returns the native HEVC Main and Main 10 decoder backend.
- native_
hevc_ video_ encoder_ factory - Returns the HEVC Main encoder factory.
- native_
vp8_ video_ decoder_ factory - Returns the native VP8 decoder backend.
- native_
vp8_ video_ encoder_ factory - Returns the native VP8 encoder backend.
- native_
vp9_ video_ decoder_ factory - Returns the native VP9 profile 0 (8-bit 4:2:0) decoder backend.
- native_
vp9_ video_ encoder_ factory - Returns the native VP9 profile 0 encoder backend.