pub struct PerSceneEncoder;Expand description
Computes codec-specific encoding parameters tuned for a given scene.
Implementations§
Source§impl PerSceneEncoder
impl PerSceneEncoder
Sourcepub fn compute_params(
&self,
scene: &SceneSegment,
target_bitrate_kbps: u32,
codec: &str,
) -> SceneEncodeParams
pub fn compute_params( &self, scene: &SceneSegment, target_bitrate_kbps: u32, codec: &str, ) -> SceneEncodeParams
Derives optimal SceneEncodeParams for scene at the given codec and
target average bitrate.
§Rules applied
| Scene characteristic | Adjustment |
|---|---|
Static | CRF −2, fewer B-frames, larger GOP |
ActionFast | CRF +2, B-frames=0, smaller GOP |
| Dark scene | CRF −3 (less noise in shadows) |
HighComplexity | CRF +3, more B-frames |
| AV1 | tile_cols=4, tile_rows=2 |
| VP9 | tile_cols=2, tile_rows=1 |
| H.265/HEVC | tile_cols=2, tile_rows=1 |
Trait Implementations§
Source§impl Clone for PerSceneEncoder
impl Clone for PerSceneEncoder
Source§fn clone(&self) -> PerSceneEncoder
fn clone(&self) -> PerSceneEncoder
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 PerSceneEncoder
impl Debug for PerSceneEncoder
Source§impl Default for PerSceneEncoder
impl Default for PerSceneEncoder
Source§fn default() -> PerSceneEncoder
fn default() -> PerSceneEncoder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PerSceneEncoder
impl RefUnwindSafe for PerSceneEncoder
impl Send for PerSceneEncoder
impl Sync for PerSceneEncoder
impl Unpin for PerSceneEncoder
impl UnsafeUnpin for PerSceneEncoder
impl UnwindSafe for PerSceneEncoder
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