작업 만들기 - Amazon Elastic Transcoder

비용을 절감하고 더 많은 기능을 확보하십시오. AWS Elemental MediaConvert

MediaConvert 는 포괄적인 고급 트랜스코딩 기능을 제공하는 최신 파일 기반 비디오 트랜스코딩 서비스로, 온디맨드 요금은 분당 0.0075달러부터 시작합니다. 자세한 내용을 읽어보세요.

이미 Amazon Elastic Transcoder를 사용하고 계신가요? MediaConvert마이그레이션하는 방법은 간단합니다. 자세한 내용은 마이그레이션 프로세스에 대한 중요한 정보와 추가 리소스 링크가 포함된 이 개요를 참조하세요.

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

작업 만들기

설명

작업을 만들려면 /2012-09-25/jobs 리소스에 POST 요청을 보냅니다. 작업은 만드는 즉시 시작됩니다.

참고

작업의 상태가 변경되거나(Elastic Transcoder가 작업 처리를 시작 및 종료하는 경우 등) Elastic Transcoder에 경고 또는 오류 조건이 발생하면 이를 알리도록 Elastic Transcoder를 구성할 수 있습니다. 자세한 내용은 파이프라인 생성 섹션을 참조하세요.

요청

조건

POST /2012-09-25/jobs HTTP/1.1 Content-Type: application/json; charset=UTF-8 Accept: */* Host: elastictranscoder.Elastic Transcoder endpoint.amazonaws.com:443 x-amz-date: 20130114T174952Z Authorization: AWS4-HMAC-SHA256 Credential=AccessKeyID/request-date/Elastic Transcoder endpoint/elastictranscoder/aws4_request, SignedHeaders=host;x-amz-date;x-amz-target, Signature=calculated-signature Content-Length: number of characters in the JSON string { "Inputs":[{ "Key":"name of the file to transcode", "Encryption":{ "Mode":"aes-cbc-pkcs7|aes-ctr|aes-gcm", "Key":"encrypted and base64-encoded decryption key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector" }, "TimeSpan":{ "StartTime":"starting place of the clip, in HH:mm:ss.SSS or sssss.SSS", "Duration":"duration of the clip, in HH:mm:ss.SSS or sssss.SSS" }, "FrameRate":"auto|10|15|23.97|24|25|29.97|30|50|60", "Resolution":"auto", "AspectRatio":"auto|1:1|4:3|3:2|16:9", "Interlaced":"auto|true|false", "Container":"auto|aac|asf|avi|divx|flv|m4a|mkv|mov|mp2|mp3| mp4|mpeg|mpeg-ps|mpeg-ts|mxf|ogg|vob|wav|webm", "InputCaptions":{ "MergePolicy":"MergeOverride|MergeRetain|Override", "CaptionSources":[ { "Key":"name of the input caption file", "Encryption":{ "Mode":"aes-cbc-pkcs7|aes-ctr|aes-gcm", "Key":"encrypted and base64-encoded encryption key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector" }, "Language":"language of the input caption file", "TimeOffset":"starting place of the captions, in either [-+]SS.sss or [-+]HH:mm:SS.ss", "Label":"label for the caption" }, {...} ] } }, {...} ] "OutputKeyPrefix":"prefix for file names in Amazon S3 bucket", "Outputs":[{ "Key":"name of the transcoded file", "Encryption":{ "Mode":"s3||aes-cbc-pkcs7|aes-ctr| aes-gcm", "Key":"encrypted and base64-encoded encryption key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector" }, "ThumbnailPattern":""|"pattern", "Rotate":"auto|0|90|180|270", "PresetId":"preset to use for the job", "SegmentDuration":"[1,60]", "Watermarks":[ { "InputKey":"name of the .png or .jpg file", "Encryption":{ "Mode":"s3||aes-cbc-pkcs7| aes-ctr|aes-gcm", "Key":"encrypted and base64-encoded encryption key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector" }, "PresetWatermarkId":"value of Video:Watermarks:Id in preset" }, {...} ], "AlbumArt":[ { "AlbumArtMerge":"Replace|Prepend|Append|Fallback", "AlbumArtArtwork":"can be empty, but not null":[ { "AlbumArtInputKey":"name of the file to use as album art", "Encryption":{ "Mode":"s3||aes-cbc-pkcs7| aes-ctr|aes-gcm", "Key":"encrypted and base64-encoded encryption key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector" }, "AlbumArtMaxWidth":"maximum width of output album art in pixels", "AlbumArtMaxHeight":"maximum height of output album art in pixels", "AlbumArtSizingPolicy":"Fit|Fill|Stretch|Keep| ShrinkToFit|ShrinkToFill", "AlbumArtPaddingPolicy":"Pad|NoPad", "AlbumArtFormat":"jpg|png" }, {...} ] }, {...} ], "Captions":{ "CaptionFormats":[ { "Format":"cea-708|dfxp|mov-text|scc|srt|webvtt", "Pattern":"myCaption/file-language", "Encryption":{ "Mode":"s3||aes-cbc-pkcs7| aes-ctr|aes-gcm", "Key":"encrypted and base64-encoded encryption key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector" } }, {...} ] } }, {...}], "Playlists":[{ "Format":"HLSv3|HLSv4|MPEG-DASH|Smooth", "Name":"name", "OutputKeys":[ "Outputs:Key to include in this playlist", ... ], "HlsContentProtection":{ "Method":"aes-128", "Key":"encrypted and base64-encoded protection key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector", "LicenseAcquisitionUrl":"license acquisition url", "KeyStoragePolicy":"NoStore|WithVariantPlaylists" }, "PlayReadyDrm":{ "Format":"microsoft|discretix-3.0", "Key":"encrypted and base64-encoded DRM key", "KeyId":"id of the DRM key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector", "LicenseAcquisitionUrl":"license acquisition url" } }, {...}], "UserMetadata": { "Key":"Value", "Second user metadata key":"Second user metadata value" }, "PipelineId":"pipeline to use for transcoding" }

요청 파라미터

이 작업은 요청 파라미터를 사용하지 않습니다.

요청 헤더

이 작업은 모든 작업에 일반적인 요청 헤더만 사용합니다. 일반적인 요청 헤더에 대한 내용은 HTTP 헤더 콘텐츠 섹션을 참조하세요.

요청 본문

요청 본문의 JSON 문자열에는 CreateJob 작업에 대한 입력 객체가 포함되어 있습니다. 입력 객체에 대한 자세한 내용은 Elastic Transcoder 작업을 만들 때 지정하는 설정 섹션을 참조하세요.

응답

조건

Status: 201 Created x-amzn-RequestId: c321ec43-378e-11e2-8e4c-4d5b971203e9 Content-Type: application/json Content-Length: number of characters in the response Date: Mon, 14 Jan 2013 06:01:47 GMT { "Job":{ "Id":"Id that Elastic Transcoder assigns to the job", "Inputs":[{ "Key":"name of the file to transcode", "Encryption":{ "Mode":"aes-cbc-pkcs7|aes-ctr|aes-gcm", "Key":"encrypted and base64-encoded decryption key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector" }, "TimeSpan":{ "StartTime":"starting place of the clip, in HH:mm:ss.SSS or sssss.SSS", "Duration":"duration of the clip, in HH:mm:ss.SSS or sssss.SSS" }, "FrameRate":"auto|10|15|23.97|24|25|29.97|30|50|60", "Resolution":"auto|width in pixelsxheight in pixels", "AspectRatio":"auto|1:1|4:3|3:2|16:9", "Interlaced":"auto|true|false", "Container":"auto|aac|asf|avi|divx|flv|m4a|mkv|mov|mp2|mp3| mp4|mpeg|mpeg-ps|mpeg-ts|mxf|ogg|vob|wav|webm", "InputCaptions":{ "MergePolicy":"MergeOverride|MergeRetain|Override", "CaptionSources":[ { "Key":"name of the input caption file", "Language":"language of the input caption file", "TimeOffset":"starting place of the captions, in either [-+]SS.sss or [-+]HH:mm:SS.ss", "Label":"label for the caption" "Encryption":{ "Mode":"aes-cbc-pkcs7|aes-ctr|aes-gcm", "Key":"encrypted and base64-encoded decryption key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector" }, }, {...} ] } }, {...}], "OutputKeyPrefix":"prefix for file names in Amazon S3 bucket", "Outputs":[{ "Id":"sequential counter", "Key":"name of the transcoded file", "Encryption":{ "Mode":"s3||aes-cbc-pkcs7|aes-ctr| aes-gcm", "Key":"encrypted and base64-encoded encryption key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector" }, "ThumbnailPattern":""|"pattern", "Rotate":"auto|0|90|180|270", "PresetId":"preset to use for the job", "SegmentDuration":"[1,60]", "Watermarks":[ { "InputKey":"name of the .png or .jpg file", "Encryption":{ "Mode":"s3||aes-cbc-pkcs7| aes-ctr|aes-gcm", "Key":"encrypted and base64-encoded encryption key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector" }, "PresetWatermarkId":"value of Video:Watermarks:Id in preset" }, {...} ], "AlbumArt":[ { "AlbumArtMerge":"Replace|Prepend|Append|Fallback", "AlbumArtArtwork":"can be empty, but not null":[ { "AlbumArtInputKey":"name of the file to use as album art", "Encryption":{ "Mode":"s3||aes-cbc-pkcs7| aes-ctr|aes-gcm", "Key":"encrypted and base64-encoded encryption key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector" }, "AlbumArtMaxWidth":"maximum width of output album art in pixels", "AlbumArtMaxHeight":"maximum height of output album art in pixels", "AlbumArtSizingPolicy":"Fit|Fill|Stretch|Keep| ShrinkToFit|ShrinkToFill", "AlbumArtPaddingPolicy":"Pad|NoPad", "AlbumArtFormat":"jpg|png" }, {...} ] }, {...} ], "Duration":"duration in seconds", "Width":"width in pixels", "Height":"height in pixels", "Status":"Submitted|Progressing|Complete|Canceled|Error", "StatusDetail":"additional information about job status", "Captions":{ "CaptionFormats":[ { "Format":"cea-708|dfxp|mov-text|scc|srt|webvtt", "Pattern":"myCaption/file-language", "Encryption":{ "Mode":"s3||aes-cbc-pkcs7| aes-ctr|aes-gcm", "Key":"encrypted and base64-encoded encryption key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector" } }, {...} ] }, "AppliedColorSpaceConversion":"None|Bt601ToBt709| Bt709ToBt601" }, {...} ], "Playlists":[ { "Format":"HLSv3|HLSv4|MPEG-DASH|Smooth", "Name":"name", "OutputKeys":[ "Outputs:Key to include in this playlist", ... ], "HlsContentProtection":{ "Method":"aes-128", "Key":"encrypted and base64-encoded protection key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector", "LicenseAcquisitionUrl":"license acquisition url", "KeyStoragePolicy":"NoStore|WithVariantPlaylists" }, "PlayReadyDrm":{ "Format":"microsoft|discretix-3.0", "Key":"encrypted and base64-encoded DRM key", "KeyId":"id of the DRM key", "KeyMd5":"base64-encoded key digest", "InitializationVector":"base64-encoded initialization vector", "LicenseAcquisitionUrl":"license acquisition url" } }, {...} ], "UserMetadata":{ "key1":"First user metadata value", "key2":"Second user metadata value" }, "PipelineId":"pipeline to add the job to", "Status":"Submitted|Progressing|Complete|Canceled|Error" } }

응답 헤더

이 작업은 대부분의 응답에 일반적인 응답 헤더만 사용합니다. 일반적인 응답 헤더에 대한 내용은 HTTP 응답 섹션을 참조하세요.

응답 본문

작업을 만들면 Elastic Transcoder는 사용자가 요청에 지정한 값을 반환합니다. 자세한 내용은 Elastic Transcoder 작업을 만들 때 지정하는 설정 섹션을 참조하세요.

또한 Elastic Transcoder는 다음 값을 반환합니다.

(자동) Id

Elastic Transcoder가 작업에 할당한 식별자입니다. 이 값을 사용하여 작업의 설정을 가져오거나 작업을 삭제합니다.

(자동) Outputs:Id

현재 작업의 출력 중에서 출력을 식별하는 1부터 시작하는 순차 카운터. Output 구문에서 이 값은 항상 1입니다.

(자동) Outputs:Duration

출력 파일의 지속 시간(초)으로, 반올림됩니다.

(자동) Outputs:Width

출력 파일의 너비(픽셀)입니다.

(자동) Outputs:Height

출력 파일의 높이(픽셀)입니다.

(자동) Outputs:Status

작업 내 단일 출력의 상태. 작업에 지정한 출력이 하나뿐일 경우 Outputs:Status는 항상 Job:Status와 동일합니다. 여러 개의 출력을 지정한 경우:

  • Elastic Transcoder가 첫 번째 출력을 처리하기 시작할 때까지 모든 출력의 Job:StatusOutputs:StatusSubmitted입니다.

  • Elastic Transcoder가 첫 번째 출력을 처리하기 시작하면 해당 출력의 Outputs:StatusJob:Status가 모두 Progressing으로 바뀝니다. 각 출력에서 Outputs:Status 값은 Elastic Transcoder가 해당 출력을 처리하기 시작할 때까지 Submitted를 유지합니다.

  • 모든 출력이 최종 상태(Job:Status 또는 Progressing)에 도달할 때까지 CompleteError을 유지합니다.

  • 모든 출력이 최종 상태에 도달하면 모든 출력의 Job:StatusComplete인 경우에만 Outputs:StatusComplete로 바뀝니다. 하나 이상의 출력에서 Outputs:StatusError일 경우Job:Status의 최종 상태도 Error입니다.

Status 값은 다음 중 하나입니다. Submitted, Progressing, Complete, Canceled 또는 Error.

(자동) Outputs:StatusDetail

Outputs:Status를 더 자세히 설명하는 정보입니다.

(자동) Outputs:AppliedColorSpaceConversion

Elastic Transcoder가 ColorSpaceConversionMode를 포함한 프리셋을 사용하여 출력 파일을 트랜스코딩한 경우 AppliedColorSpaceConversion 파라미터가 사용된 변환을 표시합니다. 프리셋에 ColorSpaceConversionMode가 정의되지 않은 경우 이 파라미터는 작업 응답에 포함되지 않습니다.

(자동) Status

작업에 여러 개의 출력을 지정한 경우 전체 작업의 상태. Elastic Transcoder가 작업을 처리하기 시작하면 Job:StatusProgressing으로 바뀐 후 Elastic Transcoder가 모든 출력을 처리할 때까지 바뀌지 않습니다. 처리가 완료되면 Job:StatusComplete로 바뀌거나, 실패한 출력이 있을 경우 Error로 바뀝니다.

작업에 지정한 출력이 하나뿐일 경우 Job:StatusOutputs:Status와 동일합니다.

Job:Status 값은 다음 중 하나입니다. Submitted, Progressing, Complete, Canceled 또는 Error.

오류

Elastic Transcoder 예외 및 오류 메시지에 대한 자세한 내용은 Elastic Transcoder에서의 오류 처리 섹션을 참조하세요.

참고

작업이 Access Denied 오류로 인해 실패한 경우, Test Role API 작업을 실행하여 오류의 원인을 확인하는 것이 좋습니다. 자세한 내용은 테스트 역할 섹션을 참조하세요.

예시

다음 예제 요청은 출력이 두 개인 작업을 생성합니다.

예제 요청

POST /2012-09-25/jobs HTTP/1.1 Content-Type: application/json; charset=UTF-8 Accept: */* Host: elastictranscoder.Elastic Transcoder endpoint.amazonaws.com:443 x-amz-date: 20130114T174952Z Authorization: AWS4-HMAC-SHA256 Credential=AccessKeyID/request-date/Elastic Transcoder endpoint/elastictranscoder/aws4_request, SignedHeaders=host;x-amz-date;x-amz-target, Signature=calculated-signature Content-Length: number of characters in the JSON string { "Inputs":[{ "Key":"recipes/lasagna.mp4", "FrameRate":"auto", "Resolution":"auto", "AspectRatio":"auto", "Interlaced":"auto", "Container":"mp4", "InputCaptions":{ "MergePolicy":"MergeOverride", "CaptionSources":[ { "Key":"scc/lasagna-kindlefirehd.scc", "Language":"en", "Label":"English" }, { "Key":"srt/lasagna-kindlefirehd.srt", "Language":"fr", "TimeOffset":"1:00:00", "Label":"French" } ] } }] "OutputKeyPrefix":"recipes/", "Outputs":[ { "Key":"mp4/lasagna-kindlefirehd.mp4", "ThumbnailPattern":"mp4/thumbnails/lasagna-{count}", "Rotate":"0", "PresetId":"1351620000000-100080", "Watermarks":[ { "InputKey":"logo/128x64.png", "PresetWatermarkId":"company logo 128x64" } ], "Captions":{ "CaptionFormats":[ { "Format":"scc", "Pattern":"scc/lasagna-{language}" }, { "Format":"srt", "Pattern":"srt/lasagna-{language}", } ] } }, { "Key":"iphone/lasagna-1024k", "ThumbnailPattern":"iphone/th1024k/lasagna-{count}", "Rotate":"0", "PresetId":"1351620000000-987654", "SegmentDuration":"5" }, { "Key":"iphone/lasagna-512k", "ThumbnailPattern":"iphone/th512k/lasagna-{count}", "Rotate":"0", "PresetId":"1351620000000-456789", "SegmentDuration":"5" }, ], "Playlists": [ { "Format": "HLSv3", "Name": "playlist-iPhone-lasagna.m3u8", "OutputKeys": [ "iphone/lasagna-1024k", "iphone/lasagna-512k" ] } ], "UserMetadata": { "Food type":"Italian", "Cook book":"recipe notebook" }, "PipelineId":"1111111111111-abcde1" }

