简体   繁体   English

如何在 AWS Elastic transcoder CLI 中添加多个输入?

[英]How to add Multiple inputs in AWS Elastic transcoder CLI?

I am trying to stitch two clips with AWS Elastic Transcoder CLI, but I am getting error.我正在尝试使用 AWS Elastic Transcoder CLI 拼接两个剪辑,但出现错误。

My command: 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}]我的命令: 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}]

I am getting this error:我收到此错误:

Parameter validation failed: Invalid type for parameter Inputs[0].Key, value: ['MEYD-001.mp4', 'intro.mp4'], type: <class 'list'>, valid types: <class 'str'>参数验证失败:参数 Inputs[0].Key 的类型无效,值:['MEYD-001.mp4','intro.mp4'],类型:<class 'list'>,有效类型:<class 'str' >

How can I ADD Multiple inputs[videos] in AWS Elastic transcoder CLI?如何在 AWS Elastic transcoder CLI 中添加多个输入[视频]? AWS docs is lacking this. AWS 文档缺少这一点。

Best Regards.此致。

@akamai - i was wrong. @akamai - 我错了。 ET does allow you to stitch clips in a single operation. ET确实允许您在一次操作中缝合剪辑。 I think your issue is your using the shortcut syntax and not passing a JSON array.我认为您的问题是您使用快捷语法而不是传递 JSON 数组。

Try updating your command from尝试从更新您的命令

Key=movie1.mp4,movie2.mp4

to

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

You may need some additional parameters to get the desired result.您可能需要一些额外的参数来获得所需的结果。 You can use the AWS command to generate a template to guide you like this: aws elastictranscoder create-job --generate-cli-skeleton .您可以使用 AWS 命令生成模板来指导您,如下所示: aws elastictranscoder create-job --generate-cli-skeleton That will output a JSON string with every available property of the command.这将 output 一个 JSON 字符串与命令的每个可用属性。 If you look at the Inputs section below, its defined as an array: "Inputs": [ .如果您查看下面的 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": ""
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM