Experimental
@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
QvbrRateControlProps Struct
Properties for QVBR rate control.
Example
ts
// H.264
const h264 = medialive.EncodeConfiguration.video({
name: 'h264_720p',
codec: medialive.VideoCodecSettings.h264({
rateControl: medialive.H264RateControl.cbr({ bitrate: Bitrate.mbps(3) }),
framerate: medialive.Framerate.FPS_30,
profile: medialive.H264Profile.HIGH,
}),
width: 1280,
height: 720,
});
// H.265
const h265 = medialive.EncodeConfiguration.video({
name: 'h265_1080p',
codec: medialive.VideoCodecSettings.h265({
rateControl: medialive.H265RateControl.qvbr({
maxBitrate: Bitrate.mbps(5),
qvbrQualityLevel: 7,
}),
framerate: medialive.Framerate.FPS_30,
profile: medialive.H265Profile.MAIN,
tier: medialive.H265Tier.HIGH,
}),
width: 1920,
height: 1080,
});
python
# H.264
h264 = medialive.EncodeConfiguration.video(
name="h264_720p",
codec=medialive.VideoCodecSettings.h264(
rate_control=medialive.H264RateControl.cbr(bitrate=Bitrate.mbps(3)),
framerate=medialive.Framerate.FPS_30,
profile=medialive.H264Profile.HIGH
),
width=1280,
height=720
)
# H.265
h265 = medialive.EncodeConfiguration.video(
name="h265_1080p",
codec=medialive.VideoCodecSettings.h265(
rate_control=medialive.H265RateControl.qvbr(
max_bitrate=Bitrate.mbps(5),
qvbr_quality_level=7
),
framerate=medialive.Framerate.FPS_30,
profile=medialive.H265Profile.MAIN,
tier=medialive.H265Tier.HIGH
),
width=1920,
height=1080
)
java
// H.264
EncodeConfiguration h264 = EncodeConfiguration.video(VideoEncodeProps.builder()
.name("h264_720p")
.codec(VideoCodecSettings.h264(H264SettingsProps.builder()
.rateControl(H264RateControl.cbr(CbrRateControlProps.builder().bitrate(Bitrate.mbps(3)).build()))
.framerate(Framerate.FPS_30)
.profile(H264Profile.HIGH)
.build()))
.width(1280)
.height(720)
.build());
// H.265
EncodeConfiguration h265 = EncodeConfiguration.video(VideoEncodeProps.builder()
.name("h265_1080p")
.codec(VideoCodecSettings.h265(H265SettingsProps.builder()
.rateControl(H265RateControl.qvbr(QvbrRateControlProps.builder()
.maxBitrate(Bitrate.mbps(5))
.qvbrQualityLevel(7)
.build()))
.framerate(Framerate.FPS_30)
.profile(H265Profile.MAIN)
.tier(H265Tier.HIGH)
.build()))
.width(1920)
.height(1080)
.build());
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
// H.264
var h264 = EncodeConfiguration.Video(new VideoEncodeProps {
Name = "h264_720p",
Codec = VideoCodecSettings.H264(new H264SettingsProps {
RateControl = H264RateControl.Cbr(new CbrRateControlProps { Bitrate = Bitrate.Mbps(3) }),
Framerate = Framerate.FPS_30,
Profile = H264Profile.HIGH
}),
Width = 1280,
Height = 720
});
// H.265
var h265 = EncodeConfiguration.Video(new VideoEncodeProps {
Name = "h265_1080p",
Codec = VideoCodecSettings.H265(new H265SettingsProps {
RateControl = H265RateControl.Qvbr(new QvbrRateControlProps {
MaxBitrate = Bitrate.Mbps(5),
QvbrQualityLevel = 7
}),
Framerate = Framerate.FPS_30,
Profile = H265Profile.MAIN,
Tier = H265Tier.HIGH
}),
Width = 1920,
Height = 1080
});
go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
// H.264
h264 := medialive.EncodeConfiguration_Video(&VideoEncodeProps{
Name: jsii.String("h264_720p"),
Codec: medialive.VideoCodecSettings_H264(&H264SettingsProps{
RateControl: medialive.H264RateControl_Cbr(&CbrRateControlProps{
Bitrate: awscdk.Bitrate_Mbps(jsii.Number(3)),
}),
Framerate: medialive.Framerate_FPS_30(),
Profile: medialive.H264Profile_HIGH(),
}),
Width: jsii.Number(1280),
Height: jsii.Number(720),
})
// H.265
h265 := medialive.EncodeConfiguration_Video(&VideoEncodeProps{
Name: jsii.String("h265_1080p"),
Codec: medialive.VideoCodecSettings_H265(&H265SettingsProps{
RateControl: medialive.H265RateControl_Qvbr(&QvbrRateControlProps{
MaxBitrate: awscdk.Bitrate_*Mbps(jsii.Number(5)),
QvbrQualityLevel: jsii.Number(7),
}),
Framerate: medialive.Framerate_FPS_30(),
Profile: medialive.H265Profile_MAIN(),
Tier: medialive.H265Tier_HIGH(),
}),
Width: jsii.Number(1920),
Height: jsii.Number(1080),
})
Properties
The maximum bitrate.
qvbrQualityLeveloptionalnumberqvbr_quality_leveloptionalint | floatqvbrQualityLeveloptionalNumberQvbrQualityLeveloptionaldoubleQvbrQualityLeveloptional*float64#The QVBR quality level (1-10).
Default: MediaLive infers the quality level from the resolution and max bitrate
Leave unset to let MediaLive infer the target quality from the output resolution and max bitrate.