0

我正在尝试使用 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].Key 的类型无效,值:['MEYD-001.mp4','intro.mp4'],类型:<class 'list'>,有效类型:<class 'str' >

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

此致。

4

1 回答 1

0

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

尝试从更新您的命令

Key=movie1.mp4,movie2.mp4

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

您可能需要一些额外的参数来获得所需的结果。您可以使用 AWS 命令​​生成模板来指导您,如下所示: aws elastictranscoder create-job --generate-cli-skeleton. 这将输出一个带有命令的每个可用属性的 JSON 字符串。如果您查看下面的 Inputs 部分,它被定义为一个数组:"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": ""
    }
}
于 2020-07-14T17:17:22.957 回答