commonMain.aws.sdk.kotlin.services.mediaconvert.model.AV1Settings.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mediaconvert-jvm Show documentation
Show all versions of mediaconvert-jvm Show documentation
The AWS SDK for Kotlin client for MediaConvert
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.mediaconvert.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Required when you set Codec, under VideoDescription>CodecSettings to the value AV1.
*/
public class AV1Settings private constructor(builder: Builder) {
/**
* Specify the strength of any adaptive quantization filters that you enable. The value that you choose here applies to Spatial adaptive quantization.
*/
public val adaptiveQuantization: aws.sdk.kotlin.services.mediaconvert.model.AV1AdaptiveQuantization? = builder.adaptiveQuantization
/**
* Specify the Bit depth. You can choose 8-bit or 10-bit.
*/
public val bitDepth: aws.sdk.kotlin.services.mediaconvert.model.AV1BitDepth? = builder.bitDepth
/**
* Film grain synthesis replaces film grain present in your content with similar quality synthesized AV1 film grain. We recommend that you choose Enabled to reduce the bandwidth of your QVBR quality level 5, 6, 7, or 8 outputs. For QVBR quality level 9 or 10 outputs we recommend that you keep the default value, Disabled. When you include Film grain synthesis, you cannot include the Noise reducer preprocessor.
*/
public val filmGrainSynthesis: aws.sdk.kotlin.services.mediaconvert.model.AV1FilmGrainSynthesis? = builder.filmGrainSynthesis
/**
* 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.
*/
public val framerateControl: aws.sdk.kotlin.services.mediaconvert.model.AV1FramerateControl? = builder.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.
*/
public val framerateConversionAlgorithm: aws.sdk.kotlin.services.mediaconvert.model.AV1FramerateConversionAlgorithm? = builder.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.
*/
public val framerateDenominator: kotlin.Int? = builder.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.
*/
public val framerateNumerator: kotlin.Int? = builder.framerateNumerator
/**
* Specify the GOP length (keyframe interval) in frames. With AV1, MediaConvert doesn't support GOP length in seconds. This value must be greater than zero and preferably equal to 1 + ((numberBFrames + 1) * x), where x is an integer value.
*/
public val gopSize: kotlin.Double? = builder.gopSize
/**
* Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
*/
public val maxBitrate: kotlin.Int? = builder.maxBitrate
/**
* Specify from the number of B-frames, in the range of 0-15. For AV1 encoding, we recommend using 7 or 15. Choose a larger number for a lower bitrate and smaller file size; choose a smaller number for better video quality.
*/
public val numberBFramesBetweenReferenceFrames: kotlin.Int? = builder.numberBFramesBetweenReferenceFrames
/**
* Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode.
*/
public val qvbrSettings: aws.sdk.kotlin.services.mediaconvert.model.AV1QvbrSettings? = builder.qvbrSettings
/**
* 'With AV1 outputs, for rate control mode, MediaConvert supports only quality-defined variable bitrate (QVBR). You can''t use CBR or VBR.'
*/
public val rateControlMode: aws.sdk.kotlin.services.mediaconvert.model.AV1RateControlMode? = builder.rateControlMode
/**
* Specify the number of slices per picture. This value must be 1, 2, 4, 8, 16, or 32. For progressive pictures, this value must be less than or equal to the number of macroblock rows. For interlaced pictures, this value must be less than or equal to half the number of macroblock rows.
*/
public val slices: kotlin.Int? = builder.slices
/**
* Keep the default value, Enabled, to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
*/
public val spatialAdaptiveQuantization: aws.sdk.kotlin.services.mediaconvert.model.AV1SpatialAdaptiveQuantization? = builder.spatialAdaptiveQuantization
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.mediaconvert.model.AV1Settings = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AV1Settings(")
append("adaptiveQuantization=$adaptiveQuantization,")
append("bitDepth=$bitDepth,")
append("filmGrainSynthesis=$filmGrainSynthesis,")
append("framerateControl=$framerateControl,")
append("framerateConversionAlgorithm=$framerateConversionAlgorithm,")
append("framerateDenominator=$framerateDenominator,")
append("framerateNumerator=$framerateNumerator,")
append("gopSize=$gopSize,")
append("maxBitrate=$maxBitrate,")
append("numberBFramesBetweenReferenceFrames=$numberBFramesBetweenReferenceFrames,")
append("qvbrSettings=$qvbrSettings,")
append("rateControlMode=$rateControlMode,")
append("slices=$slices,")
append("spatialAdaptiveQuantization=$spatialAdaptiveQuantization")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = adaptiveQuantization?.hashCode() ?: 0
result = 31 * result + (bitDepth?.hashCode() ?: 0)
result = 31 * result + (filmGrainSynthesis?.hashCode() ?: 0)
result = 31 * result + (framerateControl?.hashCode() ?: 0)
result = 31 * result + (framerateConversionAlgorithm?.hashCode() ?: 0)
result = 31 * result + (framerateDenominator ?: 0)
result = 31 * result + (framerateNumerator ?: 0)
result = 31 * result + (gopSize?.hashCode() ?: 0)
result = 31 * result + (maxBitrate ?: 0)
result = 31 * result + (numberBFramesBetweenReferenceFrames ?: 0)
result = 31 * result + (qvbrSettings?.hashCode() ?: 0)
result = 31 * result + (rateControlMode?.hashCode() ?: 0)
result = 31 * result + (slices ?: 0)
result = 31 * result + (spatialAdaptiveQuantization?.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 AV1Settings
if (adaptiveQuantization != other.adaptiveQuantization) return false
if (bitDepth != other.bitDepth) return false
if (filmGrainSynthesis != other.filmGrainSynthesis) return false
if (framerateControl != other.framerateControl) return false
if (framerateConversionAlgorithm != other.framerateConversionAlgorithm) return false
if (framerateDenominator != other.framerateDenominator) return false
if (framerateNumerator != other.framerateNumerator) return false
if (!(gopSize?.equals(other.gopSize) ?: (other.gopSize == null))) return false
if (maxBitrate != other.maxBitrate) return false
if (numberBFramesBetweenReferenceFrames != other.numberBFramesBetweenReferenceFrames) return false
if (qvbrSettings != other.qvbrSettings) return false
if (rateControlMode != other.rateControlMode) return false
if (slices != other.slices) return false
if (spatialAdaptiveQuantization != other.spatialAdaptiveQuantization) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.mediaconvert.model.AV1Settings = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specify the strength of any adaptive quantization filters that you enable. The value that you choose here applies to Spatial adaptive quantization.
*/
public var adaptiveQuantization: aws.sdk.kotlin.services.mediaconvert.model.AV1AdaptiveQuantization? = null
/**
* Specify the Bit depth. You can choose 8-bit or 10-bit.
*/
public var bitDepth: aws.sdk.kotlin.services.mediaconvert.model.AV1BitDepth? = null
/**
* Film grain synthesis replaces film grain present in your content with similar quality synthesized AV1 film grain. We recommend that you choose Enabled to reduce the bandwidth of your QVBR quality level 5, 6, 7, or 8 outputs. For QVBR quality level 9 or 10 outputs we recommend that you keep the default value, Disabled. When you include Film grain synthesis, you cannot include the Noise reducer preprocessor.
*/
public var filmGrainSynthesis: aws.sdk.kotlin.services.mediaconvert.model.AV1FilmGrainSynthesis? = null
/**
* 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.
*/
public var framerateControl: aws.sdk.kotlin.services.mediaconvert.model.AV1FramerateControl? = null
/**
* 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.
*/
public var framerateConversionAlgorithm: aws.sdk.kotlin.services.mediaconvert.model.AV1FramerateConversionAlgorithm? = null
/**
* 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 var framerateDenominator: kotlin.Int? = null
/**
* 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 var framerateNumerator: kotlin.Int? = null
/**
* Specify the GOP length (keyframe interval) in frames. With AV1, MediaConvert doesn't support GOP length in seconds. This value must be greater than zero and preferably equal to 1 + ((numberBFrames + 1) * x), where x is an integer value.
*/
public var gopSize: kotlin.Double? = null
/**
* Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
*/
public var maxBitrate: kotlin.Int? = null
/**
* Specify from the number of B-frames, in the range of 0-15. For AV1 encoding, we recommend using 7 or 15. Choose a larger number for a lower bitrate and smaller file size; choose a smaller number for better video quality.
*/
public var numberBFramesBetweenReferenceFrames: kotlin.Int? = null
/**
* Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode.
*/
public var qvbrSettings: aws.sdk.kotlin.services.mediaconvert.model.AV1QvbrSettings? = null
/**
* 'With AV1 outputs, for rate control mode, MediaConvert supports only quality-defined variable bitrate (QVBR). You can''t use CBR or VBR.'
*/
public var rateControlMode: aws.sdk.kotlin.services.mediaconvert.model.AV1RateControlMode? = null
/**
* Specify the number of slices per picture. This value must be 1, 2, 4, 8, 16, or 32. For progressive pictures, this value must be less than or equal to the number of macroblock rows. For interlaced pictures, this value must be less than or equal to half the number of macroblock rows.
*/
public var slices: kotlin.Int? = null
/**
* Keep the default value, Enabled, to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
*/
public var spatialAdaptiveQuantization: aws.sdk.kotlin.services.mediaconvert.model.AV1SpatialAdaptiveQuantization? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.mediaconvert.model.AV1Settings) : this() {
this.adaptiveQuantization = x.adaptiveQuantization
this.bitDepth = x.bitDepth
this.filmGrainSynthesis = x.filmGrainSynthesis
this.framerateControl = x.framerateControl
this.framerateConversionAlgorithm = x.framerateConversionAlgorithm
this.framerateDenominator = x.framerateDenominator
this.framerateNumerator = x.framerateNumerator
this.gopSize = x.gopSize
this.maxBitrate = x.maxBitrate
this.numberBFramesBetweenReferenceFrames = x.numberBFramesBetweenReferenceFrames
this.qvbrSettings = x.qvbrSettings
this.rateControlMode = x.rateControlMode
this.slices = x.slices
this.spatialAdaptiveQuantization = x.spatialAdaptiveQuantization
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.mediaconvert.model.AV1Settings = AV1Settings(this)
/**
* construct an [aws.sdk.kotlin.services.mediaconvert.model.AV1QvbrSettings] inside the given [block]
*/
public fun qvbrSettings(block: aws.sdk.kotlin.services.mediaconvert.model.AV1QvbrSettings.Builder.() -> kotlin.Unit) {
this.qvbrSettings = aws.sdk.kotlin.services.mediaconvert.model.AV1QvbrSettings.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}