0

我的简单问题是如何在创建作业时设置预设。我正在为 java 使用 aws sdk。我正在学习 Elastic Transcoder Web 服务。同样,我在网上找不到任何教程,所以我不得不自己冒险。但我被困在这一点上。以下是代码 -

public void createJob () {
    final CreateJobRequest createJobRequest = new CreateJobRequest();
    createJobRequest.setPipelineId(createPipelineResult.getPipeline().getId());
    createJobRequest.setOutputKeyPrefix("transcoded.mp3");
    amazonElasticTranscoderClient.createJob(createJobRequest);
}  

如果我们从 UI 开始,这部分属于“输出详细信息”。所以我的猜测是我们可以使用 CreateJobRequest 类的 setOutput(CreateJobOutput) 方法来设置它,但我找不到合适的方法。任何帮助表示赞赏。

4

1 回答 1

2

AWS Transcoder already has some presets created for us to use. You can check if any of those suits your need, if not then you'll have to create your own preset using CreatePresetRequest.

Once you have the preset, you'll have to set it in job output object. Following is the pseudo code :

CreateJobOutput jobOutput = new CreateJobOutput();

jobOutput.setPresetId("1351620000001-000001");//can use already created presets jobReq.setOutput(jobOutput);

jobReq is the CreateJobRequest.

于 2014-06-24T05:54:22.650 回答