pub struct VideoSettings {
pub codec: Codec,
pub resolution: Option<Resolution>,
pub frame_rate: Option<FrameRate>,
pub quality: Option<Quality>,
pub bitrate: Option<Bitrate>,
pub speed: Option<EncodingSpeed>,
pub profile: Option<CodecProfile>,
pub level: Option<CodecLevel>,
}Expand description
Video-specific encoding settings.
Fields§
§codec: CodecVideo codec.
resolution: Option<Resolution>Output resolution.
frame_rate: Option<FrameRate>Output frame rate.
quality: Option<Quality>Quality preset.
bitrate: Option<Bitrate>Bitrate setting.
speed: Option<EncodingSpeed>Encoding speed.
profile: Option<CodecProfile>Codec profile (e.g., H264High, HevcMain10).
level: Option<CodecLevel>Codec level (e.g., “4.1”).
Implementations§
Source§impl VideoSettings
impl VideoSettings
Sourcepub fn with_resolution(self, res: Resolution) -> Self
pub fn with_resolution(self, res: Resolution) -> Self
Set the output resolution.
Sourcepub fn with_frame_rate(self, fps: FrameRate) -> Self
pub fn with_frame_rate(self, fps: FrameRate) -> Self
Set the output frame rate.
Sourcepub fn with_quality(self, q: Quality) -> Self
pub fn with_quality(self, q: Quality) -> Self
Set the quality preset.
Sourcepub fn with_bitrate(self, br: Bitrate) -> Self
pub fn with_bitrate(self, br: Bitrate) -> Self
Set the bitrate.
Sourcepub fn with_speed(self, speed: EncodingSpeed) -> Self
pub fn with_speed(self, speed: EncodingSpeed) -> Self
Set the encoding speed.
Sourcepub fn with_profile(self, profile: CodecProfile) -> Self
pub fn with_profile(self, profile: CodecProfile) -> Self
Set the codec profile.
Sourcepub fn with_level(self, level: CodecLevel) -> Self
pub fn with_level(self, level: CodecLevel) -> Self
Set the codec level.
Trait Implementations§
Source§impl Clone for VideoSettings
impl Clone for VideoSettings
Source§fn clone(&self) -> VideoSettings
fn clone(&self) -> VideoSettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 VideoSettings
impl Debug for VideoSettings
Source§impl<'de> Deserialize<'de> for VideoSettings
impl<'de> Deserialize<'de> for VideoSettings
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
Auto Trait Implementations§
impl Freeze for VideoSettings
impl RefUnwindSafe for VideoSettings
impl Send for VideoSettings
impl Sync for VideoSettings
impl Unpin for VideoSettings
impl UnsafeUnpin for VideoSettings
impl UnwindSafe for VideoSettings
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