我正在从事一个项目,该项目要求通过使用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存储桶,并添加了一些策略以使文件公开。

最佳答案

显然我的虚拟机未连接到Internet,这就是抛出nameresolutionfailure的原因。现在一切都很好。

10-01 01:05