CreateJob() 공개 메소드

When you create a job, Elastic Transcoder returns JSON data that includes the values that you specified plus information about the job that is created.

If you have specified more than one output for your jobs (for example, one output for the Kindle Fire and another output for the Apple iPhone 4s), you currently must use the Elastic Transcoder API to list the jobs (as opposed to the AWS Console).

/// General authentication failure. The request was not signed correctly. /// /// /// /// Elastic Transcoder encountered an unexpected exception while trying to fulfill the /// request. /// /// Too many operations for a given AWS account. For example, the number of pipelines /// exceeds the maximum allowed. /// /// The requested resource does not exist or is not available. For example, the pipeline /// to which you're trying to add a job doesn't exist or is still being created. /// /// One or more required parameter values were not provided in the request. ///
public CreateJob ( CreateJobRequest request ) : CreateJobResponse
request Amazon.ElasticTranscoder.Model.CreateJobRequest Container for the necessary parameters to execute the CreateJob service method.
리턴 Amazon.ElasticTranscoder.Model.CreateJobResponse
예제 #1
0
    public static void Transcode(string inputS3Key,string outputS3Key, string bucketName)
    {
        var email = "*****@*****.**";

            // Create a topic the the pipeline to used for notifications
            var topicArn = CreateTopic(email);

            // Create the IAM role for the pipeline
            var role = CreateIamRole();

            var etsClient = new AmazonElasticTranscoderClient();

            var notifications = new Notifications()
            {
                Completed = topicArn,
                Error = topicArn,
                Progressing = topicArn,
                Warning = topicArn
            };

            // Create the Elastic Transcoder pipeline for transcoding jobs to be submitted to.
            //var pipeline = etsClient.CreatePipeline(new CreatePipelineRequest
            //{
            //    Name = "MyVideos" + UNIQUE_POSTFIX,
            //    InputBucket = bucketName,
            //    OutputBucket = bucketName,
            //    Notifications = notifications,
            //    Role = role.Arn
            //}).Pipeline;
            var listPipeLines = etsClient.ListPipelines();
            var pipeline=listPipeLines.Pipelines[0];

            // Create a job to transcode the input file
            etsClient.CreateJob(new CreateJobRequest
            {
                PipelineId = pipeline.Id,
                Input = new JobInput
                {
                    AspectRatio = "auto",
                    Container = "auto",
                    FrameRate = "auto",
                    Interlaced = "auto",
                    Resolution = "auto",
                    Key = inputS3Key
                },
                Output =( new CreateJobOutput
                {
                    ThumbnailPattern = "",
                    Rotate = "0",
                    // Generic 720p: Go to http://docs.aws.amazon.com/elastictranscoder/latest/developerguide/create-job.html#PresetId to see a list of some
                    // of the support presets or call the ListPresets operation to get the full list of available presets
                    PresetId = "1351620000000-100010",
                    Key = outputS3Key.Substring(0,outputS3Key.LastIndexOf("."))+".mp4"

                })
            });
    }