AWS Elemental MediaConvert 视频文件修剪开始和结束持续时间

AWS Elemental MediaConvert Video File trimming start and end duration

只是想知道当用户通过 JavaScript

上传视频文件时,我如何处理来自 AWS Elemental MediaConvert 的视频剪辑

MediaConvert 要求您将 SDK 设置为使用特定的 API 输入 [1,2]

JavaScript SDK 文档 [3] 指出了如何使用 JS SDK 在 MeidaConvert 中定义和创建作业。为了完成输入剪辑,您需要将 InputClippings 选项添加到 Input JSON 块。示例如下:

"Inputs": [
      {
        "AudioSelectors": {
          "Audio Selector 1": {
            "Offset": 0,
            "DefaultSelection": "NOT_DEFAULT",
            "ProgramSelection": 1,
            "SelectorType": "TRACK",
            "Tracks": [
              1
            ]
          }
        },
        "VideoSelector": {
          "ColorSpace": "FOLLOW"
        },
        "FilterEnable": "AUTO",
        "PsiControl": "USE_PSI",
        "FilterStrength": 0,
        "DeblockFilter": "DISABLED",
        "DenoiseFilter": "DISABLED",
        "TimecodeSource": "ZEROBASED",
        "FileInput": "s3://INPUT_BUCKET_AND_FILE_NAME",
        "InputClippings": [
          {
            "StartTimecode": "00:00:00:00",
            "EndTimecode": "00:05:00:00"
          }
        ]
      }
    ]

请记住,TimecodeSource 会影响剪裁区域。如果您知道您的用户上传的源文件包含嵌入式时间码,您可以将其更改为 EMBEDDED,有关更多信息,请参阅文档 [4]

== 资源 ==
[1] https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/emc-examples-jobs.html#emc-examples-jobs-configure-sdk
[2] https://docs.aws.amazon.com/mediaconvert/latest/apireference/custom-endpoints.html
[3]https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/emc-examples-jobs.html#emc-examples-jobs-spec
[4] https://docs.aws.amazon.com/mediaconvert/latest/ug/setting-up-an-assembly-workflow-job.html