如何在AWS Elastic转码器CLI中添加多个输入? [英] How to add Multiple inputs in AWS Elastic transcoder CLI?
本文介绍了如何在AWS Elastic转码器CLI中添加多个输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用AWS弹性代码转换器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}]
我收到此错误:
参数验证失败: 参数输入[0]的类型无效。键,值:[‘MEYD-001.mp4’,‘Intro.mp4’],类型:<;class‘list’>;,有效类型:<;class‘str’>;如何在AWS Elastic代码转换器CLI中添加多个输入[视频]? AWS文档缺少此功能。
致以最诚挚的问候。
推荐答案
@Akamai-i错了。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": ""
}
}
这篇关于如何在AWS Elastic转码器CLI中添加多个输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文