I'm trying to write a Go code to create a job on MediaConvert that take as input an MP4 video, some MP3 used as different audio track and some SRT file used for captions.
My Go code generated this JSON that is sent to AWS:
{
"clientRequestToken": "---",
"role": "---",
"settings": {
"inputs": [{
"audioSelectors": {
"ENG": {
"defaultSelection": "NOT_DEFAULT",
"externalAudioFileInput": "s3://mybucket/test/sample1.mp3",
"languageCode": "ENG",
"offset": 0,
"programSelection": 1,
"selectorType": "TRACK"
},
"SPA": {
"defaultSelection": "NOT_DEFAULT",
"externalAudioFileInput": "s3://mybucket/test/sample3.mp3",
"languageCode": "SPA",
"offset": 0,
"programSelection": 1,
"selectorType": "TRACK"
},
"floor": {
"defaultSelection": "DEFAULT",
"offset": 0,
"programSelection": 1
}
},
"captionSelectors": {
"ENG": {
"languageCode": "ENG",
"sourceSettings": {
"fileSourceSettings": {
"sourceFile": "s3://mybucket/test/eng.srt"
},
"sourceType": "SRT"
}
},
"SPA": {
"languageCode": "SPA",
"sourceSettings": {
"fileSourceSettings": {
"sourceFile": "s3://mybucket/test/spa.srt"
},
"sourceType": "SRT"
}
}
},
"deblockFilter": "DISABLED",
"denoiseFilter": "DISABLED",
"fileInput": "s3://mybucket/test/video.mp4",
"filterEnable": "AUTO",
"psiControl": "USE_PSI",
"timecodeSource": "EMBEDDED",
"videoSelector": {
"alphaBehavior": "DISCARD",
"colorSpace": "FOLLOW",
"rotate": "DEGREE_0"
}
}],
"outputGroups": [{
"name": "Apple HLS",
"outputGroupSettings": {
"hlsGroupSettings": {
"captionLanguageSetting": "OMIT",
"clientCache": "ENABLED",
"codecSpecification": "RFC_4281",
"destination": "s3://mybucket/1/encoded",
"directoryStructure": "SINGLE_DIRECTORY",
"manifestCompression": "NONE",
"manifestDurationFormat": "INTEGER",
"minSegmentLength": 0,
"outputSelection": "MANIFESTS_AND_SEGMENTS",
"programDateTime": "EXCLUDE",
"programDateTimePeriod": 600,
"segmentControl": "SEGMENTED_FILES",
"segmentLength": 5,
"streamInfResolution": "INCLUDE",
"timedMetadataId3Period": 10
},
"type": "HLS_GROUP_SETTINGS"
},
"outputs": [{
"audioDescriptions": [{
"audioSourceName": "floor",
"codecSettings": {
"aacSettings": {
"audioDescriptionBroadcasterMix": "NORMAL",
"bitrate": 96000,
"codecProfile": "LC",
"codingMode": "CODING_MODE_2_0",
"rateControlMode": "CBR",
"rawFormat": "NONE",
"sampleRate": 48000,
"specification": "MPEG4"
},
"codec": "AAC"
},
"languageCode": "FOLLOW_INPUT"
},
{
"audioSourceName": "ENG",
"codecSettings": {
"aacSettings": {
"audioDescriptionBroadcasterMix": "NORMAL",
"bitrate": 96000,
"codecProfile": "LC",
"codingMode": "CODING_MODE_2_0",
"rateControlMode": "CBR",
"rawFormat": "NONE",
"sampleRate": 48000,
"specification": "MPEG4"
},
"codec": "AAC"
},
"languageCode": "FOLLOW_INPUT"
},
{
"audioSourceName": "SPA",
"codecSettings": {
"aacSettings": {
"audioDescriptionBroadcasterMix": "NORMAL",
"bitrate": 96000,
"codecProfile": "LC",
"codingMode": "CODING_MODE_2_0",
"rateControlMode": "CBR",
"rawFormat": "NONE",
"sampleRate": 48000,
"specification": "MPEG4"
},
"codec": "AAC"
},
"languageCode": "FOLLOW_INPUT"
}
],
"captionDescriptions": [{
"captionSelectorName": "ENG",
"destinationSettings": {
"destinationType": "EMBEDDED"
}
},
{
"captionSelectorName": "SPA",
"destinationSettings": {
"destinationType": "EMBEDDED"
}
}
],
"containerSettings": {
"container": "M3U8",
"m3u8Settings": {}
},
"extension": "m3u8",
"nameModifier": "1",
"outputSettings": {
"hlsSettings": {
"audioGroupId": "program_audio",
"audioOnlyContainer": "AUTOMATIC",
"iFrameOnlyManifest": "EXCLUDE"
}
},
"videoDescription": {
"afdSignaling": "NONE",
"antiAlias": "ENABLED",
"codecSettings": {
"codec": "H_264",
"h264Settings": {
"adaptiveQuantization": "HIGH",
"codecLevel": "AUTO",
"codecProfile": "MAIN",
"dynamicSubGop": "STATIC",
"entropyEncoding": "CABAC",
"fieldEncoding": "PAFF",
"flickerAdaptiveQuantization": "DISABLED",
"framerateControl": "INITIALIZE_FROM_SOURCE",
"framerateConversionAlgorithm": "DUPLICATE_DROP",
"gopBReference": "DISABLED",
"gopClosedCadence": 0,
"gopSize": 90,
"gopSizeUnits": "FRAMES",
"interlaceMode": "PROGRESSIVE",
"maxBitrate": 5000000,
"minIInterval": 0,
"numberBFramesBetweenReferenceFrames": 2,
"numberReferenceFrames": 3,
"parControl": "INITIALIZE_FROM_SOURCE",
"qualityTuningLevel": "SINGLE_PASS",
"rateControlMode": "QVBR",
"repeatPps": "DISABLED",
"sceneChangeDetect": "ENABLED",
"slices": 1,
"slowPal": "DISABLED",
"softness": 0,
"spatialAdaptiveQuantization": "ENABLED",
"syntax": "DEFAULT",
"telecine": "NONE",
"temporalAdaptiveQuantization": "ENABLED",
"unregisteredSeiTimecode": "DISABLED"
}
},
"colorMetadata": "INSERT",
"dropFrameTimecode": "ENABLED",
"respondToAfd": "NONE",
"scalingBehavior": "DEFAULT",
"sharpness": 50,
"timecodeInsertion": "DISABLED"
}
}]
}],
"timecodeConfig": {
"source": "ZEROBASED"
}
},
"tags": {
"Env": "dev"
}
}
My problem is that rest api return error 400 bad request with message:
"message" : "The request could not be interpreted.","settingsValidationErrorsJsonBlob" : ""
Can someone gives me some advice to understand which could be the problem?
Thank you!