Skip to main content

Module validate

Module validate 

Source
Expand description

Optional input-policy validation.

These are advisory helpers — the job engine (crate::job::run_job) does not enforce them, so rivet transcodes whatever it’s given. They exist so policy-bearing callers (e.g. a hosted service) can gate uploads with the same limits the reference transcoder uses.

Structs§

ValidationError
A validation rejection: a machine-readable ValidationErrorKind plus a human message.

Enums§

ValidationErrorKind
Why a stream was rejected by validate_stream.

Constants§

MAX_DURATION_SECS
Maximum accepted duration (seconds).
MIN_FRAME_RATE
Minimum accepted frame rate (fps).
MIN_RESOLUTION
Minimum accepted short side (pixels).

Functions§

needs_chroma_downsample
Whether a source pixel format needs the per-frame 4:4:4 → 4:2:0 chroma downsample before encode. The engine consults this to set up the pump.
validate_stream
Gate a demuxed stream against the reference resolution/frame-rate/duration/ pixel-format policy. Accepts Yuv420p, Yuv420p10le, Yuv444p10le, Yuva444p10le (the 4:4:4 formats are downsampled to 4:2:0 by the engine).