我正在开发一个项目,该项目需要对视频进行转码,并通过使用AWS Elastic Transcoder提取缩略图。我已经尽可能地遵循api并且在我看来正确的代码。但是,我仍然会收到NameResolutionFailure
抛出的错误和一个内部异常,说The remote name could not be resolved: 'elastictranscoder.us-west-2.amazonaws.com'
我的代码是:
var transcoder =
new AmazonElasticTranscoderClient(Constants.AmazonS3AccessKey,
Constants.AmazonS3SecretKey, RegionEndpoint.USWest2);
var ji = new JobInput
{
AspectRatio = "auto",
Container = "mov",
FrameRate = "auto",
Interlaced = "auto",
Resolution = "auto",
Key = filename
};
var output = new CreateJobOutput
{
ThumbnailPattern = filename + "_{count}",
Rotate = "auto",
PresetId = "1351620000001-000010",
Key = filename + "_enc.mp4"
};
var createJob = new CreateJobRequest
{
Input = ji,
Output = output,
PipelineId = "1413517673900-39qstm"
};
transcoder.CreateJob(createJob);
我在俄勒冈州配置了我的s3存储桶,并添加了使文件公开的策略。
答案 0 :(得分:0)
显然我的虚拟机没有连接到互联网,这就是nameresolutionfailure
被抛出的原因。一切都很好。