class Bitrate
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Bitrate |
Go | github.com/aws/aws-cdk-go/awscdk/v2#Bitrate |
Java | software.amazon.awscdk.Bitrate |
Python | aws_cdk.Bitrate |
TypeScript (source) | aws-cdk-lib » Bitrate |
Represents a bitrate value.
The amount can be specified either as a literal value (e.g: 10) which
cannot be negative, or as an unresolved number token.
When the amount is passed as a token, unit conversion is not possible.
Example
declare const channel: Channel;
new OriginEndpoint(this, 'Endpoint', {
channel,
segment: Segment.cmaf(),
manifests: [
Manifest.hls({
manifestName: 'index',
filterConfiguration: {
manifestFilter: [
ManifestFilter.bitrateRange(BitrateFilterKey.VIDEO_BITRATE, Bitrate.mbps(1), Bitrate.mbps(5)),
ManifestFilter.numericRange(NumericFilterKey.VIDEO_HEIGHT, 720, 1080),
ManifestFilter.videoCodecList([VideoCodec.H264, VideoCodec.H265]),
ManifestFilter.numeric(NumericFilterKey.AUDIO_CHANNELS, 2),
ManifestFilter.textList(TextFilterKey.AUDIO_LANGUAGE, ['en-US', 'fr']),
],
timeDelay: Duration.seconds(30),
},
}),
],
});
Methods
| Name | Description |
|---|---|
| is | Checks if bitrate is a token or a resolvable object. |
| to | Return the total number of bits per second. |
| to | Return the total number of gigabits per second. |
| to | Return the total number of kilobits per second. |
| to | Return the total number of megabits per second. |
| static bps(amount) | Create a Bitrate representing an amount of bits per second. |
| static gbps(amount) | Create a Bitrate representing an amount of gigabits per second. |
| static kbps(amount) | Create a Bitrate representing an amount of kilobits per second. |
| static mbps(amount) | Create a Bitrate representing an amount of megabits per second. |
isUnresolved()
public isUnresolved(): boolean
Returns
boolean
Checks if bitrate is a token or a resolvable object.
toBps()
public toBps(): number
Returns
number
Return the total number of bits per second.
toGbps()
public toGbps(): number
Returns
number
Return the total number of gigabits per second.
toKbps()
public toKbps(): number
Returns
number
Return the total number of kilobits per second.
toMbps()
public toMbps(): number
Returns
number
Return the total number of megabits per second.
static bps(amount)
public static bps(amount: number): Bitrate
Parameters
- amount
number— the amount of bits per second.
Returns
Create a Bitrate representing an amount of bits per second.
static gbps(amount)
public static gbps(amount: number): Bitrate
Parameters
- amount
number— the amount of gigabits per second.
Returns
Create a Bitrate representing an amount of gigabits per second.
static kbps(amount)
public static kbps(amount: number): Bitrate
Parameters
- amount
number— the amount of kilobits per second.
Returns
Create a Bitrate representing an amount of kilobits per second.
static mbps(amount)
public static mbps(amount: number): Bitrate
Parameters
- amount
number— the amount of megabits per second.
Returns
Create a Bitrate representing an amount of megabits per second.

.NET
Go
Java
Python
TypeScript (