如何在AWS Elastic转码器CLI中添加多个输入



我试图用AWS Elastic Transcoder CLI缝合两个片段,但我遇到了错误。

我的命令:aws elastictranscoder create-job --pipeline-id 158182938949-p2e73l --inputs Key=movie1.mp4,movie2.mp4 --outputs Key=complete-mov.mp4,PresetId=159474848914704-fupili,Watermarks=[{PresetWatermarkId=TopLeft,InputKey=Untitled-4png.png}]

我得到这个错误:

参数验证失败:参数Inputs[0]的类型无效。键,值:['MEYD-001.mp4','intro.mp4'],类型:<类"列表">,有效类型:<类"str">

如何在AWS Elastic转码器CLI中添加多个输入[视频]?AWS文档缺少这一点。

谨致问候。

@akamai-我错了。ET允许您在一次操作中缝合夹子。我认为您的问题是使用快捷方式语法而不传递JSON数组。

尝试从更新您的命令

Key=movie1.mp4,movie2.mp4

'[{"Key"="movie1.mp4"},{"Key"="movie2.mp4"}]'

您可能需要一些额外的参数来获得所需的结果。您可以使用AWS命令生成一个模板来指导您,如下所示:aws elastictranscoder create-job --generate-cli-skeleton。这将输出一个JSON字符串,其中包含命令的每个可用属性。如果您查看下面的输入部分,它被定义为一个数组:"Inputs": [

myname@mypc:~$ aws elastictranscoder create-job --generate-cli-skeleton
{
"PipelineId": "",
"Input": {
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
},
"TimeSpan": {
"StartTime": "",
"Duration": ""
},
"InputCaptions": {
"MergePolicy": "",
"CaptionSources": [
{
"Key": "",
"Language": "",
"TimeOffset": "",
"Label": "",
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
}
}
]
},
"DetectedProperties": {
"Width": 0,
"Height": 0,
"FrameRate": "",
"FileSize": 0,
"DurationMillis": 0
}
},
"Inputs": [
{
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
},
"TimeSpan": {
"StartTime": "",
"Duration": ""
},
"InputCaptions": {
"MergePolicy": "",
"CaptionSources": [
{
"Key": "",
"Language": "",
"TimeOffset": "",
"Label": "",
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
}
}
]
},
"DetectedProperties": {
"Width": 0,
"Height": 0,
"FrameRate": "",
"FileSize": 0,
"DurationMillis": 0
}
}
],
"Output": {
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
},
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": [
{
"PresetWatermarkId": "",
"InputKey": "",
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
}
}
],
"AlbumArt": {
"MergePolicy": "",
"Artwork": [
{
"InputKey": "",
"MaxWidth": "",
"MaxHeight": "",
"SizingPolicy": "",
"PaddingPolicy": "",
"AlbumArtFormat": "",
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
}
}
]
},
"Composition": [
{
"TimeSpan": {
"StartTime": "",
"Duration": ""
}
}
],
"Captions": {
"MergePolicy": "",
"CaptionSources": [
{
"Key": "",
"Language": "",
"TimeOffset": "",
"Label": "",
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
}
}
],
"CaptionFormats": [
{
"Format": "",
"Pattern": "",
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
}
}
]
},
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
}
},
"Outputs": [
{
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
},
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": [
{
"PresetWatermarkId": "",
"InputKey": "",
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
}
}
],
"AlbumArt": {
"MergePolicy": "",
"Artwork": [
{
"InputKey": "",
"MaxWidth": "",
"MaxHeight": "",
"SizingPolicy": "",
"PaddingPolicy": "",
"AlbumArtFormat": "",
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
}
}
]
},
"Composition": [
{
"TimeSpan": {
"StartTime": "",
"Duration": ""
}
}
],
"Captions": {
"MergePolicy": "",
"CaptionSources": [
{
"Key": "",
"Language": "",
"TimeOffset": "",
"Label": "",
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
}
}
],
"CaptionFormats": [
{
"Format": "",
"Pattern": "",
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
}
}
]
},
"Encryption": {
"Mode": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": ""
}
}
],
"OutputKeyPrefix": "",
"Playlists": [
{
"Name": "",
"Format": "",
"OutputKeys": [
""
],
"HlsContentProtection": {
"Method": "",
"Key": "",
"KeyMd5": "",
"InitializationVector": "",
"LicenseAcquisitionUrl": "",
"KeyStoragePolicy": ""
},
"PlayReadyDrm": {
"Format": "",
"Key": "",
"KeyMd5": "",
"KeyId": "",
"InitializationVector": "",
"LicenseAcquisitionUrl": ""
}
}
],
"UserMetadata": {
"KeyName": ""
}
}

相关内容

  • 没有找到相关文章

最新更新