AWS Elemental MediaConvert 的加速转码 JSON 作业示例 - MediaConvert
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 Amazon Web Services 服务入门

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

AWS Elemental MediaConvert 的加速转码 JSON 作业示例

以下示例 JSON 作业将 MP4 文件转换为使用 H.265 进行 720p 编码的其他 MP4 文件。要使用此示例,请使用您的值替换设置。必须至少提供以下设置的值:

  • Role:这是Amazon Identity and Access Management(IAM) 角色,您可以设置为 AWS Elemental MediaConvert 提供访问您的输入和输出 Amazon S3 存储桶以及代表您访问 Amazon API Gateway 的权限。有关设置此角色的信息,请参阅设置此角色的设置 IAM 权限中的AWS Elemental MediaConvert 用户指南

  • Destination:您希望 MediaConvert 存储输出文件的 Amazon S3 存储桶。请务必包含尾部反斜杠,如示例所示。

  • InputClippings:通过为 StartTimecodeEndTimecode 指定一组值,定义您希望转码的剪辑。或者,您也可以删除 InputClippings 以完全转码整个资产。

  • FileInput:为您的输入文件指定文件名和位置。您的文件输入可以是 Amazon S3 对象或 HTTP URL。

    加速转码支持只有一个输入的作业,您不能进行输入拼接。

{ "Role": "arn:aws:iam::123456789012:role/MediaConvert_Role", "AccelerationSettings" : { "Mode" : "ENABLED" }, "UserMetadata": { "job" : "Acceleration" }, "Settings": { "TimecodeConfig": { "Source": "ZEROBASED" }, "OutputGroups": [ { "Name": "File Group", "Outputs": [ { "ContainerSettings": { "Container": "MP4", "Mp4Settings": { "CslgAtom": "EXCLUDE", "FreeSpaceBox": "EXCLUDE", "MoovPlacement": "NORMAL" } }, "VideoDescription": { "Width": 1280, "ScalingBehavior": "DEFAULT", "Height": 720, "VideoPreprocessors": { "TimecodeBurnin": { "FontSize": 32, "Position": "TOP_CENTER" } }, "TimecodeInsertion": "DISABLED", "AntiAlias": "ENABLED", "Sharpness": 50, "CodecSettings": { "Codec": "H_265", "H265Settings": { "InterlaceMode": "PROGRESSIVE", "ParNumerator": 1, "NumberReferenceFrames": 3, "FramerateDenominator": 1001, "GopClosedCadence": 1, "AlternateTransferFunctionSei": "DISABLED", "HrdBufferInitialFillPercentage": 90, "GopSize": 48, "Slices": 4, "GopBReference": "ENABLED", "HrdBufferSize": 20000000, "SlowPal": "DISABLED", "ParDenominator": 1, "SpatialAdaptiveQuantization": "ENABLED", "TemporalAdaptiveQuantization": "ENABLED", "FlickerAdaptiveQuantization": "DISABLED", "Bitrate": 10000000, "FramerateControl": "INITIALIZE_FROM_SOURCE", "RateControlMode": "CBR", "CodecProfile": "MAIN_MAIN", "Tiles": "ENABLED", "Telecine": "NONE", "FramerateNumerator": 24000, "MinIInterval": 0, "AdaptiveQuantization": "HIGH", "CodecLevel": "LEVEL_5", "SceneChangeDetect": "ENABLED", "QualityTuningLevel": "SINGLE_PASS_HQ", "FramerateConversionAlgorithm": "DUPLICATE_DROP", "UnregisteredSeiTimecode": "DISABLED", "GopSizeUnits": "FRAMES", "ParControl": "SPECIFIED", "NumberBFramesBetweenReferenceFrames": 3, "TemporalIds": "DISABLED", "SampleAdaptiveOffsetFilterMode": "ADAPTIVE" } }, "AfdSignaling": "NONE", "DropFrameTimecode": "ENABLED", "RespondToAfd": "NONE", "ColorMetadata": "INSERT" }, "AudioDescriptions": [ { "AudioTypeControl": "FOLLOW_INPUT", "CodecSettings": { "Codec": "AAC", "AacSettings": { "AudioDescriptionBroadcasterMix": "NORMAL", "Bitrate": 160000, "RateControlMode": "CBR", "CodecProfile": "LC", "CodingMode": "CODING_MODE_2_0", "RawFormat": "NONE", "SampleRate": 48000, "Specification": "MPEG4" } }, "LanguageCodeControl": "FOLLOW_INPUT", "AudioType": 0 } ], "Extension": "mp4", "NameModifier": "1280x720" } ], "OutputGroupSettings": { "Type": "FILE_GROUP_SETTINGS", "FileGroupSettings": { "Destination": "s3://mediaconvert-outputs/accelerated/" } } } ], "AdAvailOffset": 0, "Inputs": [ { "InputClippings": [ { "EndTimecode": "01:00:00:00", "StartTimecode": "00:00:00:00" } ], "AudioSelectors": { "Audio Selector 1": { "Offset": 0, "DefaultSelection": "DEFAULT", "ProgramSelection": 1 } }, "VideoSelector": { "ColorSpace": "FOLLOW" }, "FilterEnable": "AUTO", "PsiControl": "USE_PSI", "FilterStrength": 0, "DeblockFilter": "DISABLED", "DenoiseFilter": "DISABLED", "TimecodeSource": "ZEROBASED", "FileInput": "s3://mediaconvert-inputs/SampleVideo_h264_StereoAudio.mp4" } ] } }