pub struct VideoConfig {Show 15 fields
pub codec: String,
pub bitrate: Option<String>,
pub crf: Option<u32>,
pub width: Option<u32>,
pub height: Option<u32>,
pub fps: Option<f64>,
pub preset: Option<String>,
pub pixel_format: Option<String>,
pub two_pass: bool,
pub max_bitrate: Option<String>,
pub min_bitrate: Option<String>,
pub buffer_size: Option<String>,
pub keyframe_interval: Option<u32>,
pub min_keyframe_interval: Option<u32>,
pub aspect_ratio: Option<String>,
}Expand description
Video codec configuration.
Fields§
§codec: StringVideo codec (av1, vp9, vp8, theora)
bitrate: Option<String>Target bitrate (e.g., “5M”, “2.5M”, “500k”)
crf: Option<u32>Constant Rate Factor (quality-based encoding)
width: Option<u32>Video width in pixels
height: Option<u32>Video height in pixels
fps: Option<f64>Frame rate (e.g., 30, 60, 23.976)
preset: Option<String>Encoder preset (ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow)
pixel_format: Option<String>Pixel format (yuv420p, yuv444p, etc.)
two_pass: boolEnable two-pass encoding
max_bitrate: Option<String>Maximum bitrate for VBV (Variable Bitrate Video)
min_bitrate: Option<String>Minimum bitrate for VBV
buffer_size: Option<String>Buffer size for VBV
keyframe_interval: Option<u32>Keyframe interval (GOP size)
min_keyframe_interval: Option<u32>Minimum keyframe interval
aspect_ratio: Option<String>Aspect ratio (e.g., “16:9”, “4:3”)
Trait Implementations§
Source§impl Clone for VideoConfig
impl Clone for VideoConfig
Source§fn clone(&self) -> VideoConfig
fn clone(&self) -> VideoConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VideoConfig
impl Debug for VideoConfig
Source§impl<'de> Deserialize<'de> for VideoConfig
impl<'de> Deserialize<'de> for VideoConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for VideoConfig
impl PartialEq for VideoConfig
Source§impl Serialize for VideoConfig
impl Serialize for VideoConfig
impl StructuralPartialEq for VideoConfig
Auto Trait Implementations§
impl Freeze for VideoConfig
impl RefUnwindSafe for VideoConfig
impl Send for VideoConfig
impl Sync for VideoConfig
impl Unpin for VideoConfig
impl UnsafeUnpin for VideoConfig
impl UnwindSafe for VideoConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more