All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.mediaconvert.model.Vp8Settings Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Elemental MediaConvert module holds the client classes that are used for communicating with AWS Elemental MediaConvert Service

There is a newer version: 2.29.15
Show newest version
/*
 * Copyright 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 software.amazon.awssdk.services.mediaconvert.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * Required when you set Codec to the value VP8.
 */
@Generated("software.amazon.awssdk:codegen")
public final class Vp8Settings implements SdkPojo, Serializable, ToCopyableBuilder {
    private static final SdkField BITRATE_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("Bitrate").getter(getter(Vp8Settings::bitrate)).setter(setter(Builder::bitrate))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("bitrate").build()).build();

    private static final SdkField FRAMERATE_CONTROL_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("FramerateControl").getter(getter(Vp8Settings::framerateControlAsString))
            .setter(setter(Builder::framerateControl))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("framerateControl").build()).build();

    private static final SdkField FRAMERATE_CONVERSION_ALGORITHM_FIELD = SdkField
            . builder(MarshallingType.STRING)
            .memberName("FramerateConversionAlgorithm")
            .getter(getter(Vp8Settings::framerateConversionAlgorithmAsString))
            .setter(setter(Builder::framerateConversionAlgorithm))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("framerateConversionAlgorithm")
                    .build()).build();

    private static final SdkField FRAMERATE_DENOMINATOR_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("FramerateDenominator").getter(getter(Vp8Settings::framerateDenominator))
            .setter(setter(Builder::framerateDenominator))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("framerateDenominator").build())
            .build();

    private static final SdkField FRAMERATE_NUMERATOR_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("FramerateNumerator").getter(getter(Vp8Settings::framerateNumerator))
            .setter(setter(Builder::framerateNumerator))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("framerateNumerator").build())
            .build();

    private static final SdkField GOP_SIZE_FIELD = SdkField. builder(MarshallingType.DOUBLE)
            .memberName("GopSize").getter(getter(Vp8Settings::gopSize)).setter(setter(Builder::gopSize))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("gopSize").build()).build();

    private static final SdkField HRD_BUFFER_SIZE_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("HrdBufferSize").getter(getter(Vp8Settings::hrdBufferSize)).setter(setter(Builder::hrdBufferSize))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("hrdBufferSize").build()).build();

    private static final SdkField MAX_BITRATE_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("MaxBitrate").getter(getter(Vp8Settings::maxBitrate)).setter(setter(Builder::maxBitrate))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("maxBitrate").build()).build();

    private static final SdkField PAR_CONTROL_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ParControl").getter(getter(Vp8Settings::parControlAsString)).setter(setter(Builder::parControl))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("parControl").build()).build();

    private static final SdkField PAR_DENOMINATOR_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("ParDenominator").getter(getter(Vp8Settings::parDenominator)).setter(setter(Builder::parDenominator))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("parDenominator").build()).build();

    private static final SdkField PAR_NUMERATOR_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("ParNumerator").getter(getter(Vp8Settings::parNumerator)).setter(setter(Builder::parNumerator))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("parNumerator").build()).build();

    private static final SdkField QUALITY_TUNING_LEVEL_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("QualityTuningLevel").getter(getter(Vp8Settings::qualityTuningLevelAsString))
            .setter(setter(Builder::qualityTuningLevel))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("qualityTuningLevel").build())
            .build();

    private static final SdkField RATE_CONTROL_MODE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("RateControlMode").getter(getter(Vp8Settings::rateControlModeAsString))
            .setter(setter(Builder::rateControlMode))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("rateControlMode").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BITRATE_FIELD,
            FRAMERATE_CONTROL_FIELD, FRAMERATE_CONVERSION_ALGORITHM_FIELD, FRAMERATE_DENOMINATOR_FIELD,
            FRAMERATE_NUMERATOR_FIELD, GOP_SIZE_FIELD, HRD_BUFFER_SIZE_FIELD, MAX_BITRATE_FIELD, PAR_CONTROL_FIELD,
            PAR_DENOMINATOR_FIELD, PAR_NUMERATOR_FIELD, QUALITY_TUNING_LEVEL_FIELD, RATE_CONTROL_MODE_FIELD));

    private static final long serialVersionUID = 1L;

    private final Integer bitrate;

    private final String framerateControl;

    private final String framerateConversionAlgorithm;

    private final Integer framerateDenominator;

    private final Integer framerateNumerator;

    private final Double gopSize;

    private final Integer hrdBufferSize;

    private final Integer maxBitrate;

    private final String parControl;

    private final Integer parDenominator;

    private final Integer parNumerator;

    private final String qualityTuningLevel;

    private final String rateControlMode;

    private Vp8Settings(BuilderImpl builder) {
        this.bitrate = builder.bitrate;
        this.framerateControl = builder.framerateControl;
        this.framerateConversionAlgorithm = builder.framerateConversionAlgorithm;
        this.framerateDenominator = builder.framerateDenominator;
        this.framerateNumerator = builder.framerateNumerator;
        this.gopSize = builder.gopSize;
        this.hrdBufferSize = builder.hrdBufferSize;
        this.maxBitrate = builder.maxBitrate;
        this.parControl = builder.parControl;
        this.parDenominator = builder.parDenominator;
        this.parNumerator = builder.parNumerator;
        this.qualityTuningLevel = builder.qualityTuningLevel;
        this.rateControlMode = builder.rateControlMode;
    }

    /**
     * Target bitrate in bits/second. For example, enter five megabits per second as 5000000.
     * 
     * @return Target bitrate in bits/second. For example, enter five megabits per second as 5000000.
     */
    public final Integer bitrate() {
        return bitrate;
    }

    /**
     * If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to
     * keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion,
     * choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are
     * decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction.
     * 

* If the service returns an enum value that is not available in the current SDK version, {@link #framerateControl} * will return {@link Vp8FramerateControl#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #framerateControlAsString}. *

* * @return If you are using the console, use the Framerate setting to specify the frame rate for this output. If you * want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate * conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the * dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a * fraction. * @see Vp8FramerateControl */ public final Vp8FramerateControl framerateControl() { return Vp8FramerateControl.fromValue(framerateControl); } /** * If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to * keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, * choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are * decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. *

* If the service returns an enum value that is not available in the current SDK version, {@link #framerateControl} * will return {@link Vp8FramerateControl#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #framerateControlAsString}. *

* * @return If you are using the console, use the Framerate setting to specify the frame rate for this output. If you * want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate * conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the * dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a * fraction. * @see Vp8FramerateControl */ public final String framerateControlAsString() { return framerateControl; } /** * Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For numerically * simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default value, Drop duplicate. For * numerically complex conversions, to avoid stutter: Choose Interpolate. This results in a smooth picture, but * might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video * has already been converted from its original cadence: Choose FrameFormer to do motion-compensated interpolation. * FrameFormer uses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding * time and incurs a significant add-on cost. When you choose FrameFormer, your input video resolution must be at * least 128x96. *

* If the service returns an enum value that is not available in the current SDK version, * {@link #framerateConversionAlgorithm} will return {@link Vp8FramerateConversionAlgorithm#UNKNOWN_TO_SDK_VERSION}. * The raw value returned by the service is available from {@link #framerateConversionAlgorithmAsString}. *

* * @return Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For * numerically simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default value, * Drop duplicate. For numerically complex conversions, to avoid stutter: Choose Interpolate. This results * in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, * especially if your source video has already been converted from its original cadence: Choose FrameFormer * to do motion-compensated interpolation. FrameFormer uses the best conversion method frame by frame. Note * that using FrameFormer increases the transcoding time and incurs a significant add-on cost. When you * choose FrameFormer, your input video resolution must be at least 128x96. * @see Vp8FramerateConversionAlgorithm */ public final Vp8FramerateConversionAlgorithm framerateConversionAlgorithm() { return Vp8FramerateConversionAlgorithm.fromValue(framerateConversionAlgorithm); } /** * Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For numerically * simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default value, Drop duplicate. For * numerically complex conversions, to avoid stutter: Choose Interpolate. This results in a smooth picture, but * might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video * has already been converted from its original cadence: Choose FrameFormer to do motion-compensated interpolation. * FrameFormer uses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding * time and incurs a significant add-on cost. When you choose FrameFormer, your input video resolution must be at * least 128x96. *

* If the service returns an enum value that is not available in the current SDK version, * {@link #framerateConversionAlgorithm} will return {@link Vp8FramerateConversionAlgorithm#UNKNOWN_TO_SDK_VERSION}. * The raw value returned by the service is available from {@link #framerateConversionAlgorithmAsString}. *

* * @return Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For * numerically simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default value, * Drop duplicate. For numerically complex conversions, to avoid stutter: Choose Interpolate. This results * in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, * especially if your source video has already been converted from its original cadence: Choose FrameFormer * to do motion-compensated interpolation. FrameFormer uses the best conversion method frame by frame. Note * that using FrameFormer increases the transcoding time and incurs a significant add-on cost. When you * choose FrameFormer, your input video resolution must be at least 128x96. * @see Vp8FramerateConversionAlgorithm */ public final String framerateConversionAlgorithmAsString() { return framerateConversionAlgorithm; } /** * When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For * example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this * example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use * frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976. * * @return When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a * fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of * this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console * for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. * In this example, specify 23.976. */ public final Integer framerateDenominator() { return framerateDenominator; } /** * When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For * example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this * example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use * frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976. * * @return When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a * fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this * fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for * transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In * this example, specify 23.976. */ public final Integer framerateNumerator() { return framerateNumerator; } /** * GOP Length (keyframe interval) in frames. Must be greater than zero. * * @return GOP Length (keyframe interval) in frames. Must be greater than zero. */ public final Double gopSize() { return gopSize; } /** * Optional. Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000. * * @return Optional. Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000. */ public final Integer hrdBufferSize() { return hrdBufferSize; } /** * Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum bitrate in * bits/second. For example, enter five megabits per second as 5000000. The default behavior uses twice the target * bitrate as the maximum bitrate. * * @return Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum * bitrate in bits/second. For example, enter five megabits per second as 5000000. The default behavior uses * twice the target bitrate as the maximum bitrate. */ public final Integer maxBitrate() { return maxBitrate; } /** * Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, * Follow source, uses the PAR from your input video for your output. To specify a different PAR in the console, * choose any value other than Follow source. When you choose SPECIFIED for this setting, you must also specify * values for the parNumerator and parDenominator settings. *

* If the service returns an enum value that is not available in the current SDK version, {@link #parControl} will * return {@link Vp8ParControl#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #parControlAsString}. *

* * @return Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default * behavior, Follow source, uses the PAR from your input video for your output. To specify a different PAR * in the console, choose any value other than Follow source. When you choose SPECIFIED for this setting, * you must also specify values for the parNumerator and parDenominator settings. * @see Vp8ParControl */ public final Vp8ParControl parControl() { return Vp8ParControl.fromValue(parControl); } /** * Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, * Follow source, uses the PAR from your input video for your output. To specify a different PAR in the console, * choose any value other than Follow source. When you choose SPECIFIED for this setting, you must also specify * values for the parNumerator and parDenominator settings. *

* If the service returns an enum value that is not available in the current SDK version, {@link #parControl} will * return {@link Vp8ParControl#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #parControlAsString}. *

* * @return Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default * behavior, Follow source, uses the PAR from your input video for your output. To specify a different PAR * in the console, choose any value other than Follow source. When you choose SPECIFIED for this setting, * you must also specify values for the parNumerator and parDenominator settings. * @see Vp8ParControl */ public final String parControlAsString() { return parControl; } /** * Required when you set Pixel aspect ratio to SPECIFIED. On the console, this corresponds to any value other than * Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, * provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In * this example, the value for parDenominator is 33. * * @return Required when you set Pixel aspect ratio to SPECIFIED. On the console, this corresponds to any value * other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your * input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would * specify the ratio 40:33. In this example, the value for parDenominator is 33. */ public final Integer parDenominator() { return parDenominator; } /** * Required when you set Pixel aspect ratio to SPECIFIED. On the console, this corresponds to any value other than * Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, * provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In * this example, the value for parNumerator is 40. * * @return Required when you set Pixel aspect ratio to SPECIFIED. On the console, this corresponds to any value * other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your * input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would * specify the ratio 40:33. In this example, the value for parNumerator is 40. */ public final Integer parNumerator() { return parNumerator; } /** * Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video quality. * The default behavior is faster, lower quality, multi-pass encoding. *

* If the service returns an enum value that is not available in the current SDK version, * {@link #qualityTuningLevel} will return {@link Vp8QualityTuningLevel#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #qualityTuningLevelAsString}. *

* * @return Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video * quality. The default behavior is faster, lower quality, multi-pass encoding. * @see Vp8QualityTuningLevel */ public final Vp8QualityTuningLevel qualityTuningLevel() { return Vp8QualityTuningLevel.fromValue(qualityTuningLevel); } /** * Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video quality. * The default behavior is faster, lower quality, multi-pass encoding. *

* If the service returns an enum value that is not available in the current SDK version, * {@link #qualityTuningLevel} will return {@link Vp8QualityTuningLevel#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #qualityTuningLevelAsString}. *

* * @return Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video * quality. The default behavior is faster, lower quality, multi-pass encoding. * @see Vp8QualityTuningLevel */ public final String qualityTuningLevelAsString() { return qualityTuningLevel; } /** * With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode. *

* If the service returns an enum value that is not available in the current SDK version, {@link #rateControlMode} * will return {@link Vp8RateControlMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #rateControlModeAsString}. *

* * @return With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode. * @see Vp8RateControlMode */ public final Vp8RateControlMode rateControlMode() { return Vp8RateControlMode.fromValue(rateControlMode); } /** * With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode. *

* If the service returns an enum value that is not available in the current SDK version, {@link #rateControlMode} * will return {@link Vp8RateControlMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #rateControlModeAsString}. *

* * @return With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode. * @see Vp8RateControlMode */ public final String rateControlModeAsString() { return rateControlMode; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(bitrate()); hashCode = 31 * hashCode + Objects.hashCode(framerateControlAsString()); hashCode = 31 * hashCode + Objects.hashCode(framerateConversionAlgorithmAsString()); hashCode = 31 * hashCode + Objects.hashCode(framerateDenominator()); hashCode = 31 * hashCode + Objects.hashCode(framerateNumerator()); hashCode = 31 * hashCode + Objects.hashCode(gopSize()); hashCode = 31 * hashCode + Objects.hashCode(hrdBufferSize()); hashCode = 31 * hashCode + Objects.hashCode(maxBitrate()); hashCode = 31 * hashCode + Objects.hashCode(parControlAsString()); hashCode = 31 * hashCode + Objects.hashCode(parDenominator()); hashCode = 31 * hashCode + Objects.hashCode(parNumerator()); hashCode = 31 * hashCode + Objects.hashCode(qualityTuningLevelAsString()); hashCode = 31 * hashCode + Objects.hashCode(rateControlModeAsString()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Vp8Settings)) { return false; } Vp8Settings other = (Vp8Settings) obj; return Objects.equals(bitrate(), other.bitrate()) && Objects.equals(framerateControlAsString(), other.framerateControlAsString()) && Objects.equals(framerateConversionAlgorithmAsString(), other.framerateConversionAlgorithmAsString()) && Objects.equals(framerateDenominator(), other.framerateDenominator()) && Objects.equals(framerateNumerator(), other.framerateNumerator()) && Objects.equals(gopSize(), other.gopSize()) && Objects.equals(hrdBufferSize(), other.hrdBufferSize()) && Objects.equals(maxBitrate(), other.maxBitrate()) && Objects.equals(parControlAsString(), other.parControlAsString()) && Objects.equals(parDenominator(), other.parDenominator()) && Objects.equals(parNumerator(), other.parNumerator()) && Objects.equals(qualityTuningLevelAsString(), other.qualityTuningLevelAsString()) && Objects.equals(rateControlModeAsString(), other.rateControlModeAsString()); } /** * 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. */ @Override public final String toString() { return ToString.builder("Vp8Settings").add("Bitrate", bitrate()).add("FramerateControl", framerateControlAsString()) .add("FramerateConversionAlgorithm", framerateConversionAlgorithmAsString()) .add("FramerateDenominator", framerateDenominator()).add("FramerateNumerator", framerateNumerator()) .add("GopSize", gopSize()).add("HrdBufferSize", hrdBufferSize()).add("MaxBitrate", maxBitrate()) .add("ParControl", parControlAsString()).add("ParDenominator", parDenominator()) .add("ParNumerator", parNumerator()).add("QualityTuningLevel", qualityTuningLevelAsString()) .add("RateControlMode", rateControlModeAsString()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Bitrate": return Optional.ofNullable(clazz.cast(bitrate())); case "FramerateControl": return Optional.ofNullable(clazz.cast(framerateControlAsString())); case "FramerateConversionAlgorithm": return Optional.ofNullable(clazz.cast(framerateConversionAlgorithmAsString())); case "FramerateDenominator": return Optional.ofNullable(clazz.cast(framerateDenominator())); case "FramerateNumerator": return Optional.ofNullable(clazz.cast(framerateNumerator())); case "GopSize": return Optional.ofNullable(clazz.cast(gopSize())); case "HrdBufferSize": return Optional.ofNullable(clazz.cast(hrdBufferSize())); case "MaxBitrate": return Optional.ofNullable(clazz.cast(maxBitrate())); case "ParControl": return Optional.ofNullable(clazz.cast(parControlAsString())); case "ParDenominator": return Optional.ofNullable(clazz.cast(parDenominator())); case "ParNumerator": return Optional.ofNullable(clazz.cast(parNumerator())); case "QualityTuningLevel": return Optional.ofNullable(clazz.cast(qualityTuningLevelAsString())); case "RateControlMode": return Optional.ofNullable(clazz.cast(rateControlModeAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Vp8Settings) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** * Target bitrate in bits/second. For example, enter five megabits per second as 5000000. * * @param bitrate * Target bitrate in bits/second. For example, enter five megabits per second as 5000000. * @return Returns a reference to this object so that method calls can be chained together. */ Builder bitrate(Integer bitrate); /** * If you are using the console, use the Framerate setting to specify the frame rate for this output. If you * want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate * conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown * list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. * * @param framerateControl * If you are using the console, use the Framerate setting to specify the frame rate for this output. If * you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame * rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in * the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame * rate as a fraction. * @see Vp8FramerateControl * @return Returns a reference to this object so that method calls can be chained together. * @see Vp8FramerateControl */ Builder framerateControl(String framerateControl); /** * If you are using the console, use the Framerate setting to specify the frame rate for this output. If you * want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate * conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown * list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. * * @param framerateControl * If you are using the console, use the Framerate setting to specify the frame rate for this output. If * you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame * rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in * the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame * rate as a fraction. * @see Vp8FramerateControl * @return Returns a reference to this object so that method calls can be chained together. * @see Vp8FramerateControl */ Builder framerateControl(Vp8FramerateControl framerateControl); /** * Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For * numerically simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default value, Drop * duplicate. For numerically complex conversions, to avoid stutter: Choose Interpolate. This results in a * smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, * especially if your source video has already been converted from its original cadence: Choose FrameFormer to * do motion-compensated interpolation. FrameFormer uses the best conversion method frame by frame. Note that * using FrameFormer increases the transcoding time and incurs a significant add-on cost. When you choose * FrameFormer, your input video resolution must be at least 128x96. * * @param framerateConversionAlgorithm * Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For * numerically simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default * value, Drop duplicate. For numerically complex conversions, to avoid stutter: Choose Interpolate. This * results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate * conversions, especially if your source video has already been converted from its original cadence: * Choose FrameFormer to do motion-compensated interpolation. FrameFormer uses the best conversion method * frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant * add-on cost. When you choose FrameFormer, your input video resolution must be at least 128x96. * @see Vp8FramerateConversionAlgorithm * @return Returns a reference to this object so that method calls can be chained together. * @see Vp8FramerateConversionAlgorithm */ Builder framerateConversionAlgorithm(String framerateConversionAlgorithm); /** * Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For * numerically simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default value, Drop * duplicate. For numerically complex conversions, to avoid stutter: Choose Interpolate. This results in a * smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, * especially if your source video has already been converted from its original cadence: Choose FrameFormer to * do motion-compensated interpolation. FrameFormer uses the best conversion method frame by frame. Note that * using FrameFormer increases the transcoding time and incurs a significant add-on cost. When you choose * FrameFormer, your input video resolution must be at least 128x96. * * @param framerateConversionAlgorithm * Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For * numerically simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default * value, Drop duplicate. For numerically complex conversions, to avoid stutter: Choose Interpolate. This * results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate * conversions, especially if your source video has already been converted from its original cadence: * Choose FrameFormer to do motion-compensated interpolation. FrameFormer uses the best conversion method * frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant * add-on cost. When you choose FrameFormer, your input video resolution must be at least 128x96. * @see Vp8FramerateConversionAlgorithm * @return Returns a reference to this object so that method calls can be chained together. * @see Vp8FramerateConversionAlgorithm */ Builder framerateConversionAlgorithm(Vp8FramerateConversionAlgorithm framerateConversionAlgorithm); /** * When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. * For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. * In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs * that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify * 23.976. * * @param framerateDenominator * When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a * fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator * of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the * console for transcode jobs that use frame rate conversion, provide the value as a decimal number for * Framerate. In this example, specify 23.976. * @return Returns a reference to this object so that method calls can be chained together. */ Builder framerateDenominator(Integer framerateDenominator); /** * When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. * For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In * this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that * use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify * 23.976. * * @param framerateNumerator * When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a * fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of * this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the * console for transcode jobs that use frame rate conversion, provide the value as a decimal number for * Framerate. In this example, specify 23.976. * @return Returns a reference to this object so that method calls can be chained together. */ Builder framerateNumerator(Integer framerateNumerator); /** * GOP Length (keyframe interval) in frames. Must be greater than zero. * * @param gopSize * GOP Length (keyframe interval) in frames. Must be greater than zero. * @return Returns a reference to this object so that method calls can be chained together. */ Builder gopSize(Double gopSize); /** * Optional. Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000. * * @param hrdBufferSize * Optional. Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000. * @return Returns a reference to this object so that method calls can be chained together. */ Builder hrdBufferSize(Integer hrdBufferSize); /** * Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum bitrate in * bits/second. For example, enter five megabits per second as 5000000. The default behavior uses twice the * target bitrate as the maximum bitrate. * * @param maxBitrate * Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum * bitrate in bits/second. For example, enter five megabits per second as 5000000. The default behavior * uses twice the target bitrate as the maximum bitrate. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maxBitrate(Integer maxBitrate); /** * Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default * behavior, Follow source, uses the PAR from your input video for your output. To specify a different PAR in * the console, choose any value other than Follow source. When you choose SPECIFIED for this setting, you must * also specify values for the parNumerator and parDenominator settings. * * @param parControl * Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default * behavior, Follow source, uses the PAR from your input video for your output. To specify a different * PAR in the console, choose any value other than Follow source. When you choose SPECIFIED for this * setting, you must also specify values for the parNumerator and parDenominator settings. * @see Vp8ParControl * @return Returns a reference to this object so that method calls can be chained together. * @see Vp8ParControl */ Builder parControl(String parControl); /** * Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default * behavior, Follow source, uses the PAR from your input video for your output. To specify a different PAR in * the console, choose any value other than Follow source. When you choose SPECIFIED for this setting, you must * also specify values for the parNumerator and parDenominator settings. * * @param parControl * Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default * behavior, Follow source, uses the PAR from your input video for your output. To specify a different * PAR in the console, choose any value other than Follow source. When you choose SPECIFIED for this * setting, you must also specify values for the parNumerator and parDenominator settings. * @see Vp8ParControl * @return Returns a reference to this object so that method calls can be chained together. * @see Vp8ParControl */ Builder parControl(Vp8ParControl parControl); /** * Required when you set Pixel aspect ratio to SPECIFIED. On the console, this corresponds to any value other * than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input * video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the * ratio 40:33. In this example, the value for parDenominator is 33. * * @param parDenominator * Required when you set Pixel aspect ratio to SPECIFIED. On the console, this corresponds to any value * other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from * your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you * would specify the ratio 40:33. In this example, the value for parDenominator is 33. * @return Returns a reference to this object so that method calls can be chained together. */ Builder parDenominator(Integer parDenominator); /** * Required when you set Pixel aspect ratio to SPECIFIED. On the console, this corresponds to any value other * than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input * video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the * ratio 40:33. In this example, the value for parNumerator is 40. * * @param parNumerator * Required when you set Pixel aspect ratio to SPECIFIED. On the console, this corresponds to any value * other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from * your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you * would specify the ratio 40:33. In this example, the value for parNumerator is 40. * @return Returns a reference to this object so that method calls can be chained together. */ Builder parNumerator(Integer parNumerator); /** * Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video * quality. The default behavior is faster, lower quality, multi-pass encoding. * * @param qualityTuningLevel * Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video * quality. The default behavior is faster, lower quality, multi-pass encoding. * @see Vp8QualityTuningLevel * @return Returns a reference to this object so that method calls can be chained together. * @see Vp8QualityTuningLevel */ Builder qualityTuningLevel(String qualityTuningLevel); /** * Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video * quality. The default behavior is faster, lower quality, multi-pass encoding. * * @param qualityTuningLevel * Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video * quality. The default behavior is faster, lower quality, multi-pass encoding. * @see Vp8QualityTuningLevel * @return Returns a reference to this object so that method calls can be chained together. * @see Vp8QualityTuningLevel */ Builder qualityTuningLevel(Vp8QualityTuningLevel qualityTuningLevel); /** * With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode. * * @param rateControlMode * With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode. * @see Vp8RateControlMode * @return Returns a reference to this object so that method calls can be chained together. * @see Vp8RateControlMode */ Builder rateControlMode(String rateControlMode); /** * With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode. * * @param rateControlMode * With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode. * @see Vp8RateControlMode * @return Returns a reference to this object so that method calls can be chained together. * @see Vp8RateControlMode */ Builder rateControlMode(Vp8RateControlMode rateControlMode); } static final class BuilderImpl implements Builder { private Integer bitrate; private String framerateControl; private String framerateConversionAlgorithm; private Integer framerateDenominator; private Integer framerateNumerator; private Double gopSize; private Integer hrdBufferSize; private Integer maxBitrate; private String parControl; private Integer parDenominator; private Integer parNumerator; private String qualityTuningLevel; private String rateControlMode; private BuilderImpl() { } private BuilderImpl(Vp8Settings model) { bitrate(model.bitrate); framerateControl(model.framerateControl); framerateConversionAlgorithm(model.framerateConversionAlgorithm); framerateDenominator(model.framerateDenominator); framerateNumerator(model.framerateNumerator); gopSize(model.gopSize); hrdBufferSize(model.hrdBufferSize); maxBitrate(model.maxBitrate); parControl(model.parControl); parDenominator(model.parDenominator); parNumerator(model.parNumerator); qualityTuningLevel(model.qualityTuningLevel); rateControlMode(model.rateControlMode); } public final Integer getBitrate() { return bitrate; } public final void setBitrate(Integer bitrate) { this.bitrate = bitrate; } @Override public final Builder bitrate(Integer bitrate) { this.bitrate = bitrate; return this; } public final String getFramerateControl() { return framerateControl; } public final void setFramerateControl(String framerateControl) { this.framerateControl = framerateControl; } @Override public final Builder framerateControl(String framerateControl) { this.framerateControl = framerateControl; return this; } @Override public final Builder framerateControl(Vp8FramerateControl framerateControl) { this.framerateControl(framerateControl == null ? null : framerateControl.toString()); return this; } public final String getFramerateConversionAlgorithm() { return framerateConversionAlgorithm; } public final void setFramerateConversionAlgorithm(String framerateConversionAlgorithm) { this.framerateConversionAlgorithm = framerateConversionAlgorithm; } @Override public final Builder framerateConversionAlgorithm(String framerateConversionAlgorithm) { this.framerateConversionAlgorithm = framerateConversionAlgorithm; return this; } @Override public final Builder framerateConversionAlgorithm(Vp8FramerateConversionAlgorithm framerateConversionAlgorithm) { this.framerateConversionAlgorithm(framerateConversionAlgorithm == null ? null : framerateConversionAlgorithm .toString()); return this; } public final Integer getFramerateDenominator() { return framerateDenominator; } public final void setFramerateDenominator(Integer framerateDenominator) { this.framerateDenominator = framerateDenominator; } @Override public final Builder framerateDenominator(Integer framerateDenominator) { this.framerateDenominator = framerateDenominator; return this; } public final Integer getFramerateNumerator() { return framerateNumerator; } public final void setFramerateNumerator(Integer framerateNumerator) { this.framerateNumerator = framerateNumerator; } @Override public final Builder framerateNumerator(Integer framerateNumerator) { this.framerateNumerator = framerateNumerator; return this; } public final Double getGopSize() { return gopSize; } public final void setGopSize(Double gopSize) { this.gopSize = gopSize; } @Override public final Builder gopSize(Double gopSize) { this.gopSize = gopSize; return this; } public final Integer getHrdBufferSize() { return hrdBufferSize; } public final void setHrdBufferSize(Integer hrdBufferSize) { this.hrdBufferSize = hrdBufferSize; } @Override public final Builder hrdBufferSize(Integer hrdBufferSize) { this.hrdBufferSize = hrdBufferSize; return this; } public final Integer getMaxBitrate() { return maxBitrate; } public final void setMaxBitrate(Integer maxBitrate) { this.maxBitrate = maxBitrate; } @Override public final Builder maxBitrate(Integer maxBitrate) { this.maxBitrate = maxBitrate; return this; } public final String getParControl() { return parControl; } public final void setParControl(String parControl) { this.parControl = parControl; } @Override public final Builder parControl(String parControl) { this.parControl = parControl; return this; } @Override public final Builder parControl(Vp8ParControl parControl) { this.parControl(parControl == null ? null : parControl.toString()); return this; } public final Integer getParDenominator() { return parDenominator; } public final void setParDenominator(Integer parDenominator) { this.parDenominator = parDenominator; } @Override public final Builder parDenominator(Integer parDenominator) { this.parDenominator = parDenominator; return this; } public final Integer getParNumerator() { return parNumerator; } public final void setParNumerator(Integer parNumerator) { this.parNumerator = parNumerator; } @Override public final Builder parNumerator(Integer parNumerator) { this.parNumerator = parNumerator; return this; } public final String getQualityTuningLevel() { return qualityTuningLevel; } public final void setQualityTuningLevel(String qualityTuningLevel) { this.qualityTuningLevel = qualityTuningLevel; } @Override public final Builder qualityTuningLevel(String qualityTuningLevel) { this.qualityTuningLevel = qualityTuningLevel; return this; } @Override public final Builder qualityTuningLevel(Vp8QualityTuningLevel qualityTuningLevel) { this.qualityTuningLevel(qualityTuningLevel == null ? null : qualityTuningLevel.toString()); return this; } public final String getRateControlMode() { return rateControlMode; } public final void setRateControlMode(String rateControlMode) { this.rateControlMode = rateControlMode; } @Override public final Builder rateControlMode(String rateControlMode) { this.rateControlMode = rateControlMode; return this; } @Override public final Builder rateControlMode(Vp8RateControlMode rateControlMode) { this.rateControlMode(rateControlMode == null ? null : rateControlMode.toString()); return this; } @Override public Vp8Settings build() { return new Vp8Settings(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy