#[non_exhaustive]pub struct Vp9CodecSettings {
pub width_pixels: i32,
pub height_pixels: i32,
pub frame_rate: f64,
pub frame_rate_conversion_strategy: FrameRateConversionStrategy,
pub bitrate_bps: i32,
pub pixel_format: String,
pub rate_control_mode: String,
pub crf_level: i32,
pub profile: String,
pub gop_mode: Option<GopMode>,
pub color_format: Option<ColorFormat>,
/* private fields */
}Expand description
VP9 codec settings.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.width_pixels: i32The width of the video in pixels. Must be an even integer. When not specified, the width is adjusted to match the specified height and input aspect ratio. If both are omitted, the input width is used.
For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.
height_pixels: i32The height of the video in pixels. Must be an even integer. When not specified, the height is adjusted to match the specified width and input aspect ratio. If both are omitted, the input height is used.
For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.
frame_rate: f64Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120.
frame_rate_conversion_strategy: FrameRateConversionStrategyOptional. Frame rate conversion strategy for desired frame rate. The
default is DOWNSAMPLE.
bitrate_bps: i32Required. The video bitrate in bits per second. The minimum value is 1,000. The maximum value is 480,000,000.
pixel_format: StringPixel format to use. The default is yuv420p.
Supported pixel formats:
yuv420ppixel formatyuv422ppixel formatyuv444ppixel formatyuv420p1010-bit HDR pixel formatyuv422p1010-bit HDR pixel formatyuv444p1010-bit HDR pixel formatyuv420p1212-bit HDR pixel formatyuv422p1212-bit HDR pixel formatyuv444p1212-bit HDR pixel format
rate_control_mode: StringSpecify the mode. The default is vbr.
Supported rate control modes:
vbr- variable bitrate
crf_level: i32Target CRF level. Must be between 10 and 36, where 10 is the highest quality and 36 is the most efficient compression. The default is 21.
Note: This field is not supported.
profile: StringEnforces the specified codec profile. The following profiles are supported:
profile0(default)profile1profile2profile3
The available options are
WebM-compatible.
Note that certain values for this field may cause the
transcoder to override other fields you set in the Vp9CodecSettings
message.
gop_mode: Option<GopMode>GOP mode can be either by frame count or duration.
color_format: Option<ColorFormat>Color format can be sdr or hlg.
Implementations§
Source§impl Vp9CodecSettings
impl Vp9CodecSettings
pub fn new() -> Self
Sourcepub fn set_width_pixels<T: Into<i32>>(self, v: T) -> Self
pub fn set_width_pixels<T: Into<i32>>(self, v: T) -> Self
Sets the value of width_pixels.
Sourcepub fn set_height_pixels<T: Into<i32>>(self, v: T) -> Self
pub fn set_height_pixels<T: Into<i32>>(self, v: T) -> Self
Sets the value of height_pixels.
Sourcepub fn set_frame_rate<T: Into<f64>>(self, v: T) -> Self
pub fn set_frame_rate<T: Into<f64>>(self, v: T) -> Self
Sets the value of frame_rate.
Sourcepub fn set_frame_rate_conversion_strategy<T: Into<FrameRateConversionStrategy>>(
self,
v: T,
) -> Self
pub fn set_frame_rate_conversion_strategy<T: Into<FrameRateConversionStrategy>>( self, v: T, ) -> Self
Sets the value of frame_rate_conversion_strategy.
Sourcepub fn set_bitrate_bps<T: Into<i32>>(self, v: T) -> Self
pub fn set_bitrate_bps<T: Into<i32>>(self, v: T) -> Self
Sets the value of bitrate_bps.
Sourcepub fn set_pixel_format<T: Into<String>>(self, v: T) -> Self
pub fn set_pixel_format<T: Into<String>>(self, v: T) -> Self
Sets the value of pixel_format.
Sourcepub fn set_rate_control_mode<T: Into<String>>(self, v: T) -> Self
pub fn set_rate_control_mode<T: Into<String>>(self, v: T) -> Self
Sets the value of rate_control_mode.
Sourcepub fn set_crf_level<T: Into<i32>>(self, v: T) -> Self
pub fn set_crf_level<T: Into<i32>>(self, v: T) -> Self
Sets the value of crf_level.
Sourcepub fn set_profile<T: Into<String>>(self, v: T) -> Self
pub fn set_profile<T: Into<String>>(self, v: T) -> Self
Sets the value of profile.
Sourcepub fn set_gop_mode<T: Into<Option<GopMode>>>(self, v: T) -> Self
pub fn set_gop_mode<T: Into<Option<GopMode>>>(self, v: T) -> Self
Sets the value of gop_mode.
Note that all the setters affecting gop_mode are mutually
exclusive.
Sourcepub fn gop_frame_count(&self) -> Option<&i32>
pub fn gop_frame_count(&self) -> Option<&i32>
The value of gop_mode
if it holds a GopFrameCount, None if the field is not set or
holds a different branch.
Sourcepub fn set_gop_frame_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_gop_frame_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of gop_mode
to hold a GopFrameCount.
Note that all the setters affecting gop_mode are
mutually exclusive.
Sourcepub fn gop_duration(&self) -> Option<&Box<Duration>>
pub fn gop_duration(&self) -> Option<&Box<Duration>>
The value of gop_mode
if it holds a GopDuration, None if the field is not set or
holds a different branch.
Sourcepub fn set_gop_duration<T: Into<Box<Duration>>>(self, v: T) -> Self
pub fn set_gop_duration<T: Into<Box<Duration>>>(self, v: T) -> Self
Sets the value of gop_mode
to hold a GopDuration.
Note that all the setters affecting gop_mode are
mutually exclusive.
Sourcepub fn set_color_format<T: Into<Option<ColorFormat>>>(self, v: T) -> Self
pub fn set_color_format<T: Into<Option<ColorFormat>>>(self, v: T) -> Self
Sets the value of color_format.
Note that all the setters affecting color_format are mutually
exclusive.
Sourcepub fn sdr(&self) -> Option<&Box<Vp9ColorFormatSDR>>
pub fn sdr(&self) -> Option<&Box<Vp9ColorFormatSDR>>
The value of color_format
if it holds a Sdr, None if the field is not set or
holds a different branch.
Sourcepub fn set_sdr<T: Into<Box<Vp9ColorFormatSDR>>>(self, v: T) -> Self
pub fn set_sdr<T: Into<Box<Vp9ColorFormatSDR>>>(self, v: T) -> Self
Sets the value of color_format
to hold a Sdr.
Note that all the setters affecting color_format are
mutually exclusive.
Sourcepub fn hlg(&self) -> Option<&Box<Vp9ColorFormatHLG>>
pub fn hlg(&self) -> Option<&Box<Vp9ColorFormatHLG>>
The value of color_format
if it holds a Hlg, None if the field is not set or
holds a different branch.
Sourcepub fn set_hlg<T: Into<Box<Vp9ColorFormatHLG>>>(self, v: T) -> Self
pub fn set_hlg<T: Into<Box<Vp9ColorFormatHLG>>>(self, v: T) -> Self
Sets the value of color_format
to hold a Hlg.
Note that all the setters affecting color_format are
mutually exclusive.
Trait Implementations§
Source§impl Clone for Vp9CodecSettings
impl Clone for Vp9CodecSettings
Source§fn clone(&self) -> Vp9CodecSettings
fn clone(&self) -> Vp9CodecSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more