Skip to content

Commit

Permalink
feat(client-mediaconvert): The AWS Elemental MediaConvert SDK has add…
Browse files Browse the repository at this point in the history
…ed support for HDR10 to SDR tone mapping, and animated GIF video input sources.
  • Loading branch information
awstools committed Feb 27, 2023
1 parent 0435738 commit 6e976d0
Show file tree
Hide file tree
Showing 10 changed files with 664 additions and 422 deletions.
8 changes: 2 additions & 6 deletions clients/client-mediaconvert/src/commands/GetJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ import {
} from "@aws-sdk/types";

import { MediaConvertClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaConvertClient";
import {
GetJobRequest,
GetJobRequestFilterSensitiveLog,
GetJobResponse,
GetJobResponseFilterSensitiveLog,
} from "../models/models_1";
import { GetJobRequest, GetJobRequestFilterSensitiveLog } from "../models/models_1";
import { GetJobResponse, GetJobResponseFilterSensitiveLog } from "../models/models_2";
import { deserializeAws_restJson1GetJobCommand, serializeAws_restJson1GetJobCommand } from "../protocols/Aws_restJson1";

export interface GetJobCommandInput extends GetJobRequest {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
GetJobTemplateRequestFilterSensitiveLog,
GetJobTemplateResponse,
GetJobTemplateResponseFilterSensitiveLog,
} from "../models/models_1";
} from "../models/models_2";
import {
deserializeAws_restJson1GetJobTemplateCommand,
serializeAws_restJson1GetJobTemplateCommand,
Expand Down
8 changes: 6 additions & 2 deletions clients/client-mediaconvert/src/commands/GetPolicyCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ import {
} from "@aws-sdk/types";

import { MediaConvertClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaConvertClient";
import { GetPolicyRequest, GetPolicyRequestFilterSensitiveLog } from "../models/models_1";
import { GetPolicyResponse, GetPolicyResponseFilterSensitiveLog } from "../models/models_2";
import {
GetPolicyRequest,
GetPolicyRequestFilterSensitiveLog,
GetPolicyResponse,
GetPolicyResponseFilterSensitiveLog,
} from "../models/models_2";
import {
deserializeAws_restJson1GetPolicyCommand,
serializeAws_restJson1GetPolicyCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = <T>(
};

export interface EndpointParameters extends __EndpointParameters {
Region: string;
Region?: string;
UseDualStack?: boolean;
UseFIPS?: boolean;
Endpoint?: string;
Expand Down
47 changes: 24 additions & 23 deletions clients/client-mediaconvert/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,29 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/mediaconvert.json */

const u="fn",
v="argv",
w="ref";
const a=true,
b=false,
c="String",
d="PartitionResult",
e="tree",
f="error",
g="endpoint",
h="getAttr",
i="stringEquals",
j={"required":true,"default":false,"type":"Boolean"},
k={[w]:"Region"},
l={[w]:"Endpoint"},
m={[u]:"booleanEquals",[v]:[{[w]:"UseFIPS"},true]},
n={[u]:"booleanEquals",[v]:[{[w]:"UseDualStack"},true]},
o={},
p={[u]:"booleanEquals",[v]:[true,{[u]:h,[v]:[{[w]:d},"supportsFIPS"]}]},
q={[w]:d},
r={[u]:"booleanEquals",[v]:[true,{[u]:h,[v]:[q,"supportsDualStack"]}]},
s=[m],
const u="required",
v="fn",
w="argv",
x="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f="getAttr",
g="stringEquals",
h={[u]:false,"type":"String"},
i={[u]:true,"default":false,"type":"Boolean"},
j={[x]:"Endpoint"},
k={[v]:"booleanEquals",[w]:[{[x]:"UseFIPS"},true]},
l={[v]:"booleanEquals",[w]:[{[x]:"UseDualStack"},true]},
m={},
n={[x]:"Region"},
o={[v]:"booleanEquals",[w]:[true,{[v]:f,[w]:[{[x]:e},"supportsFIPS"]}]},
p={[x]:e},
q={[v]:"booleanEquals",[w]:[true,{[v]:f,[w]:[p,"supportsDualStack"]}]},
r=[k],
s=[l],
t=[n];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:j,UseFIPS:j,Endpoint:{required:b,type:c}},rules:[{conditions:[{[u]:"aws.partition",[v]:[k],assign:d}],type:e,rules:[{conditions:[{[u]:"isSet",[v]:[l]}],type:e,rules:[{conditions:s,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:t,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:l,properties:o,headers:o},type:g}]}]},{conditions:[m,n],type:e,rules:[{conditions:[p,r],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://mediaconvert-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:o,headers:o},type:g}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:s,type:e,rules:[{conditions:[p],type:e,rules:[{type:e,rules:[{conditions:[{[u]:i,[v]:["aws-us-gov",{[u]:h,[v]:[q,"name"]}]}],endpoint:{url:"https://mediaconvert.{Region}.amazonaws.com",properties:o,headers:o},type:g},{endpoint:{url:"https://mediaconvert-fips.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:t,type:e,rules:[{conditions:[r],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://mediaconvert.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:o,headers:o},type:g}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{conditions:[{[u]:i,[v]:[k,"cn-northwest-1"]}],endpoint:{url:"https://subscribe.mediaconvert.cn-northwest-1.amazonaws.com.cn",properties:o,headers:o},type:g},{conditions:[{[u]:i,[v]:[k,"us-gov-west-1"]}],endpoint:{url:"https://mediaconvert.us-gov-west-1.amazonaws.com",properties:o,headers:o},type:g},{endpoint:{url:"https://mediaconvert.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:g}]}]}]};
const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[v]:a,[w]:[j]}],type:b,rules:[{conditions:r,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:s,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:j,properties:m,headers:m},type:d}]}]},{type:b,rules:[{conditions:[{[v]:a,[w]:t}],type:b,rules:[{conditions:[{[v]:"aws.partition",[w]:t,assign:e}],type:b,rules:[{conditions:[k,l],type:b,rules:[{conditions:[o,q],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://mediaconvert-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:r,type:b,rules:[{conditions:[o],type:b,rules:[{type:b,rules:[{conditions:[{[v]:g,[w]:["aws-us-gov",{[v]:f,[w]:[p,"name"]}]}],endpoint:{url:"https://mediaconvert.{Region}.amazonaws.com",properties:m,headers:m},type:d},{endpoint:{url:"https://mediaconvert-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:s,type:b,rules:[{conditions:[q],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://mediaconvert.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{conditions:[{[v]:g,[w]:[n,"cn-northwest-1"]}],endpoint:{url:"https://subscribe.mediaconvert.cn-northwest-1.amazonaws.com.cn",properties:m,headers:m},type:d},{conditions:[{[v]:g,[w]:[n,"us-gov-west-1"]}],endpoint:{url:"https://mediaconvert.us-gov-west-1.amazonaws.com",properties:m,headers:m},type:d},{endpoint:{url:"https://mediaconvert.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
export const ruleSet: RuleSetObject = _data;
6 changes: 3 additions & 3 deletions clients/client-mediaconvert/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3161,7 +3161,7 @@ export enum VchipAction {
*/
export interface ExtendedDataServices {
/**
* The action to take on content advisory XDS packets. If you select PASSTHROUGH, packets will not be changed. If you select STRIP, any packets will be removed in output captions.
* The action to take on copy and redistribution control XDS packets. If you select PASSTHROUGH, packets will not be changed. If you select STRIP, any packets will be removed in output captions.
*/
CopyProtectionAction?: CopyProtectionAction | string;

Expand Down Expand Up @@ -4736,12 +4736,12 @@ export interface CmfcSettings {
TimedMetadataBoxVersion?: CmfcTimedMetadataBoxVersion | string;

/**
* Specify the event message box (eMSG) scheme ID URI (scheme_id_uri) for ID3 timed metadata in your output. For more informaiton, see ISO/IEC 23009-1:2022 section 5.10.3.3.4 Semantics. Leave blank to use the default value: https://aomedia.org/emsg/ID3 When you specify a value for ID3 metadata scheme ID URI, you must also set ID3 metadata (timedMetadata) to Passthrough.
* Specify the event message box (eMSG) scheme ID URI (scheme_id_uri) for ID3 timed metadata in your output. For more information, see ISO/IEC 23009-1:2022 section 5.10.3.3.4 Semantics. Leave blank to use the default value: https://aomedia.org/emsg/ID3 When you specify a value for ID3 metadata scheme ID URI, you must also set ID3 metadata (timedMetadata) to Passthrough.
*/
TimedMetadataSchemeIdUri?: string;

/**
* Specify the event message box (eMSG) value for ID3 timed metadata in your output. For more informaiton, see ISO/IEC 23009-1:2022 section 5.10.3.3.4 Semantics. When you specify a value for ID3 Metadata Value, you must also set ID3 metadata (timedMetadata) to Passthrough.
* Specify the event message box (eMSG) value for ID3 timed metadata in your output. For more information, see ISO/IEC 23009-1:2022 section 5.10.3.3.4 Semantics. When you specify a value for ID3 Metadata Value, you must also set ID3 metadata (timedMetadata) to Passthrough.
*/
TimedMetadataValue?: string;
}
Expand Down
111 changes: 56 additions & 55 deletions clients/client-mediaconvert/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -685,12 +685,12 @@ export interface MpdSettings {
TimedMetadataBoxVersion?: MpdTimedMetadataBoxVersion | string;

/**
* Specify the event message box (eMSG) scheme ID URI (scheme_id_uri) for ID3 timed metadata in your output. For more informaiton, see ISO/IEC 23009-1:2022 section 5.10.3.3.4 Semantics. Leave blank to use the default value: https://aomedia.org/emsg/ID3 When you specify a value for ID3 metadata scheme ID URI, you must also set ID3 metadata (timedMetadata) to Passthrough.
* Specify the event message box (eMSG) scheme ID URI (scheme_id_uri) for ID3 timed metadata in your output. For more information, see ISO/IEC 23009-1:2022 section 5.10.3.3.4 Semantics. Leave blank to use the default value: https://aomedia.org/emsg/ID3 When you specify a value for ID3 metadata scheme ID URI, you must also set ID3 metadata (timedMetadata) to Passthrough.
*/
TimedMetadataSchemeIdUri?: string;

/**
* Specify the event message box (eMSG) value for ID3 timed metadata in your output. For more informaiton, see ISO/IEC 23009-1:2022 section 5.10.3.3.4 Semantics. When you specify a value for ID3 Metadata Value, you must also set ID3 metadata (timedMetadata) to Passthrough.
* Specify the event message box (eMSG) value for ID3 timed metadata in your output. For more information, see ISO/IEC 23009-1:2022 section 5.10.3.3.4 Semantics. When you specify a value for ID3 Metadata Value, you must also set ID3 metadata (timedMetadata) to Passthrough.
*/
TimedMetadataValue?: string;
}
Expand Down Expand Up @@ -1159,6 +1159,36 @@ export enum H264AdaptiveQuantization {
OFF = "OFF",
}

export enum BandwidthReductionFilterSharpening {
HIGH = "HIGH",
LOW = "LOW",
MEDIUM = "MEDIUM",
OFF = "OFF",
}

export enum BandwidthReductionFilterStrength {
AUTO = "AUTO",
HIGH = "HIGH",
LOW = "LOW",
MEDIUM = "MEDIUM",
OFF = "OFF",
}

/**
* The Bandwidth reduction filter increases the video quality of your output relative to its bitrate. Use to lower the bitrate of your constant quality QVBR output, with little or no perceptual decrease in quality. Or, use to increase the video quality of outputs with other rate control modes relative to the bitrate that you specify. Bandwidth reduction increases further when your input is low quality or noisy.Outputs that use this feature incur pro-tier pricing.When you include Bandwidth reduction filter, you cannot include the Noise reducer preprocessor.
*/
export interface BandwidthReductionFilter {
/**
* Optionally specify the level of sharpening to apply when you use the Bandwidth reduction filter. Sharpening adds contrast to the edges of your video content and can reduce softness. Keep the default value Off to apply no sharpening. Set Sharpening strength to Low to apply a minimal amount of sharpening, or High to apply a maximum amount of sharpening.
*/
Sharpening?: BandwidthReductionFilterSharpening | string;

/**
* Specify the strength of the Bandwidth reduction filter. For most workflows, we recommend that you choose Auto. Your output bandwidth will be reduced by at least 8 percent with no perceptual decrease in video quality. If your output bandwidth isn't constrained, set Filter strength to Low or Medium. Low results in minimal to no impact in perceptual quality. For more bandwidth reduction, choose High. The filter helps equalize quality between all scenes and increases video softness. We recommend that you choose High for low bitrate outputs.
*/
Strength?: BandwidthReductionFilterStrength | string;
}

export enum H264CodecLevel {
AUTO = "AUTO",
LEVEL_1 = "LEVEL_1",
Expand Down Expand Up @@ -1332,6 +1362,11 @@ export interface H264Settings {
*/
AdaptiveQuantization?: H264AdaptiveQuantization | string;

/**
* The Bandwidth reduction filter increases the video quality of your output relative to its bitrate. Use to lower the bitrate of your constant quality QVBR output, with little or no perceptual decrease in quality. Or, use to increase the video quality of outputs with other rate control modes relative to the bitrate that you specify. Bandwidth reduction increases further when your input is low quality or noisy.Outputs that use this feature incur pro-tier pricing.When you include Bandwidth reduction filter, you cannot include the Noise reducer preprocessor.
*/
BandwidthReductionFilter?: BandwidthReductionFilter;

/**
* Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
*/
Expand Down Expand Up @@ -3055,6 +3090,11 @@ export enum ColorSpaceConversion {
NONE = "NONE",
}

export enum HDRToSDRToneMapper {
PRESERVE_DETAILS = "PRESERVE_DETAILS",
VIBRANT = "VIBRANT",
}

export enum SampleRangeConversion {
LIMITED_RANGE_CLIP = "LIMITED_RANGE_CLIP",
LIMITED_RANGE_SQUEEZE = "LIMITED_RANGE_SQUEEZE",
Expand Down Expand Up @@ -3090,6 +3130,11 @@ export interface ColorCorrector {
*/
Hdr10Metadata?: Hdr10Metadata;

/**
* Specify how MediaConvert maps brightness and colors from your HDR input to your SDR output. The mode that you select represents a creative choice, with different tradeoffs in the details and tones of your output. To maintain details in bright or saturated areas of your output: Choose Preserve details. For some sources, your SDR output may look less bright and less saturated when compared to your HDR source. MediaConvert automatically applies this mode for HLG sources, regardless of your choice. For a bright and saturated output: Choose Vibrant. We recommend that you choose this mode when any of your source content is HDR10, and for the best results when it is mastered for 1000 nits. You may notice loss of details in bright or saturated areas of your output. HDR to SDR tone mapping has no effect when your input is SDR.
*/
HdrToSdrToneMapper?: HDRToSDRToneMapper | string;

/**
* Hue in degrees.
*/
Expand Down Expand Up @@ -3304,7 +3349,7 @@ export interface NoiseReducerTemporalFilterSettings {
}

/**
* Enable the Noise reducer (NoiseReducer) feature to remove noise from your video output if necessary. Enable or disable this feature for each output individually. This setting is disabled by default. When you enable Noise reducer (NoiseReducer), you must also select a value for Noise reducer filter (NoiseReducerFilter).
* Enable the Noise reducer feature to remove noise from your video output if necessary. Enable or disable this feature for each output individually. This setting is disabled by default. When you enable Noise reducer, you must also select a value for Noise reducer filter. For AVC outputs, when you include Noise reducer, you cannot include the Bandwidth reduction filter.
*/
export interface NoiseReducer {
/**
Expand Down Expand Up @@ -3433,7 +3478,7 @@ export interface VideoPreprocessor {
ImageInserter?: ImageInserter;

/**
* Enable the Noise reducer (NoiseReducer) feature to remove noise from your video output if necessary. Enable or disable this feature for each output individually. This setting is disabled by default.
* Enable the Noise reducer feature to remove noise from your video output if necessary. Enable or disable this feature for each output individually. This setting is disabled by default. When you enable Noise reducer, you must also select a value for Noise reducer filter. For AVC outputs, when you include Noise reducer, you cannot include the Bandwidth reduction filter.
*/
NoiseReducer?: NoiseReducer;

Expand Down Expand Up @@ -4673,29 +4718,6 @@ export interface GetJobRequest {
Id: string | undefined;
}

export interface GetJobResponse {
/**
* Each job converts an input file into an output file or files. For more information, see the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
*/
Job?: Job;
}

export interface GetJobTemplateRequest {
/**
* The name of the job template.
*/
Name: string | undefined;
}

export interface GetJobTemplateResponse {
/**
* A job template is a pre-made set of encoding instructions that you can use to quickly create a job.
*/
JobTemplate?: JobTemplate;
}

export interface GetPolicyRequest {}

/**
* @internal
*/
Expand Down Expand Up @@ -4822,6 +4844,13 @@ export const FrameCaptureSettingsFilterSensitiveLog = (obj: FrameCaptureSettings
...obj,
});

/**
* @internal
*/
export const BandwidthReductionFilterFilterSensitiveLog = (obj: BandwidthReductionFilter): any => ({
...obj,
});

/**
* @internal
*/
Expand Down Expand Up @@ -5311,31 +5340,3 @@ export const DisassociateCertificateResponseFilterSensitiveLog = (obj: Disassoci
export const GetJobRequestFilterSensitiveLog = (obj: GetJobRequest): any => ({
...obj,
});

/**
* @internal
*/
export const GetJobResponseFilterSensitiveLog = (obj: GetJobResponse): any => ({
...obj,
});

/**
* @internal
*/
export const GetJobTemplateRequestFilterSensitiveLog = (obj: GetJobTemplateRequest): any => ({
...obj,
});

/**
* @internal
*/
export const GetJobTemplateResponseFilterSensitiveLog = (obj: GetJobTemplateResponse): any => ({
...obj,
});

/**
* @internal
*/
export const GetPolicyRequestFilterSensitiveLog = (obj: GetPolicyRequest): any => ({
...obj,
});
51 changes: 51 additions & 0 deletions clients/client-mediaconvert/src/models/models_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,29 @@ import {
StatusUpdateInterval,
} from "./models_1";

export interface GetJobResponse {
/**
* Each job converts an input file into an output file or files. For more information, see the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
*/
Job?: Job;
}

export interface GetJobTemplateRequest {
/**
* The name of the job template.
*/
Name: string | undefined;
}

export interface GetJobTemplateResponse {
/**
* A job template is a pre-made set of encoding instructions that you can use to quickly create a job.
*/
JobTemplate?: JobTemplate;
}

export interface GetPolicyRequest {}

export enum InputPolicy {
ALLOWED = "ALLOWED",
DISALLOWED = "DISALLOWED",
Expand Down Expand Up @@ -429,6 +452,34 @@ export interface UpdateQueueResponse {
Queue?: Queue;
}

/**
* @internal
*/
export const GetJobResponseFilterSensitiveLog = (obj: GetJobResponse): any => ({
...obj,
});

/**
* @internal
*/
export const GetJobTemplateRequestFilterSensitiveLog = (obj: GetJobTemplateRequest): any => ({
...obj,
});

/**
* @internal
*/
export const GetJobTemplateResponseFilterSensitiveLog = (obj: GetJobTemplateResponse): any => ({
...obj,
});

/**
* @internal
*/
export const GetPolicyRequestFilterSensitiveLog = (obj: GetPolicyRequest): any => ({
...obj,
});

/**
* @internal
*/
Expand Down
Loading

0 comments on commit 6e976d0

Please sign in to comment.