샘플 응답

Status: 201 Created x-amzn-RequestId: c321ec43-378e-11e2-8e4c-4d5b971203e9 Content-Type: application/json Content-Length: number of characters in the response Date: Mon, 14 Jan 2013 06:01:47 GMT { "Job":{ "Id":"3333333333333-abcde3", "Inputs":[{ "Key":"recipes/lasagna.mp4", "FrameRate":"auto", "Resolution":"auto", "AspectRatio":"auto", "Interlaced":"auto", "Container":"mp4", "InputCaptions":{ "MergePolicy":"MergeOverride", "CaptionSources":[ { "Key":"scc/lasagna-kindlefirehd.scc", "Language":"en", "Label":"English" }, { "Key":"srt/lasagna-kindlefirehd.srt", "Language":"fr", "TimeOffset":"1:00:00", "Label":"French" } ] } }], "Outputs":[ { "Id":"1", "Key":"mp4/lasagna-kindlefirehd.mp4", "ThumbnailPattern":"mp4/thumbnails/lasagna-{count}", "Rotate":"0", "PresetId":"1351620000000-100080", "Watermarks":[ { "InputKey":"logo/128x64.png", "PresetWatermarkId":"company logo 128x64", } ], "Duration":"1003", "Width":"1280", "Height":"720", "Status":"Progressing", "StatusDetail":"", "Captions":{ "CaptionFormats":[ { "Format":"scc", "Pattern":"scc/lasagna-{language}", }, { "Format":"srt", "Pattern":"srt/lasagna-{language}", }, { "Format":"mov-text" } ] } }, { "Id":"2", "Key":"iphone/lasagna-1024k", "ThumbnailPattern":"iphone/th1024k/lasagna-{count}", "Rotate":"0", "PresetId":"1351620000000-987654", "SegmentDuration":"5", "Duration":"1003", "Width":"1136", "Height":"640", "Status":"Progressing", "StatusDetail":"" }, { "Id":"3", "Key":"iphone/lasagna-512k", "ThumbnailPattern":"iphone/th512k/lasagna-{count}", "Rotate":"0", "PresetId":"1351620000000-456789", "SegmentDuration":"5", "Duration":"1003", "Width":"1136", "Height":"640", "Status":"Complete", "StatusDetail":"", "AppliedColorSpaceConversion":"None" } ], "Playlists":[ { "Format":"HLSv3", "Name":"playlist-iPhone-lasagna.m3u8", "OutputKeys": [ "iphone/lasagna-1024k", "iphone/lasagna-512k" ] } ], "UserMetadata": { "Food type":"Italian", "Cook book":"recipe notebook" }, "PipelineId":"1111111111111-abcde1", "Status":"Progressing" } }