加速轉碼任務設定範例 JSON - MediaConvert

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

加速轉碼任務設定範例 JSON

下列範例JSON任務會將MP4檔案轉換為另一個以 H.265 編碼的 720p MP4 檔案。若要使用這個範例,請使用您的值取代設定。您至少必須提供下列設定值:

  • Role:這是 AWS Identity and Access Management 您設定的 (IAM) 角色,用於授予 AWS Elemental 存取輸入和輸出 Amazon S3 儲存貯體的 MediaConvert 許可,以及代表您存取 Amazon API Gateway。如需有關設定此角色的資訊,請參閱 AWS Elemental MediaConvert 使用者指南 中的設定IAM許可

  • 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://amzn-s3-demo-bucket1/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://amzn-s3-demo-bucket/SampleVideo_h264_StereoAudio.mp4" } ] } }