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

commonMain.aws.sdk.kotlin.services.medialive.model.H265Settings.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.medialive.model



/**
 * H265 Settings
 */
public class H265Settings private constructor(builder: Builder) {
    /**
     * Adaptive quantization. Allows intra-frame quantizers to vary to improve visual quality.
     */
    public val adaptiveQuantization: aws.sdk.kotlin.services.medialive.model.H265AdaptiveQuantization? = builder.adaptiveQuantization
    /**
     * Indicates that AFD values will be written into the output stream. If afdSignaling is "auto", the system will try to preserve the input AFD value (in cases where multiple AFD values are valid). If set to "fixed", the AFD value will be the value configured in the fixedAfd parameter.
     */
    public val afdSignaling: aws.sdk.kotlin.services.medialive.model.AfdSignaling? = builder.afdSignaling
    /**
     * Whether or not EML should insert an Alternative Transfer Function SEI message to support backwards compatibility with non-HDR decoders and displays.
     */
    public val alternativeTransferFunction: aws.sdk.kotlin.services.medialive.model.H265AlternativeTransferFunction? = builder.alternativeTransferFunction
    /**
     * Average bitrate in bits/second. Required when the rate control mode is VBR or CBR. Not used for QVBR. In an MS Smooth output group, each output must have a unique value when its bitrate is rounded down to the nearest multiple of 1000.
     */
    public val bitrate: kotlin.Int = builder.bitrate
    /**
     * Size of buffer (HRD buffer model) in bits.
     */
    public val bufSize: kotlin.Int = builder.bufSize
    /**
     * Includes colorspace metadata in the output.
     */
    public val colorMetadata: aws.sdk.kotlin.services.medialive.model.H265ColorMetadata? = builder.colorMetadata
    /**
     * Color Space settings
     */
    public val colorSpaceSettings: aws.sdk.kotlin.services.medialive.model.H265ColorSpaceSettings? = builder.colorSpaceSettings
    /**
     * Optional filters that you can apply to an encode.
     */
    public val filterSettings: aws.sdk.kotlin.services.medialive.model.H265FilterSettings? = builder.filterSettings
    /**
     * Four bit AFD value to write on all frames of video in the output stream. Only valid when afdSignaling is set to 'Fixed'.
     */
    public val fixedAfd: aws.sdk.kotlin.services.medialive.model.FixedAfd? = builder.fixedAfd
    /**
     * If set to enabled, adjust quantization within each frame to reduce flicker or 'pop' on I-frames.
     */
    public val flickerAq: aws.sdk.kotlin.services.medialive.model.H265FlickerAq? = builder.flickerAq
    /**
     * Framerate denominator.
     */
    public val framerateDenominator: kotlin.Int = builder.framerateDenominator
    /**
     * Framerate numerator - framerate is a fraction, e.g. 24000 / 1001 = 23.976 fps.
     */
    public val framerateNumerator: kotlin.Int = builder.framerateNumerator
    /**
     * Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.
     */
    public val gopClosedCadence: kotlin.Int = builder.gopClosedCadence
    /**
     * GOP size (keyframe interval) in units of either frames or seconds per gopSizeUnits. If gopSizeUnits is frames, gopSize must be an integer and must be greater than or equal to 1. If gopSizeUnits is seconds, gopSize must be greater than 0, but need not be an integer.
     */
    public val gopSize: kotlin.Double = builder.gopSize
    /**
     * Indicates if the gopSize is specified in frames or seconds. If seconds the system will convert the gopSize into a frame count at run time.
     */
    public val gopSizeUnits: aws.sdk.kotlin.services.medialive.model.H265GopSizeUnits? = builder.gopSizeUnits
    /**
     * H.265 Level.
     */
    public val level: aws.sdk.kotlin.services.medialive.model.H265Level? = builder.level
    /**
     * Amount of lookahead. A value of low can decrease latency and memory usage, while high can produce better quality for certain content.
     */
    public val lookAheadRateControl: aws.sdk.kotlin.services.medialive.model.H265LookAheadRateControl? = builder.lookAheadRateControl
    /**
     * For QVBR: See the tooltip for Quality level
     */
    public val maxBitrate: kotlin.Int = builder.maxBitrate
    /**
     * Only meaningful if sceneChangeDetect is set to enabled. Defaults to 5 if multiplex rate control is used. Enforces separation between repeated (cadence) I-frames and I-frames inserted by Scene Change Detection. If a scene change I-frame is within I-interval frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene change I-frame. GOP stretch requires enabling lookahead as well as setting I-interval. The normal cadence resumes for the next GOP. Note: Maximum GOP stretch = GOP size + Min-I-interval - 1
     */
    public val minIInterval: kotlin.Int = builder.minIInterval
    /**
     * Pixel Aspect Ratio denominator.
     */
    public val parDenominator: kotlin.Int = builder.parDenominator
    /**
     * Pixel Aspect Ratio numerator.
     */
    public val parNumerator: kotlin.Int = builder.parNumerator
    /**
     * H.265 Profile.
     */
    public val profile: aws.sdk.kotlin.services.medialive.model.H265Profile? = builder.profile
    /**
     * Controls the target quality for the video encode. Applies only when the rate control mode is QVBR. Set values for the QVBR quality level field and Max bitrate field that suit your most important viewing devices. Recommended values are: - Primary screen: Quality level: 8 to 10. Max bitrate: 4M - PC or tablet: Quality level: 7. Max bitrate: 1.5M to 3M - Smartphone: Quality level: 6. Max bitrate: 1M to 1.5M
     */
    public val qvbrQualityLevel: kotlin.Int = builder.qvbrQualityLevel
    /**
     * Rate control mode. QVBR: Quality will match the specified quality level except when it is constrained by the maximum bitrate. Recommended if you or your viewers pay for bandwidth. CBR: Quality varies, depending on the video complexity. Recommended only if you distribute your assets to devices that cannot handle variable bitrates. Multiplex: This rate control mode is only supported (and is required) when the video is being delivered to a MediaLive Multiplex in which case the rate control configuration is controlled by the properties within the Multiplex Program.
     */
    public val rateControlMode: aws.sdk.kotlin.services.medialive.model.H265RateControlMode? = builder.rateControlMode
    /**
     * Sets the scan type of the output to progressive or top-field-first interlaced.
     */
    public val scanType: aws.sdk.kotlin.services.medialive.model.H265ScanType? = builder.scanType
    /**
     * Scene change detection.
     */
    public val sceneChangeDetect: aws.sdk.kotlin.services.medialive.model.H265SceneChangeDetect? = builder.sceneChangeDetect
    /**
     * Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures. This field is optional; when no value is specified the encoder will choose the number of slices based on encode resolution.
     */
    public val slices: kotlin.Int = builder.slices
    /**
     * H.265 Tier.
     */
    public val tier: aws.sdk.kotlin.services.medialive.model.H265Tier? = builder.tier
    /**
     * Timecode burn-in settings
     */
    public val timecodeBurninSettings: aws.sdk.kotlin.services.medialive.model.TimecodeBurninSettings? = builder.timecodeBurninSettings
    /**
     * Determines how timecodes should be inserted into the video elementary stream. - 'disabled': Do not include timecodes - 'picTimingSei': Pass through picture timing SEI messages from the source specified in Timecode Config
     */
    public val timecodeInsertion: aws.sdk.kotlin.services.medialive.model.H265TimecodeInsertionBehavior? = builder.timecodeInsertion

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.medialive.model.H265Settings = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("H265Settings(")
        append("adaptiveQuantization=$adaptiveQuantization,")
        append("afdSignaling=$afdSignaling,")
        append("alternativeTransferFunction=$alternativeTransferFunction,")
        append("bitrate=$bitrate,")
        append("bufSize=$bufSize,")
        append("colorMetadata=$colorMetadata,")
        append("colorSpaceSettings=$colorSpaceSettings,")
        append("filterSettings=$filterSettings,")
        append("fixedAfd=$fixedAfd,")
        append("flickerAq=$flickerAq,")
        append("framerateDenominator=$framerateDenominator,")
        append("framerateNumerator=$framerateNumerator,")
        append("gopClosedCadence=$gopClosedCadence,")
        append("gopSize=$gopSize,")
        append("gopSizeUnits=$gopSizeUnits,")
        append("level=$level,")
        append("lookAheadRateControl=$lookAheadRateControl,")
        append("maxBitrate=$maxBitrate,")
        append("minIInterval=$minIInterval,")
        append("parDenominator=$parDenominator,")
        append("parNumerator=$parNumerator,")
        append("profile=$profile,")
        append("qvbrQualityLevel=$qvbrQualityLevel,")
        append("rateControlMode=$rateControlMode,")
        append("scanType=$scanType,")
        append("sceneChangeDetect=$sceneChangeDetect,")
        append("slices=$slices,")
        append("tier=$tier,")
        append("timecodeBurninSettings=$timecodeBurninSettings,")
        append("timecodeInsertion=$timecodeInsertion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = adaptiveQuantization?.hashCode() ?: 0
        result = 31 * result + (afdSignaling?.hashCode() ?: 0)
        result = 31 * result + (alternativeTransferFunction?.hashCode() ?: 0)
        result = 31 * result + (bitrate)
        result = 31 * result + (bufSize)
        result = 31 * result + (colorMetadata?.hashCode() ?: 0)
        result = 31 * result + (colorSpaceSettings?.hashCode() ?: 0)
        result = 31 * result + (filterSettings?.hashCode() ?: 0)
        result = 31 * result + (fixedAfd?.hashCode() ?: 0)
        result = 31 * result + (flickerAq?.hashCode() ?: 0)
        result = 31 * result + (framerateDenominator)
        result = 31 * result + (framerateNumerator)
        result = 31 * result + (gopClosedCadence)
        result = 31 * result + (gopSize.hashCode())
        result = 31 * result + (gopSizeUnits?.hashCode() ?: 0)
        result = 31 * result + (level?.hashCode() ?: 0)
        result = 31 * result + (lookAheadRateControl?.hashCode() ?: 0)
        result = 31 * result + (maxBitrate)
        result = 31 * result + (minIInterval)
        result = 31 * result + (parDenominator)
        result = 31 * result + (parNumerator)
        result = 31 * result + (profile?.hashCode() ?: 0)
        result = 31 * result + (qvbrQualityLevel)
        result = 31 * result + (rateControlMode?.hashCode() ?: 0)
        result = 31 * result + (scanType?.hashCode() ?: 0)
        result = 31 * result + (sceneChangeDetect?.hashCode() ?: 0)
        result = 31 * result + (slices)
        result = 31 * result + (tier?.hashCode() ?: 0)
        result = 31 * result + (timecodeBurninSettings?.hashCode() ?: 0)
        result = 31 * result + (timecodeInsertion?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as H265Settings

        if (adaptiveQuantization != other.adaptiveQuantization) return false
        if (afdSignaling != other.afdSignaling) return false
        if (alternativeTransferFunction != other.alternativeTransferFunction) return false
        if (bitrate != other.bitrate) return false
        if (bufSize != other.bufSize) return false
        if (colorMetadata != other.colorMetadata) return false
        if (colorSpaceSettings != other.colorSpaceSettings) return false
        if (filterSettings != other.filterSettings) return false
        if (fixedAfd != other.fixedAfd) return false
        if (flickerAq != other.flickerAq) return false
        if (framerateDenominator != other.framerateDenominator) return false
        if (framerateNumerator != other.framerateNumerator) return false
        if (gopClosedCadence != other.gopClosedCadence) return false
        if (gopSize != other.gopSize) return false
        if (gopSizeUnits != other.gopSizeUnits) return false
        if (level != other.level) return false
        if (lookAheadRateControl != other.lookAheadRateControl) return false
        if (maxBitrate != other.maxBitrate) return false
        if (minIInterval != other.minIInterval) return false
        if (parDenominator != other.parDenominator) return false
        if (parNumerator != other.parNumerator) return false
        if (profile != other.profile) return false
        if (qvbrQualityLevel != other.qvbrQualityLevel) return false
        if (rateControlMode != other.rateControlMode) return false
        if (scanType != other.scanType) return false
        if (sceneChangeDetect != other.sceneChangeDetect) return false
        if (slices != other.slices) return false
        if (tier != other.tier) return false
        if (timecodeBurninSettings != other.timecodeBurninSettings) return false
        if (timecodeInsertion != other.timecodeInsertion) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.medialive.model.H265Settings = Builder(this).apply(block).build()

    public class Builder {
        /**
         * Adaptive quantization. Allows intra-frame quantizers to vary to improve visual quality.
         */
        public var adaptiveQuantization: aws.sdk.kotlin.services.medialive.model.H265AdaptiveQuantization? = null
        /**
         * Indicates that AFD values will be written into the output stream. If afdSignaling is "auto", the system will try to preserve the input AFD value (in cases where multiple AFD values are valid). If set to "fixed", the AFD value will be the value configured in the fixedAfd parameter.
         */
        public var afdSignaling: aws.sdk.kotlin.services.medialive.model.AfdSignaling? = null
        /**
         * Whether or not EML should insert an Alternative Transfer Function SEI message to support backwards compatibility with non-HDR decoders and displays.
         */
        public var alternativeTransferFunction: aws.sdk.kotlin.services.medialive.model.H265AlternativeTransferFunction? = null
        /**
         * Average bitrate in bits/second. Required when the rate control mode is VBR or CBR. Not used for QVBR. In an MS Smooth output group, each output must have a unique value when its bitrate is rounded down to the nearest multiple of 1000.
         */
        public var bitrate: kotlin.Int = 0
        /**
         * Size of buffer (HRD buffer model) in bits.
         */
        public var bufSize: kotlin.Int = 0
        /**
         * Includes colorspace metadata in the output.
         */
        public var colorMetadata: aws.sdk.kotlin.services.medialive.model.H265ColorMetadata? = null
        /**
         * Color Space settings
         */
        public var colorSpaceSettings: aws.sdk.kotlin.services.medialive.model.H265ColorSpaceSettings? = null
        /**
         * Optional filters that you can apply to an encode.
         */
        public var filterSettings: aws.sdk.kotlin.services.medialive.model.H265FilterSettings? = null
        /**
         * Four bit AFD value to write on all frames of video in the output stream. Only valid when afdSignaling is set to 'Fixed'.
         */
        public var fixedAfd: aws.sdk.kotlin.services.medialive.model.FixedAfd? = null
        /**
         * If set to enabled, adjust quantization within each frame to reduce flicker or 'pop' on I-frames.
         */
        public var flickerAq: aws.sdk.kotlin.services.medialive.model.H265FlickerAq? = null
        /**
         * Framerate denominator.
         */
        public var framerateDenominator: kotlin.Int = 0
        /**
         * Framerate numerator - framerate is a fraction, e.g. 24000 / 1001 = 23.976 fps.
         */
        public var framerateNumerator: kotlin.Int = 0
        /**
         * Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.
         */
        public var gopClosedCadence: kotlin.Int = 0
        /**
         * GOP size (keyframe interval) in units of either frames or seconds per gopSizeUnits. If gopSizeUnits is frames, gopSize must be an integer and must be greater than or equal to 1. If gopSizeUnits is seconds, gopSize must be greater than 0, but need not be an integer.
         */
        public var gopSize: kotlin.Double = 0.0
        /**
         * Indicates if the gopSize is specified in frames or seconds. If seconds the system will convert the gopSize into a frame count at run time.
         */
        public var gopSizeUnits: aws.sdk.kotlin.services.medialive.model.H265GopSizeUnits? = null
        /**
         * H.265 Level.
         */
        public var level: aws.sdk.kotlin.services.medialive.model.H265Level? = null
        /**
         * Amount of lookahead. A value of low can decrease latency and memory usage, while high can produce better quality for certain content.
         */
        public var lookAheadRateControl: aws.sdk.kotlin.services.medialive.model.H265LookAheadRateControl? = null
        /**
         * For QVBR: See the tooltip for Quality level
         */
        public var maxBitrate: kotlin.Int = 0
        /**
         * Only meaningful if sceneChangeDetect is set to enabled. Defaults to 5 if multiplex rate control is used. Enforces separation between repeated (cadence) I-frames and I-frames inserted by Scene Change Detection. If a scene change I-frame is within I-interval frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene change I-frame. GOP stretch requires enabling lookahead as well as setting I-interval. The normal cadence resumes for the next GOP. Note: Maximum GOP stretch = GOP size + Min-I-interval - 1
         */
        public var minIInterval: kotlin.Int = 0
        /**
         * Pixel Aspect Ratio denominator.
         */
        public var parDenominator: kotlin.Int = 0
        /**
         * Pixel Aspect Ratio numerator.
         */
        public var parNumerator: kotlin.Int = 0
        /**
         * H.265 Profile.
         */
        public var profile: aws.sdk.kotlin.services.medialive.model.H265Profile? = null
        /**
         * Controls the target quality for the video encode. Applies only when the rate control mode is QVBR. Set values for the QVBR quality level field and Max bitrate field that suit your most important viewing devices. Recommended values are: - Primary screen: Quality level: 8 to 10. Max bitrate: 4M - PC or tablet: Quality level: 7. Max bitrate: 1.5M to 3M - Smartphone: Quality level: 6. Max bitrate: 1M to 1.5M
         */
        public var qvbrQualityLevel: kotlin.Int = 0
        /**
         * Rate control mode. QVBR: Quality will match the specified quality level except when it is constrained by the maximum bitrate. Recommended if you or your viewers pay for bandwidth. CBR: Quality varies, depending on the video complexity. Recommended only if you distribute your assets to devices that cannot handle variable bitrates. Multiplex: This rate control mode is only supported (and is required) when the video is being delivered to a MediaLive Multiplex in which case the rate control configuration is controlled by the properties within the Multiplex Program.
         */
        public var rateControlMode: aws.sdk.kotlin.services.medialive.model.H265RateControlMode? = null
        /**
         * Sets the scan type of the output to progressive or top-field-first interlaced.
         */
        public var scanType: aws.sdk.kotlin.services.medialive.model.H265ScanType? = null
        /**
         * Scene change detection.
         */
        public var sceneChangeDetect: aws.sdk.kotlin.services.medialive.model.H265SceneChangeDetect? = null
        /**
         * Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures. This field is optional; when no value is specified the encoder will choose the number of slices based on encode resolution.
         */
        public var slices: kotlin.Int = 0
        /**
         * H.265 Tier.
         */
        public var tier: aws.sdk.kotlin.services.medialive.model.H265Tier? = null
        /**
         * Timecode burn-in settings
         */
        public var timecodeBurninSettings: aws.sdk.kotlin.services.medialive.model.TimecodeBurninSettings? = null
        /**
         * Determines how timecodes should be inserted into the video elementary stream. - 'disabled': Do not include timecodes - 'picTimingSei': Pass through picture timing SEI messages from the source specified in Timecode Config
         */
        public var timecodeInsertion: aws.sdk.kotlin.services.medialive.model.H265TimecodeInsertionBehavior? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.medialive.model.H265Settings) : this() {
            this.adaptiveQuantization = x.adaptiveQuantization
            this.afdSignaling = x.afdSignaling
            this.alternativeTransferFunction = x.alternativeTransferFunction
            this.bitrate = x.bitrate
            this.bufSize = x.bufSize
            this.colorMetadata = x.colorMetadata
            this.colorSpaceSettings = x.colorSpaceSettings
            this.filterSettings = x.filterSettings
            this.fixedAfd = x.fixedAfd
            this.flickerAq = x.flickerAq
            this.framerateDenominator = x.framerateDenominator
            this.framerateNumerator = x.framerateNumerator
            this.gopClosedCadence = x.gopClosedCadence
            this.gopSize = x.gopSize
            this.gopSizeUnits = x.gopSizeUnits
            this.level = x.level
            this.lookAheadRateControl = x.lookAheadRateControl
            this.maxBitrate = x.maxBitrate
            this.minIInterval = x.minIInterval
            this.parDenominator = x.parDenominator
            this.parNumerator = x.parNumerator
            this.profile = x.profile
            this.qvbrQualityLevel = x.qvbrQualityLevel
            this.rateControlMode = x.rateControlMode
            this.scanType = x.scanType
            this.sceneChangeDetect = x.sceneChangeDetect
            this.slices = x.slices
            this.tier = x.tier
            this.timecodeBurninSettings = x.timecodeBurninSettings
            this.timecodeInsertion = x.timecodeInsertion
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.medialive.model.H265Settings = H265Settings(this)

        /**
         * construct an [aws.sdk.kotlin.services.medialive.model.H265ColorSpaceSettings] inside the given [block]
         */
        public fun colorSpaceSettings(block: aws.sdk.kotlin.services.medialive.model.H265ColorSpaceSettings.Builder.() -> kotlin.Unit) {
            this.colorSpaceSettings = aws.sdk.kotlin.services.medialive.model.H265ColorSpaceSettings.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.medialive.model.H265FilterSettings] inside the given [block]
         */
        public fun filterSettings(block: aws.sdk.kotlin.services.medialive.model.H265FilterSettings.Builder.() -> kotlin.Unit) {
            this.filterSettings = aws.sdk.kotlin.services.medialive.model.H265FilterSettings.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.medialive.model.TimecodeBurninSettings] inside the given [block]
         */
        public fun timecodeBurninSettings(block: aws.sdk.kotlin.services.medialive.model.TimecodeBurninSettings.Builder.() -> kotlin.Unit) {
            this.timecodeBurninSettings = aws.sdk.kotlin.services.medialive.model.TimecodeBurninSettings.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy