public CreateJob ( |
||
request | Container for the necessary parameters to execute the CreateJob service method. | |
Résultat |
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" }) }); }