pub struct Setup { /* private fields */ }
Expand description
Builds a new encoder.
Implementations§
source§impl Setup
impl Setup
sourcepub fn preset(
preset: Preset,
tune: Tune,
fast_decode: bool,
zero_latency: bool
) -> Self
pub fn preset(
preset: Preset,
tune: Tune,
fast_decode: bool,
zero_latency: bool
) -> Self
Creates a new builder with the specified preset and tune.
sourcepub fn fastfirstpass(self) -> Self
pub fn fastfirstpass(self) -> Self
Makes the first pass faster.
sourcepub fn fps(self, num: u32, den: u32) -> Self
pub fn fps(self, num: u32, den: u32) -> Self
The video’s framerate, represented as a rational number.
The value is in frames per second.
sourcepub fn timebase(self, num: u32, den: u32) -> Self
pub fn timebase(self, num: u32, den: u32) -> Self
The encoder’s timebase, used in rate control with timestamps.
The value is in seconds per tick.
sourcepub fn annexb(self, annexb: bool) -> Self
pub fn annexb(self, annexb: bool) -> Self
Enable/disable Annex B start codes. Defaults to true
.
Annex B start codes are not used by containers based on the ISO BMFF (Base Media File Format), such as MP4 and MOV.
sourcepub fn bitrate(self, bitrate: i32) -> Self
pub fn bitrate(self, bitrate: i32) -> Self
Approximately restricts the bitrate.
The value is in metric kilobits per second.
sourcepub fn baseline(self) -> Self
pub fn baseline(self) -> Self
The lowest profile, with guaranteed compatibility with all decoders.
sourcepub fn max_keyframe_interval(self, interval: i32) -> Self
pub fn max_keyframe_interval(self, interval: i32) -> Self
Set the maximum number of frames between keyframes.
sourcepub fn min_keyframe_interval(self, interval: i32) -> Self
pub fn min_keyframe_interval(self, interval: i32) -> Self
Set the minimum number of frames between keyframes.
sourcepub fn scenecut_threshold(self, threshold: i32) -> Self
pub fn scenecut_threshold(self, threshold: i32) -> Self
Set the scenecut threshold. Set this to zero to guarantee a keyframe
every max_keyframe_interval
.