pub struct VideoSpec {
pub codec: VideoCodec,
pub bitrate_bps: Option<u64>,
pub crf: Option<u8>,
pub height: Option<u32>,
pub portrait: bool,
pub fps: Option<u32>,
pub preset: QualityPreset,
pub hardware: bool,
pub to_sdr: Option<Hdr>,
}Expand description
Video encoding parameters.
Fields§
§codec: VideoCodec§bitrate_bps: Option<u64>Target average bitrate (bits/s) for two-pass; None in CRF/quality mode.
crf: Option<u8>CRF value for quality mode; None in bitrate mode.
height: Option<u32>Downscale target of the short side (“1080p” = 1080 px on the short
side, like phones and sites mean it); None keeps the source resolution.
portrait: boolThe video is shown taller than wide: the short side is its width.
fps: Option<u32>Frame-rate cap; None keeps the source rate.
preset: QualityPreset§hardware: boolEncode with Apple’s hardware encoder: crf then carries its -q:v
quality (1–100, higher = better) and two-pass doesn’t apply.
to_sdr: Option<Hdr>Tone-map this HDR source to 8-bit SDR (BT.709): set for size targets / platform presets, where the file has to play everywhere — 10-bit H.264 (High 10) and HDR aren’t decoded by most phones and browsers.
Trait Implementations§
impl StructuralPartialEq for VideoSpec
Auto Trait Implementations§
impl Freeze for VideoSpec
impl RefUnwindSafe for VideoSpec
impl Send for VideoSpec
impl Sync for VideoSpec
impl Unpin for VideoSpec
impl UnsafeUnpin for VideoSpec
impl UnwindSafe for VideoSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more