interface H264SettingsProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaLive.Alpha.H264SettingsProps |
Go | github.com/aws/aws-cdk-go/awsmedialivealpha/v2#H264SettingsProps |
Java | software.amazon.awscdk.services.medialive.alpha.H264SettingsProps |
Python | aws_cdk.aws_medialive_alpha.H264SettingsProps |
TypeScript (source) | @aws-cdk/aws-medialive-alpha ยป H264SettingsProps |
Properties for H.264 codec settings.
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 |
|---|---|---|
| adaptive | H264 | The adaptive quantization. |
| afd | Afd | Indicates that AFD values will be written into the output stream. |
| buf | number | Percentage of the buffer that should initially be filled (HRD buffer model). |
| buf | number | Size of the buffer (HRD buffer model) in bits/second. |
| color | Color | Whether to include color space metadata in the output. |
| color | H264 | Color space settings for the video. |
| entropy | H264 | The entropy encoding mode. |
| filter | H264 | Optional video filter settings. |
| fixed | string | Four-bit AFD value to write on all frames. Only valid when afdSignaling is FIXED. |
| flicker | Flicker | If enabled, adjusts quantization within each frame to reduce flicker on I-frames. |
| force | H264 | Controls whether coding is on a field basis or frame basis when scan type is interlaced. |
| framerate? | Framerate | The video frame rate. |
| gop | Gop | If enabled, uses reference B frames for GOP structures that have B frames > 1. |
| gop | number | Frequency of closed GOPs. |
| gop | number | The number of B-frames between reference frames. |
| gop | Gop | The GOP size (keyframe interval). |
| level? | H264 | The H.264 level. |
| look | Look | Amount of lookahead. |
| min | number | Minimum bitrate in bits/second. |
| min | number | Only meaningful if sceneChangeDetect is enabled. |
| min | number | Minimum QP value. |
| num | number | The number of reference frames to use. |
| pixel | Pixel | The pixel aspect ratio (PAR) of the video. |
| profile? | H264 | The H.264 profile. |
| quality | H264 | Quality level. |
| rate | H264 | The rate control configuration. |
| scan | Scan | Sets the scan type of the output. |
| scene | H264 | Whether scene change detection inserts I-frames on scene changes. |
| slices? | number | Number of slices per picture. |
| softness? | number | Softness. |
| spatial | H264 | Whether spatial adaptive quantization adjusts quantization within each frame based on spatial variation. |
| subgop | Subgop | Sub-GOP length mode. |
| syntax? | H264 | Produces a bitstream compliant with SMPTE RP-2027. |
| temporal | H264 | Whether temporal adaptive quantization adjusts quantization based on temporal variation between frames. |
| timecode | Timecode | Timecode burn-in settings to overlay timecode on the video. |
| timecode | Timecode | Determines how timecodes are inserted into the video elementary stream. |
adaptiveQuantization?
Type:
H264
(optional, default: H264AdaptiveQuantization.AUTO)
The adaptive quantization.
This allows intra-frame quantizers to vary to improve visual quality.
afdSignaling?
Type:
Afd
(optional, default: AfdSignaling.NONE)
Indicates that AFD values will be written into the output stream.
If afdSignaling is auto, the system tries to preserve the input AFD value (in cases where multiple AFD values are valid). If set to fixed, the AFD value is the value configured in the fixedAfd parameter.
bufFillPct?
Type:
number
(optional, default: service default)
Percentage of the buffer that should initially be filled (HRD buffer model).
bufSize?
Type:
number
(optional, default: service default)
Size of the buffer (HRD buffer model) in bits/second.
colorMetadata?
Type:
Color
(optional, default: service default)
Whether to include color space metadata in the output.
colorSpaceSettings?
Type:
H264
(optional, default: service default)
Color space settings for the video.
entropyEncoding?
Type:
H264
(optional, default: service default)
The entropy encoding mode.
CABAC requires Main or High profile.
filterSettings?
Type:
H264
(optional, default: service default)
Optional video filter settings.
fixedAfd?
Type:
string
(optional, default: service default)
Four-bit AFD value to write on all frames. Only valid when afdSignaling is FIXED.
Valid values: FIXED_0000, FIXED_0010, FIXED_0011, FIXED_0100, FIXED_1000, FIXED_1001, FIXED_1010, FIXED_1011, FIXED_1100, FIXED_1101, FIXED_1110, FIXED_1111.
flickerAq?
Type:
Flicker
(optional, default: FlickerAq.ENABLED)
If enabled, adjusts quantization within each frame to reduce flicker on I-frames.
forceFieldPictures?
Type:
H264
(optional, default: service default)
Controls whether coding is on a field basis or frame basis when scan type is interlaced.
framerate?
Type:
Framerate
(optional, default: follow source)
The video frame rate.
gopBReference?
Type:
Gop
(optional, default: service default)
If enabled, uses reference B frames for GOP structures that have B frames > 1.
gopClosedCadence?
Type:
number
(optional, default: service default)
Frequency of closed GOPs.
Set to 1 for streaming so decoders joining mid-stream get an IDR frame quickly.
gopNumBFrames?
Type:
number
(optional, default: service default)
The number of B-frames between reference frames.
gopSize?
Type:
Gop
(optional, default: GopSize.seconds(1))
The GOP size (keyframe interval).
level?
Type:
H264
(optional, default: H264Level.H264_LEVEL_AUTO)
The H.264 level.
Valid values: H264_LEVEL_1, H264_LEVEL_1_1, H264_LEVEL_1_2, H264_LEVEL_1_3, H264_LEVEL_2, H264_LEVEL_2_1, H264_LEVEL_2_2, H264_LEVEL_3, H264_LEVEL_3_1, H264_LEVEL_3_2, H264_LEVEL_4, H264_LEVEL_4_1, H264_LEVEL_4_2, H264_LEVEL_5, H264_LEVEL_5_1, H264_LEVEL_5_2, H264_LEVEL_AUTO.
lookAheadRateControl?
Type:
Look
(optional, default: LookAheadRateControl.HIGH)
Amount of lookahead.
Low decreases latency/memory; high can produce better quality.
minBitrate?
Type:
number
(optional, default: service default)
Minimum bitrate in bits/second.
minIInterval?
Type:
number
(optional, default: service default)
Only meaningful if sceneChangeDetect is enabled.
Enforces separation between repeated (cadence) I-frames and I-frames inserted by scene change detection.
minQp?
Type:
number
(optional, default: service default)
Minimum QP value.
Sets a floor on the quantization parameter.
numRefFrames?
Type:
number
(optional, default: service default)
The number of reference frames to use.
The encoder might use more if B-frames or interlaced encoding is used.
pixelAspectRatio?
Type:
Pixel
(optional, default: follow source (or square pixels when framerate is specified))
The pixel aspect ratio (PAR) of the video.
profile?
Type:
H264
(optional, default: H264Profile.MAIN)
The H.264 profile.
qualityLevel?
Type:
H264
(optional, default: service default)
Quality level.
ENHANCED_QUALITY produces slightly better video without increasing bitrate.
rateControl?
Type:
H264
(optional, default: CBR with no bitrate (service default))
The rate control configuration.
scanType?
Type:
Scan
(optional, default: ScanType.PROGRESSIVE)
Sets the scan type of the output.
sceneChangeDetect?
Type:
H264
(optional, default: H264SceneChangeDetect.ENABLED)
Whether scene change detection inserts I-frames on scene changes.
slices?
Type:
number
(optional, default: encoder chooses based on resolution)
Number of slices per picture.
Must be <= macroblock rows (progressive) or half (interlaced).
softness?
Type:
number
(optional, default: service default)
Softness.
Selects a quantizer matrix; larger values reduce high-frequency content.
spatialAq?
Type:
H264
(optional, default: H264SpatialAq.ENABLED)
Whether spatial adaptive quantization adjusts quantization within each frame based on spatial variation.
subgopLength?
Type:
Subgop
(optional, default: service default)
Sub-GOP length mode.
syntax?
Type:
H264
(optional, default: H264Syntax.DEFAULT)
Produces a bitstream compliant with SMPTE RP-2027.
temporalAq?
Type:
H264
(optional, default: H264TemporalAq.ENABLED)
Whether temporal adaptive quantization adjusts quantization based on temporal variation between frames.
timecodeBurnin?
Type:
Timecode
(optional, default: no timecode burn-in)
Timecode burn-in settings to overlay timecode on the video.
timecodeInsertion?
Type:
Timecode
(optional, default: service default)
Determines how timecodes are inserted into the video elementary stream.
This controls insertion into the output elementary stream. The channel's timecodeConfig controls the
source of the timecode used for output.

.NET
Go
Java
Python
TypeScript (