com.amazonaws.services.mediaconvert.model.AudioNormalizationSettings Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-mediaconvert Show documentation
Show all versions of aws-java-sdk-mediaconvert Show documentation
The AWS Java SDK for AWS Elemental MediaConvert module holds the client classes that are used for communicating with AWS Elemental MediaConvert Service
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.mediaconvert.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
* Advanced audio normalization settings. Ignore these settings unless you need to comply with a loudness standard.
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AudioNormalizationSettings implements Serializable, Cloneable, StructuredPojo {
/**
* Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A measurement of
* ungated average loudness for an entire piece of content, suitable for measurement of short-form content under
* ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2: Gated loudness. A measurement of
* gated average loudness compliant with the requirements of EBU-R128. Supports up to 5.1 audio channels. ITU-R
* BS.1770-3: Modified peak. The same loudness measurement algorithm as 1770-2, with an updated true peak
* measurement. ITU-R BS.1770-4: Higher channel count. Allows for more audio channels than the other algorithms,
* including configurations such as 7.1.
*/
private String algorithm;
/**
* When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be measured
* but not adjusted.
*/
private String algorithmControl;
/**
* Content measuring above this level will be corrected to the target level. Content measuring below this level will
* not be corrected.
*/
private Integer correctionGateLevel;
/** If set to LOG, log each output's audio track loudness to a CSV file. */
private String loudnessLogging;
/** If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness. */
private String peakCalculation;
/**
* When you use Audio normalization, optionally use this setting to specify a target loudness. If you don't specify
* a value here, the encoder chooses a value for you, based on the algorithm that you choose for Algorithm. If you
* choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will choose -23 LKFS.
*/
private Double targetLkfs;
/**
* Specify the True-peak limiter threshold in decibels relative to full scale (dBFS). The peak inter-audio sample
* loudness in your output will be limited to the value that you specify, without affecting the overall target LKFS.
* Enter a value from 0 to -8. Leave blank to use the default value 0.
*/
private Double truePeakLimiterThreshold;
/**
* Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A measurement of
* ungated average loudness for an entire piece of content, suitable for measurement of short-form content under
* ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2: Gated loudness. A measurement of
* gated average loudness compliant with the requirements of EBU-R128. Supports up to 5.1 audio channels. ITU-R
* BS.1770-3: Modified peak. The same loudness measurement algorithm as 1770-2, with an updated true peak
* measurement. ITU-R BS.1770-4: Higher channel count. Allows for more audio channels than the other algorithms,
* including configurations such as 7.1.
*
* @param algorithm
* Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A
* measurement of ungated average loudness for an entire piece of content, suitable for measurement of
* short-form content under ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2:
* Gated loudness. A measurement of gated average loudness compliant with the requirements of EBU-R128.
* Supports up to 5.1 audio channels. ITU-R BS.1770-3: Modified peak. The same loudness measurement algorithm
* as 1770-2, with an updated true peak measurement. ITU-R BS.1770-4: Higher channel count. Allows for more
* audio channels than the other algorithms, including configurations such as 7.1.
* @see AudioNormalizationAlgorithm
*/
public void setAlgorithm(String algorithm) {
this.algorithm = algorithm;
}
/**
* Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A measurement of
* ungated average loudness for an entire piece of content, suitable for measurement of short-form content under
* ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2: Gated loudness. A measurement of
* gated average loudness compliant with the requirements of EBU-R128. Supports up to 5.1 audio channels. ITU-R
* BS.1770-3: Modified peak. The same loudness measurement algorithm as 1770-2, with an updated true peak
* measurement. ITU-R BS.1770-4: Higher channel count. Allows for more audio channels than the other algorithms,
* including configurations such as 7.1.
*
* @return Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A
* measurement of ungated average loudness for an entire piece of content, suitable for measurement of
* short-form content under ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2:
* Gated loudness. A measurement of gated average loudness compliant with the requirements of EBU-R128.
* Supports up to 5.1 audio channels. ITU-R BS.1770-3: Modified peak. The same loudness measurement
* algorithm as 1770-2, with an updated true peak measurement. ITU-R BS.1770-4: Higher channel count. Allows
* for more audio channels than the other algorithms, including configurations such as 7.1.
* @see AudioNormalizationAlgorithm
*/
public String getAlgorithm() {
return this.algorithm;
}
/**
* Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A measurement of
* ungated average loudness for an entire piece of content, suitable for measurement of short-form content under
* ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2: Gated loudness. A measurement of
* gated average loudness compliant with the requirements of EBU-R128. Supports up to 5.1 audio channels. ITU-R
* BS.1770-3: Modified peak. The same loudness measurement algorithm as 1770-2, with an updated true peak
* measurement. ITU-R BS.1770-4: Higher channel count. Allows for more audio channels than the other algorithms,
* including configurations such as 7.1.
*
* @param algorithm
* Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A
* measurement of ungated average loudness for an entire piece of content, suitable for measurement of
* short-form content under ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2:
* Gated loudness. A measurement of gated average loudness compliant with the requirements of EBU-R128.
* Supports up to 5.1 audio channels. ITU-R BS.1770-3: Modified peak. The same loudness measurement algorithm
* as 1770-2, with an updated true peak measurement. ITU-R BS.1770-4: Higher channel count. Allows for more
* audio channels than the other algorithms, including configurations such as 7.1.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AudioNormalizationAlgorithm
*/
public AudioNormalizationSettings withAlgorithm(String algorithm) {
setAlgorithm(algorithm);
return this;
}
/**
* Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A measurement of
* ungated average loudness for an entire piece of content, suitable for measurement of short-form content under
* ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2: Gated loudness. A measurement of
* gated average loudness compliant with the requirements of EBU-R128. Supports up to 5.1 audio channels. ITU-R
* BS.1770-3: Modified peak. The same loudness measurement algorithm as 1770-2, with an updated true peak
* measurement. ITU-R BS.1770-4: Higher channel count. Allows for more audio channels than the other algorithms,
* including configurations such as 7.1.
*
* @param algorithm
* Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A
* measurement of ungated average loudness for an entire piece of content, suitable for measurement of
* short-form content under ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2:
* Gated loudness. A measurement of gated average loudness compliant with the requirements of EBU-R128.
* Supports up to 5.1 audio channels. ITU-R BS.1770-3: Modified peak. The same loudness measurement algorithm
* as 1770-2, with an updated true peak measurement. ITU-R BS.1770-4: Higher channel count. Allows for more
* audio channels than the other algorithms, including configurations such as 7.1.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AudioNormalizationAlgorithm
*/
public AudioNormalizationSettings withAlgorithm(AudioNormalizationAlgorithm algorithm) {
this.algorithm = algorithm.toString();
return this;
}
/**
* When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be measured
* but not adjusted.
*
* @param algorithmControl
* When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be
* measured but not adjusted.
* @see AudioNormalizationAlgorithmControl
*/
public void setAlgorithmControl(String algorithmControl) {
this.algorithmControl = algorithmControl;
}
/**
* When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be measured
* but not adjusted.
*
* @return When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be
* measured but not adjusted.
* @see AudioNormalizationAlgorithmControl
*/
public String getAlgorithmControl() {
return this.algorithmControl;
}
/**
* When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be measured
* but not adjusted.
*
* @param algorithmControl
* When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be
* measured but not adjusted.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AudioNormalizationAlgorithmControl
*/
public AudioNormalizationSettings withAlgorithmControl(String algorithmControl) {
setAlgorithmControl(algorithmControl);
return this;
}
/**
* When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be measured
* but not adjusted.
*
* @param algorithmControl
* When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be
* measured but not adjusted.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AudioNormalizationAlgorithmControl
*/
public AudioNormalizationSettings withAlgorithmControl(AudioNormalizationAlgorithmControl algorithmControl) {
this.algorithmControl = algorithmControl.toString();
return this;
}
/**
* Content measuring above this level will be corrected to the target level. Content measuring below this level will
* not be corrected.
*
* @param correctionGateLevel
* Content measuring above this level will be corrected to the target level. Content measuring below this
* level will not be corrected.
*/
public void setCorrectionGateLevel(Integer correctionGateLevel) {
this.correctionGateLevel = correctionGateLevel;
}
/**
* Content measuring above this level will be corrected to the target level. Content measuring below this level will
* not be corrected.
*
* @return Content measuring above this level will be corrected to the target level. Content measuring below this
* level will not be corrected.
*/
public Integer getCorrectionGateLevel() {
return this.correctionGateLevel;
}
/**
* Content measuring above this level will be corrected to the target level. Content measuring below this level will
* not be corrected.
*
* @param correctionGateLevel
* Content measuring above this level will be corrected to the target level. Content measuring below this
* level will not be corrected.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AudioNormalizationSettings withCorrectionGateLevel(Integer correctionGateLevel) {
setCorrectionGateLevel(correctionGateLevel);
return this;
}
/**
* If set to LOG, log each output's audio track loudness to a CSV file.
*
* @param loudnessLogging
* If set to LOG, log each output's audio track loudness to a CSV file.
* @see AudioNormalizationLoudnessLogging
*/
public void setLoudnessLogging(String loudnessLogging) {
this.loudnessLogging = loudnessLogging;
}
/**
* If set to LOG, log each output's audio track loudness to a CSV file.
*
* @return If set to LOG, log each output's audio track loudness to a CSV file.
* @see AudioNormalizationLoudnessLogging
*/
public String getLoudnessLogging() {
return this.loudnessLogging;
}
/**
* If set to LOG, log each output's audio track loudness to a CSV file.
*
* @param loudnessLogging
* If set to LOG, log each output's audio track loudness to a CSV file.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AudioNormalizationLoudnessLogging
*/
public AudioNormalizationSettings withLoudnessLogging(String loudnessLogging) {
setLoudnessLogging(loudnessLogging);
return this;
}
/**
* If set to LOG, log each output's audio track loudness to a CSV file.
*
* @param loudnessLogging
* If set to LOG, log each output's audio track loudness to a CSV file.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AudioNormalizationLoudnessLogging
*/
public AudioNormalizationSettings withLoudnessLogging(AudioNormalizationLoudnessLogging loudnessLogging) {
this.loudnessLogging = loudnessLogging.toString();
return this;
}
/**
* If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
*
* @param peakCalculation
* If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
* @see AudioNormalizationPeakCalculation
*/
public void setPeakCalculation(String peakCalculation) {
this.peakCalculation = peakCalculation;
}
/**
* If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
*
* @return If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
* @see AudioNormalizationPeakCalculation
*/
public String getPeakCalculation() {
return this.peakCalculation;
}
/**
* If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
*
* @param peakCalculation
* If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AudioNormalizationPeakCalculation
*/
public AudioNormalizationSettings withPeakCalculation(String peakCalculation) {
setPeakCalculation(peakCalculation);
return this;
}
/**
* If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
*
* @param peakCalculation
* If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AudioNormalizationPeakCalculation
*/
public AudioNormalizationSettings withPeakCalculation(AudioNormalizationPeakCalculation peakCalculation) {
this.peakCalculation = peakCalculation.toString();
return this;
}
/**
* When you use Audio normalization, optionally use this setting to specify a target loudness. If you don't specify
* a value here, the encoder chooses a value for you, based on the algorithm that you choose for Algorithm. If you
* choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will choose -23 LKFS.
*
* @param targetLkfs
* When you use Audio normalization, optionally use this setting to specify a target loudness. If you don't
* specify a value here, the encoder chooses a value for you, based on the algorithm that you choose for
* Algorithm. If you choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will
* choose -23 LKFS.
*/
public void setTargetLkfs(Double targetLkfs) {
this.targetLkfs = targetLkfs;
}
/**
* When you use Audio normalization, optionally use this setting to specify a target loudness. If you don't specify
* a value here, the encoder chooses a value for you, based on the algorithm that you choose for Algorithm. If you
* choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will choose -23 LKFS.
*
* @return When you use Audio normalization, optionally use this setting to specify a target loudness. If you don't
* specify a value here, the encoder chooses a value for you, based on the algorithm that you choose for
* Algorithm. If you choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will
* choose -23 LKFS.
*/
public Double getTargetLkfs() {
return this.targetLkfs;
}
/**
* When you use Audio normalization, optionally use this setting to specify a target loudness. If you don't specify
* a value here, the encoder chooses a value for you, based on the algorithm that you choose for Algorithm. If you
* choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will choose -23 LKFS.
*
* @param targetLkfs
* When you use Audio normalization, optionally use this setting to specify a target loudness. If you don't
* specify a value here, the encoder chooses a value for you, based on the algorithm that you choose for
* Algorithm. If you choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will
* choose -23 LKFS.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AudioNormalizationSettings withTargetLkfs(Double targetLkfs) {
setTargetLkfs(targetLkfs);
return this;
}
/**
* Specify the True-peak limiter threshold in decibels relative to full scale (dBFS). The peak inter-audio sample
* loudness in your output will be limited to the value that you specify, without affecting the overall target LKFS.
* Enter a value from 0 to -8. Leave blank to use the default value 0.
*
* @param truePeakLimiterThreshold
* Specify the True-peak limiter threshold in decibels relative to full scale (dBFS). The peak inter-audio
* sample loudness in your output will be limited to the value that you specify, without affecting the
* overall target LKFS. Enter a value from 0 to -8. Leave blank to use the default value 0.
*/
public void setTruePeakLimiterThreshold(Double truePeakLimiterThreshold) {
this.truePeakLimiterThreshold = truePeakLimiterThreshold;
}
/**
* Specify the True-peak limiter threshold in decibels relative to full scale (dBFS). The peak inter-audio sample
* loudness in your output will be limited to the value that you specify, without affecting the overall target LKFS.
* Enter a value from 0 to -8. Leave blank to use the default value 0.
*
* @return Specify the True-peak limiter threshold in decibels relative to full scale (dBFS). The peak inter-audio
* sample loudness in your output will be limited to the value that you specify, without affecting the
* overall target LKFS. Enter a value from 0 to -8. Leave blank to use the default value 0.
*/
public Double getTruePeakLimiterThreshold() {
return this.truePeakLimiterThreshold;
}
/**
* Specify the True-peak limiter threshold in decibels relative to full scale (dBFS). The peak inter-audio sample
* loudness in your output will be limited to the value that you specify, without affecting the overall target LKFS.
* Enter a value from 0 to -8. Leave blank to use the default value 0.
*
* @param truePeakLimiterThreshold
* Specify the True-peak limiter threshold in decibels relative to full scale (dBFS). The peak inter-audio
* sample loudness in your output will be limited to the value that you specify, without affecting the
* overall target LKFS. Enter a value from 0 to -8. Leave blank to use the default value 0.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AudioNormalizationSettings withTruePeakLimiterThreshold(Double truePeakLimiterThreshold) {
setTruePeakLimiterThreshold(truePeakLimiterThreshold);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getAlgorithm() != null)
sb.append("Algorithm: ").append(getAlgorithm()).append(",");
if (getAlgorithmControl() != null)
sb.append("AlgorithmControl: ").append(getAlgorithmControl()).append(",");
if (getCorrectionGateLevel() != null)
sb.append("CorrectionGateLevel: ").append(getCorrectionGateLevel()).append(",");
if (getLoudnessLogging() != null)
sb.append("LoudnessLogging: ").append(getLoudnessLogging()).append(",");
if (getPeakCalculation() != null)
sb.append("PeakCalculation: ").append(getPeakCalculation()).append(",");
if (getTargetLkfs() != null)
sb.append("TargetLkfs: ").append(getTargetLkfs()).append(",");
if (getTruePeakLimiterThreshold() != null)
sb.append("TruePeakLimiterThreshold: ").append(getTruePeakLimiterThreshold());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AudioNormalizationSettings == false)
return false;
AudioNormalizationSettings other = (AudioNormalizationSettings) obj;
if (other.getAlgorithm() == null ^ this.getAlgorithm() == null)
return false;
if (other.getAlgorithm() != null && other.getAlgorithm().equals(this.getAlgorithm()) == false)
return false;
if (other.getAlgorithmControl() == null ^ this.getAlgorithmControl() == null)
return false;
if (other.getAlgorithmControl() != null && other.getAlgorithmControl().equals(this.getAlgorithmControl()) == false)
return false;
if (other.getCorrectionGateLevel() == null ^ this.getCorrectionGateLevel() == null)
return false;
if (other.getCorrectionGateLevel() != null && other.getCorrectionGateLevel().equals(this.getCorrectionGateLevel()) == false)
return false;
if (other.getLoudnessLogging() == null ^ this.getLoudnessLogging() == null)
return false;
if (other.getLoudnessLogging() != null && other.getLoudnessLogging().equals(this.getLoudnessLogging()) == false)
return false;
if (other.getPeakCalculation() == null ^ this.getPeakCalculation() == null)
return false;
if (other.getPeakCalculation() != null && other.getPeakCalculation().equals(this.getPeakCalculation()) == false)
return false;
if (other.getTargetLkfs() == null ^ this.getTargetLkfs() == null)
return false;
if (other.getTargetLkfs() != null && other.getTargetLkfs().equals(this.getTargetLkfs()) == false)
return false;
if (other.getTruePeakLimiterThreshold() == null ^ this.getTruePeakLimiterThreshold() == null)
return false;
if (other.getTruePeakLimiterThreshold() != null && other.getTruePeakLimiterThreshold().equals(this.getTruePeakLimiterThreshold()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAlgorithm() == null) ? 0 : getAlgorithm().hashCode());
hashCode = prime * hashCode + ((getAlgorithmControl() == null) ? 0 : getAlgorithmControl().hashCode());
hashCode = prime * hashCode + ((getCorrectionGateLevel() == null) ? 0 : getCorrectionGateLevel().hashCode());
hashCode = prime * hashCode + ((getLoudnessLogging() == null) ? 0 : getLoudnessLogging().hashCode());
hashCode = prime * hashCode + ((getPeakCalculation() == null) ? 0 : getPeakCalculation().hashCode());
hashCode = prime * hashCode + ((getTargetLkfs() == null) ? 0 : getTargetLkfs().hashCode());
hashCode = prime * hashCode + ((getTruePeakLimiterThreshold() == null) ? 0 : getTruePeakLimiterThreshold().hashCode());
return hashCode;
}
@Override
public AudioNormalizationSettings clone() {
try {
return (AudioNormalizationSettings) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.mediaconvert.model.transform.AudioNormalizationSettingsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}