class PixelAspectRatio
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaConnect.Alpha.PixelAspectRatio |
Go | github.com/aws/aws-cdk-go/awsmediaconnectalpha/v2#PixelAspectRatio |
Java | software.amazon.awscdk.services.mediaconnect.alpha.PixelAspectRatio |
Python | aws_cdk.aws_mediaconnect_alpha.PixelAspectRatio |
TypeScript (source) | @aws-cdk/aws-mediaconnect-alpha ยป PixelAspectRatio |
The pixel aspect ratio (PAR) of the video.
Use the predefined constants for standard ratios, or {@link PixelAspectRatio.of} for a custom ratio.
Example
declare const stack: Stack;
declare const role: iam.IRole;
declare const securityGroup: ec2.ISecurityGroup;
declare const subnet: ec2.ISubnet;
const efaInterface = VpcInterface.define({
vpcInterfaceName: 'efa-interface',
role: role,
securityGroups: [securityGroup],
subnet: subnet,
networkInterfaceType: NetworkInterface.EFA, // Required for CDI
});
const videoStream = MediaStream.video({
mediaStreamId: 1,
mediaStreamName: 'video',
videoFormat: MediaVideoFormat.HD_1080P,
fmtp: {
exactFramerate: Framerate.FPS_29_97,
par: PixelAspectRatio.SQUARE,
},
});
const flow = new Flow(stack, 'MyCdiFlow', {
flowSize: FlowSize.LARGE_4X, // Required for CDI and JPEG XS
vpcInterfaces: [efaInterface],
mediaStreams: [videoStream],
source: SourceConfiguration.cdi({
flowSourceName: 'cdi-source',
vpcInterface: efaInterface,
port: 5000,
maxSyncBuffer: 100,
mediaStreamSourceConfigurations: [{
encoding: Encoding.RAW,
mediaStream: videoStream,
}],
}),
});
Properties
| Name | Type | Description |
|---|---|---|
| static SQUARE | Pixel | Square pixels (1:1). |
static SQUARE
Type:
Pixel
Square pixels (1:1).
Methods
| Name | Description |
|---|---|
| to | Returns the string value in numerator:denominator form. |
| static of(numerator, denominator) | Define a pixel aspect ratio. |
toString()
public toString(): string
Returns
string
Returns the string value in numerator:denominator form.
static of(numerator, denominator)
public static of(numerator: number, denominator: number): PixelAspectRatio
Parameters
- numerator
numberโ Numerator of the ratio. - denominator
numberโ Denominator of the ratio.
Returns
Define a pixel aspect ratio.

.NET
Go
Java
Python
TypeScript (