【发布时间】:2020-09-18 17:15:42
【问题描述】:
我有将 mp3 上传文件编码为各种格式的 mediaconvert 作业。我还想通过修剪文件以从 10 秒开始并在 40 秒结束来创建 30 秒的 mp3 文件“预览”。
我尝试通过添加如下时间码引用来设置“输入剪辑”,但它似乎被完全忽略并编码了整个文件。也许这是因为 mp3 文件没有严格的时间码?这些设置在我的 Input json (PHP SDK) 中:
"Inputs": [
{
"AudioSelectors": {
"Audio Selector 1": {
"Offset": 0,
"DefaultSelection": "DEFAULT",
"SelectorType": "TRACK",
"ProgramSelection": 1
}
},
"FilterEnable": "AUTO",
"PsiControl": "USE_PSI",
"FilterStrength": 0,
"DeblockFilter": "DISABLED",
"DenoiseFilter": "DISABLED",
"TimecodeSource": "EMBEDDED",
"FileInput": "'$file'",
"InputClippings": [
{
"EndTimecode": "00:00:45:00",
"StartTimecode": "00:00:20:00"
}
]
}
]
我也尝试过以这种格式添加输入剪辑:
"inputs": [
{
"inputClippings": [
{
"endTimecode": "00:00:40:00",
"startTimecode": "00:00:10:00"
}
],
"audioSelectors": {
},
【问题讨论】:
-
我没有使用过 AWS MediaConvert,但肯定可以使用 Amazon Elastic Transcoding Service。有关Clip Stitching 创建新视频的示例,请参见:Automated video editing with YOU as the star! | AWS Machine Learning Blog
标签: json amazon-web-services aws-php-sdk aws-media-convert