Struct rusoto_elastictranscoder::PresetWatermark
source · [−]pub struct PresetWatermark {
pub horizontal_align: Option<String>,
pub horizontal_offset: Option<String>,
pub id: Option<String>,
pub max_height: Option<String>,
pub max_width: Option<String>,
pub opacity: Option<String>,
pub sizing_policy: Option<String>,
pub target: Option<String>,
pub vertical_align: Option<String>,
pub vertical_offset: Option<String>,
}
Expand description
Settings for the size, location, and opacity of graphics that you want Elastic Transcoder to overlay over videos that are transcoded using this preset. You can specify settings for up to four watermarks. Watermarks appear in the specified size and location, and with the specified opacity for the duration of the transcoded video.
Watermarks can be in .png or .jpg format. If you want to display a watermark that is not rectangular, use the .png format, which supports transparency.
When you create a job that uses this preset, you specify the .png or .jpg graphics that you want Elastic Transcoder to include in the transcoded videos. You can specify fewer graphics in the job than you specify watermark settings in the preset, which allows you to use the same preset for up to four watermarks that have different dimensions.
Fields
horizontal_align: Option<String>
The horizontal position of the watermark unless you specify a non-zero value for HorizontalOffset
:
-
Left: The left edge of the watermark is aligned with the left border of the video.
-
Right: The right edge of the watermark is aligned with the right border of the video.
-
Center: The watermark is centered between the left and right borders.
horizontal_offset: Option<String>
The amount by which you want the horizontal position of the watermark to be offset from the position specified by HorizontalAlign:
-
number of pixels (px): The minimum value is 0 pixels, and the maximum value is the value of MaxWidth.
-
integer percentage (%): The range of valid values is 0 to 100.
For example, if you specify Left for HorizontalAlign
and 5px for HorizontalOffset
, the left side of the watermark appears 5 pixels from the left border of the output video.
HorizontalOffset
is only valid when the value of HorizontalAlign
is Left
or Right
. If you specify an offset that causes the watermark to extend beyond the left or right border and Elastic Transcoder has not added black bars, the watermark is cropped. If Elastic Transcoder has added black bars, the watermark extends into the black bars. If the watermark extends beyond the black bars, it is cropped.
Use the value of Target
to specify whether you want to include the black bars that are added by Elastic Transcoder, if any, in the offset calculation.
id: Option<String>
A unique identifier for the settings for one watermark. The value of Id
can be up to 40 characters long.
max_height: Option<String>
The maximum height of the watermark in one of the following formats:
-
number of pixels (px): The minimum value is 16 pixels, and the maximum value is the value of
MaxHeight
. -
integer percentage (%): The range of valid values is 0 to 100. Use the value of
Target
to specify whether you want Elastic Transcoder to include the black bars that are added by Elastic Transcoder, if any, in the calculation.
If you specify the value in pixels, it must be less than or equal to the value of MaxHeight
.
max_width: Option<String>
The maximum width of the watermark in one of the following formats:
-
number of pixels (px): The minimum value is 16 pixels, and the maximum value is the value of
MaxWidth
. -
integer percentage (%): The range of valid values is 0 to 100. Use the value of
Target
to specify whether you want Elastic Transcoder to include the black bars that are added by Elastic Transcoder, if any, in the calculation.If you specify the value in pixels, it must be less than or equal to the value of
MaxWidth
.
opacity: Option<String>
A percentage that indicates how much you want a watermark to obscure the video in the location where it appears. Valid values are 0 (the watermark is invisible) to 100 (the watermark completely obscures the video in the specified location). The datatype of Opacity
is float.
Elastic Transcoder supports transparent .png graphics. If you use a transparent .png, the transparent portion of the video appears as if you had specified a value of 0 for Opacity
. The .jpg file format doesn't support transparency.
sizing_policy: Option<String>
A value that controls scaling of the watermark:
-
Fit: Elastic Transcoder scales the watermark so it matches the value that you specified in either
MaxWidth
orMaxHeight
without exceeding the other value. -
Stretch: Elastic Transcoder stretches the watermark to match the values that you specified for
MaxWidth
andMaxHeight
. If the relative proportions of the watermark and the values ofMaxWidth
andMaxHeight
are different, the watermark will be distorted. -
ShrinkToFit: Elastic Transcoder scales the watermark down so that its dimensions match the values that you specified for at least one of
MaxWidth
andMaxHeight
without exceeding either value. If you specify this option, Elastic Transcoder does not scale the watermark up.
target: Option<String>
A value that determines how Elastic Transcoder interprets values that you specified for HorizontalOffset
, VerticalOffset
, MaxWidth
, and MaxHeight
:
-
Content:
HorizontalOffset
andVerticalOffset
values are calculated based on the borders of the video excluding black bars added by Elastic Transcoder, if any. In addition,MaxWidth
andMaxHeight
, if specified as a percentage, are calculated based on the borders of the video excluding black bars added by Elastic Transcoder, if any. -
Frame:
HorizontalOffset
andVerticalOffset
values are calculated based on the borders of the video including black bars added by Elastic Transcoder, if any. In addition,MaxWidth
andMaxHeight
, if specified as a percentage, are calculated based on the borders of the video including black bars added by Elastic Transcoder, if any.
vertical_align: Option<String>
The vertical position of the watermark unless you specify a non-zero value for VerticalOffset
:
-
Top: The top edge of the watermark is aligned with the top border of the video.
-
Bottom: The bottom edge of the watermark is aligned with the bottom border of the video.
-
Center: The watermark is centered between the top and bottom borders.
vertical_offset: Option<String>
VerticalOffset
The amount by which you want the vertical position of the watermark to be offset from the position specified by VerticalAlign:
-
number of pixels (px): The minimum value is 0 pixels, and the maximum value is the value of
MaxHeight
. -
integer percentage (%): The range of valid values is 0 to 100.
For example, if you specify Top
for VerticalAlign
and 5px
for VerticalOffset
, the top of the watermark appears 5 pixels from the top border of the output video.
VerticalOffset
is only valid when the value of VerticalAlign is Top or Bottom.
If you specify an offset that causes the watermark to extend beyond the top or bottom border and Elastic Transcoder has not added black bars, the watermark is cropped. If Elastic Transcoder has added black bars, the watermark extends into the black bars. If the watermark extends beyond the black bars, it is cropped.
Use the value of Target
to specify whether you want Elastic Transcoder to include the black bars that are added by Elastic Transcoder, if any, in the offset calculation.
Trait Implementations
sourceimpl Clone for PresetWatermark
impl Clone for PresetWatermark
sourcefn clone(&self) -> PresetWatermark
fn clone(&self) -> PresetWatermark
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PresetWatermark
impl Debug for PresetWatermark
sourceimpl Default for PresetWatermark
impl Default for PresetWatermark
sourcefn default() -> PresetWatermark
fn default() -> PresetWatermark
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for PresetWatermark
impl<'de> Deserialize<'de> for PresetWatermark
sourcefn 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
sourceimpl PartialEq<PresetWatermark> for PresetWatermark
impl PartialEq<PresetWatermark> for PresetWatermark
sourcefn eq(&self, other: &PresetWatermark) -> bool
fn eq(&self, other: &PresetWatermark) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PresetWatermark) -> bool
fn ne(&self, other: &PresetWatermark) -> bool
This method tests for !=
.
sourceimpl Serialize for PresetWatermark
impl Serialize for PresetWatermark
impl StructuralPartialEq for PresetWatermark
Auto Trait Implementations
impl RefUnwindSafe for PresetWatermark
impl Send for PresetWatermark
impl Sync for PresetWatermark
impl Unpin for PresetWatermark
impl UnwindSafe for PresetWatermark
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more