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

com.pulumi.azurenative.media.inputs.H264LayerArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.media.inputs;

import com.pulumi.azurenative.media.enums.EntropyMode;
import com.pulumi.azurenative.media.enums.H264VideoProfile;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 video codec.
 * 
 */
public final class H264LayerArgs extends com.pulumi.resources.ResourceArgs {

    public static final H264LayerArgs Empty = new H264LayerArgs();

    /**
     * Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use.
     * 
     */
    @Import(name="adaptiveBFrame")
    private @Nullable Output adaptiveBFrame;

    /**
     * @return Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use.
     * 
     */
    public Optional> adaptiveBFrame() {
        return Optional.ofNullable(this.adaptiveBFrame);
    }

    /**
     * The number of B-frames to be used when encoding this layer.  If not specified, the encoder chooses an appropriate number based on the video profile and level.
     * 
     */
    @Import(name="bFrames")
    private @Nullable Output bFrames;

    /**
     * @return The number of B-frames to be used when encoding this layer.  If not specified, the encoder chooses an appropriate number based on the video profile and level.
     * 
     */
    public Optional> bFrames() {
        return Optional.ofNullable(this.bFrames);
    }

    /**
     * The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required field.
     * 
     */
    @Import(name="bitrate", required=true)
    private Output bitrate;

    /**
     * @return The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required field.
     * 
     */
    public Output bitrate() {
        return this.bitrate;
    }

    /**
     * The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S).
     * 
     */
    @Import(name="bufferWindow")
    private @Nullable Output bufferWindow;

    /**
     * @return The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S).
     * 
     */
    public Optional> bufferWindow() {
        return Optional.ofNullable(this.bufferWindow);
    }

    /**
     * The value of CRF to be used when encoding this layer. This setting takes effect when RateControlMode of video codec is set at CRF mode. The range of CRF value is between 0 and 51, where lower values would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point quality degradation will be noticed. Default value is 23.
     * 
     */
    @Import(name="crf")
    private @Nullable Output crf;

    /**
     * @return The value of CRF to be used when encoding this layer. This setting takes effect when RateControlMode of video codec is set at CRF mode. The range of CRF value is between 0 and 51, where lower values would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point quality degradation will be noticed. Default value is 23.
     * 
     */
    public Optional> crf() {
        return Optional.ofNullable(this.crf);
    }

    /**
     * The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level.
     * 
     */
    @Import(name="entropyMode")
    private @Nullable Output> entropyMode;

    /**
     * @return The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level.
     * 
     */
    public Optional>> entropyMode() {
        return Optional.ofNullable(this.entropyMode);
    }

    /**
     * The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video.
     * 
     */
    @Import(name="frameRate")
    private @Nullable Output frameRate;

    /**
     * @return The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video.
     * 
     */
    public Optional> frameRate() {
        return Optional.ofNullable(this.frameRate);
    }

    /**
     * The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input.
     * 
     */
    @Import(name="height")
    private @Nullable Output height;

    /**
     * @return The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input.
     * 
     */
    public Optional> height() {
        return Optional.ofNullable(this.height);
    }

    /**
     * The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file.
     * 
     */
    @Import(name="label")
    private @Nullable Output label;

    /**
     * @return The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file.
     * 
     */
    public Optional> label() {
        return Optional.ofNullable(this.label);
    }

    /**
     * We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer.
     * 
     */
    @Import(name="level")
    private @Nullable Output level;

    /**
     * @return We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer.
     * 
     */
    public Optional> level() {
        return Optional.ofNullable(this.level);
    }

    /**
     * The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate.
     * 
     */
    @Import(name="maxBitrate")
    private @Nullable Output maxBitrate;

    /**
     * @return The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate.
     * 
     */
    public Optional> maxBitrate() {
        return Optional.ofNullable(this.maxBitrate);
    }

    /**
     * We currently support Baseline, Main, High, High422, High444. Default is Auto.
     * 
     */
    @Import(name="profile")
    private @Nullable Output> profile;

    /**
     * @return We currently support Baseline, Main, High, High422, High444. Default is Auto.
     * 
     */
    public Optional>> profile() {
        return Optional.ofNullable(this.profile);
    }

    /**
     * The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting.
     * 
     */
    @Import(name="referenceFrames")
    private @Nullable Output referenceFrames;

    /**
     * @return The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting.
     * 
     */
    public Optional> referenceFrames() {
        return Optional.ofNullable(this.referenceFrames);
    }

