class Framerate
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaLive.Alpha.Framerate |
Go | github.com/aws/aws-cdk-go/awsmedialivealpha/v2#Framerate |
Java | software.amazon.awscdk.services.medialive.alpha.Framerate |
Python | aws_cdk.aws_medialive_alpha.Framerate |
TypeScript (source) | @aws-cdk/aws-medialive-alpha ยป Framerate |
A video frame rate expressed as a rational number (numerator/denominator).
Use the predefined constants for standard rates, or {@link Framerate.of} for a custom rate.
Example
declare const stack: Stack;
declare const input: medialive.IInput;
declare const bucket: s3.IBucket;
const video = medialive.EncodeConfiguration.video({
name: 'video_720p',
codec: medialive.VideoCodecSettings.h264({
rateControl: medialive.H264RateControl.cbr({ bitrate: Bitrate.mbps(3) }),
framerate: medialive.Framerate.FPS_30,
}),
width: 1280,
height: 720,
});
const audio = medialive.EncodeConfiguration.audio({
name: 'audio_aac',
codec: medialive.AudioCodecSettings.aac({ bitrate: Bitrate.kbps(192) }),
});
new medialive.Channel(stack, 'Channel', {
inputs: [{ input }],
outputGroups: [
medialive.OutputGroupConfiguration.hls({
name: 'hls',
destinations: [medialive.OutputDestination.toBucket(bucket, 'live/stream')],
outputs: [{ encodes: [video, audio], outputName: 'hls_out' }],
}),
],
});
Properties
| Name | Type | Description |
|---|---|---|
| static FPS_24 | Framerate | 24 fps (cinema) โ 24/1. |
| static FPS_25 | Framerate | 25 fps โ 25/1. |
| static FPS_29_97 | Framerate | 29.97 fps โ 30000/1001. |
| static FPS_30 | Framerate | 30 fps โ 30/1. |
| static FPS_50 | Framerate | 50 fps โ 50/1. |
| static FPS_59_94 | Framerate | 59.94 fps โ 60000/1001. |
| static FPS_60 | Framerate | 60 fps โ 60/1. |
static FPS_24
Type:
Framerate
24 fps (cinema) โ 24/1.
static FPS_25
Type:
Framerate
25 fps โ 25/1.
static FPS_29_97
Type:
Framerate
29.97 fps โ 30000/1001.
static FPS_30
Type:
Framerate
30 fps โ 30/1.
static FPS_50
Type:
Framerate
50 fps โ 50/1.
static FPS_59_94
Type:
Framerate
59.94 fps โ 60000/1001.
static FPS_60
Type:
Framerate
60 fps โ 60/1.
Methods
| Name | Description |
|---|---|
| to | Returns the string value. |
| static of(numerator, denominator) | Define a custom frame rate. |
toString()
public toString(): string
Returns
string
Returns the string value.
static of(numerator, denominator)
public static of(numerator: number, denominator: number): Framerate
Parameters
- numerator
numberโ Numerator of the rate. - denominator
numberโ Denominator of the rate.
Returns
Define a custom frame rate.

.NET
Go
Java
Python
TypeScript (