    /**
     * The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will use a single slice for each frame.
     * 
     */
    @Import(name="slices")
    private @Nullable Output slices;

    /**
     * @return The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will use a single slice for each frame.
     * 
     */
    public Optional> slices() {
        return Optional.ofNullable(this.slices);
    }

    /**
     * The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input.
     * 
     */
    @Import(name="width")
    private @Nullable Output width;

    /**
     * @return The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input.
     * 
     */
    public Optional> width() {
        return Optional.ofNullable(this.width);
    }

    private H264LayerArgs() {}

    private H264LayerArgs(H264LayerArgs $) {
        this.adaptiveBFrame = $.adaptiveBFrame;
        this.bFrames = $.bFrames;
        this.bitrate = $.bitrate;
        this.bufferWindow = $.bufferWindow;
        this.crf = $.crf;
        this.entropyMode = $.entropyMode;
        this.frameRate = $.frameRate;
        this.height = $.height;
        this.label = $.label;
        this.level = $.level;
        this.maxBitrate = $.maxBitrate;
        this.profile = $.profile;
        this.referenceFrames = $.referenceFrames;
        this.slices = $.slices;
        this.width = $.width;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(H264LayerArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private H264LayerArgs $;

        public Builder() {
            $ = new H264LayerArgs();
        }

        public Builder(H264LayerArgs defaults) {
            $ = new H264LayerArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param adaptiveBFrame Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use.
         * 
         * @return builder
         * 
         */
        public Builder adaptiveBFrame(@Nullable Output adaptiveBFrame) {
            $.adaptiveBFrame = adaptiveBFrame;
            return this;
        }

        /**
         * @param adaptiveBFrame Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use.
         * 
         * @return builder
         * 
         */
        public Builder adaptiveBFrame(Boolean adaptiveBFrame) {
            return adaptiveBFrame(Output.of(adaptiveBFrame));
        }

        /**
         * @param bFrames The number of B-frames to be used when encoding this layer.  If not specified, the encoder chooses an appropriate number based on the video profile and level.
         * 
         * @return builder
         * 
         */
        public Builder bFrames(@Nullable Output bFrames) {
            $.bFrames = bFrames;
            return this;
        }

        /**
         * @param bFrames The number of B-frames to be used when encoding this layer.  If not specified, the encoder chooses an appropriate number based on the video profile and level.
         * 
         * @return builder
         * 
         */
        public Builder bFrames(Integer bFrames) {
            return bFrames(Output.of(bFrames));
        }

        /**
         * @param bitrate The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required field.
         * 
         * @return builder
         * 
         */
        public Builder bitrate(Output bitrate) {
            $.bitrate = bitrate;
            return this;
        }

        /**
         * @param bitrate The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required field.
         * 
         * @return builder
         * 
         */
        public Builder bitrate(Integer bitrate) {
            return bitrate(Output.of(bitrate));
        }

        /**
         * @param bufferWindow The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S).
         * 
         * @return builder
         * 
         */
        public Builder bufferWindow(@Nullable Output bufferWindow) {
            $.bufferWindow = bufferWindow;
            return this;
        }

        /**
         * @param bufferWindow The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S).
         * 
         * @return builder
         * 
         */
        public Builder bufferWindow(String bufferWindow) {
            return bufferWindow(Output.of(bufferWindow));
        }

        /**
         * @param crf The value of CRF to be used when encoding this layer. This setting takes effect when RateControlMode of video codec is set at CRF mode. The range of CRF value is between 0 and 51, where lower values would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point quality degradation will be noticed. Default value is 23.
         * 
         * @return builder
         * 
         */
        public Builder crf(@Nullable Output crf) {
            $.crf = crf;
            return this;
        }

        /**
         * @param crf The value of CRF to be used when encoding this layer. This setting takes effect when RateControlMode of video codec is set at CRF mode. The range of CRF value is between 0 and 51, where lower values would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point quality degradation will be noticed. Default value is 23.
         * 
         * @return builder
         * 
         */
        public Builder crf(Double crf) {
            return crf(Output.of(crf));
        }

        /**
         * @param entropyMode The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level.
         * 
         * @return builder
         * 
         */
        public Builder entropyMode(@Nullable Output> entropyMode) {
            $.entropyMode = entropyMode;
            return this;
        }

        /**
         * @param entropyMode The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level.
         * 
         * @return builder
         * 
         */
        public Builder entropyMode(Either entropyMode) {
            return entropyMode(Output.of(entropyMode));
        }

        /**
         * @param entropyMode The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level.
         * 
         * @return builder
         * 
         */
        public Builder entropyMode(String entropyMode) {
            return entropyMode(Either.ofLeft(entropyMode));
        }

        /**
         * @param entropyMode The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level.
         * 
         * @return builder
         * 
         */
        public Builder entropyMode(EntropyMode entropyMode) {
            return entropyMode(Either.ofRight(entropyMode));
        }

        /**
         * @param frameRate The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video.
         * 
         * @return builder
         * 
         */
        public Builder frameRate(@Nullable Output frameRate) {
            $.frameRate = frameRate;
            return this;
        }

        /**
         * @param frameRate The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video.
         * 
         * @return builder
         * 
         */
        public Builder frameRate(String frameRate) {
            return frameRate(Output.of(frameRate));
        }

        /**
         * @param height The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input.
         * 
         * @return builder
         * 
         */
        public Builder height(@Nullable Output height) {
            $.height = height;
            return this;
        }

        /**
         * @param height The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input.
         * 
         * @return builder
         * 
         */
        public Builder height(String height) {
            return height(Output.of(height));
        }

        /**
         * @param label The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file.
         * 
         * @return builder
         * 
         */
        public Builder label(@Nullable Output label) {
            $.label = label;
            return this;
        }

        /**
         * @param label The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file.
         * 
         * @return builder
         * 
         */
        public Builder label(String label) {
            return label(Output.of(label));
        }

        /**
         * @param level We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer.
         * 
         * @return builder
         * 
         */
        public Builder level(@Nullable Output level) {
            $.level = level;
            return this;
        }

        /**
         * @param level We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer.
         * 
         * @return builder
         * 
         */
        public Builder level(String level) {
            return level(Output.of(level));
        }

        /**
         * @param maxBitrate The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate.
         * 
         * @return builder
         * 
         */
        public Builder maxBitrate(@Nullable Output maxBitrate) {
            $.maxBitrate = maxBitrate;
            return this;
        }

        /**
         * @param maxBitrate The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate.
         * 
         * @return builder
         * 
         */
        public Builder maxBitrate(Integer maxBitrate) {
            return maxBitrate(Output.of(maxBitrate));
        }

        /**
         * @param profile We currently support Baseline, Main, High, High422, High444. Default is Auto.
         * 
         * @return builder
         * 
         */
        public Builder profile(@Nullable Output> profile) {
            $.profile = profile;
            return this;
        }

        /**
         * @param profile We currently support Baseline, Main, High, High422, High444. Default is Auto.
         * 
         * @return builder
         * 
         */
        public Builder profile(Either profile) {
            return profile(Output.of(profile));
        }

        /**
         * @param profile We currently support Baseline, Main, High, High422, High444. Default is Auto.
         * 
         * @return builder
         * 
         */
        public Builder profile(String profile) {
            return profile(Either.ofLeft(profile));
        }

        /**
         * @param profile We currently support Baseline, Main, High, High422, High444. Default is Auto.
         * 
         * @return builder
         * 
         */
        public Builder profile(H264VideoProfile profile) {
            return profile(Either.ofRight(profile));
        }

        /**
         * @param referenceFrames The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting.
         * 
         * @return builder
         * 
         */
        public Builder referenceFrames(@Nullable Output referenceFrames) {
            $.referenceFrames = referenceFrames;
            return this;
        }

        /**
         * @param referenceFrames The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting.
         * 
         * @return builder
         * 
         */
        public Builder referenceFrames(Integer referenceFrames) {
            return referenceFrames(Output.of(referenceFrames));
        }

        /**
         * @param slices The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will use a single slice for each frame.
         * 
         * @return builder
         * 
         */
        public Builder slices(@Nullable Output slices) {
            $.slices = slices;
            return this;
        }

        /**
         * @param slices The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will use a single slice for each frame.
         * 
         * @return builder
         * 
         */
        public Builder slices(Integer slices) {
            return slices(Output.of(slices));
        }

        /**
         * @param width The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input.
         * 
         * @return builder
         * 
         */
        public Builder width(@Nullable Output width) {
            $.width = width;
            return this;
        }

        /**
         * @param width The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input.
         * 
         * @return builder
         * 
         */
        public Builder width(String width) {
            return width(Output.of(width));
        }

        public H264LayerArgs build() {
            if ($.bitrate == null) {
                throw new MissingRequiredPropertyException("H264LayerArgs", "bitrate");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy