์ด ํ์ด์ง์์๋ Transcoder API ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ๋ฐฉ๋ฒ์ ๋ณด์ฌ์ค๋๋ค. ์ด ํ์ด์ง์ ํ์๋ ์ค๋ฅ๋ Transcoder API์ ๊ด๋ จ์ด ์์ต๋๋ค. Google API์ ์ผ๋ฐ์ ์ธ ์ค๋ฅ๋ Cloud API ์ค๋ฅ ํ์ด์ง๋ฅผ ์ฐธ์กฐํ์ธ์.
์๋น์ค๋ ์์
๋ฆฌ์์ค์ error
ํ๋๋ฅผ ์ฌ์ฉํ์ฌ ์ค๋ฅ๋ฅผ ๋ณด๊ณ ํฉ๋๋ค. ์ด ํ๋์๋ google.rpc.Status
์ ํ์ ๊ฐ์ฒด๊ฐ ํฌํจ๋ฉ๋๋ค.
์ด ๊ฐ์ฒด์๋ ์ค๋ฅ ์ฝ๋, ์ค๋ฅ ๋ฉ์์ง, ์ค๋ฅ ์ธ๋ถ์ ๋ณด๋ฅผ ํฌํจํ ์ถ๊ฐ ์ค๋ฅ ์ ๋ณด๊ฐ ํฌํจ๋ฉ๋๋ค.
์ฒซ ๋ฒ์งธ ์ค๋ฅ๋ง ๋ฐํ๋ฉ๋๋ค. ์์ ์์ ์ค๋ฅ๊ฐ ์ฌ๋ฌ ๊ฐ ๋ฐ์ํ๋ฉด ๋ฐํ๋ ์ค๋ฅ๋ฅผ ์์ ํ๊ณ ์์ ์ ๋ค์ ๋ง๋ค์ด ๋ค์ ์ค๋ฅ๋ฅผ ํ์ธํด์ผ ํฉ๋๋ค.
Cloud Storage ๊ถํ์ด ๊ฑฐ๋ถ๋จ
๋ค์ ๋ฌธ์ ๋ Cloud Storage์ ์์น์์ Transcoder API ์๋น์ค ๊ณ์ ์ ์ ๋ ฅ์ด๋ ์ถ๋ ฅ์ ๋ํ ์ฝ๊ธฐ/์ฐ๊ธฐ ๊ถํ์ด ์์ผ๋ฉด ๋ฐ์ํฉ๋๋ค.
{ "code":7, # HTTP error code 403 "message":"Permission denied for Google Cloud Storage.", "details":[ { "@type":"type.googleapis.com/google.rpc.ErrorInfo", "reason":"GCSPermissionDenied", "domain":"transcoder.googleapis.com", "metadata":{ "details":"my_service_account@my_project.iam.gserviceaccount.com does not have storage.objects.get access to gs://example/input/video.mp4." } } }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ์๋์ผ๋ก ์์ฑ๋ ์๋น์ค ๊ณ์ ์ ์ฌ๋ฐ๋ฅธ ๊ถํ์ด ์๋์ง ํ์ธํฉ๋๋ค. ์๋น์ค ๊ณ์ ์ ๋ํ ์์ธํ ๋ด์ฉ์ Cloud Storage ๋ฐ Pub/Sub ์ก์ธ์ค๋ฅผ ์ฐธ์กฐํ์ธ์.
Pub/Sub ๊ถํ์ด ๊ฑฐ๋ถ๋จ
๋ค์ ๋ฌธ์ ๋ Pub/Sub ์ฃผ์ ์ ๊ฒ์ํ ์ ์๋ ์ ์ ํ ๊ถํ์ด Transcoder API ์๋น์ค ๊ณ์ ์ ์์ผ๋ฉด ๋ฐ์ํฉ๋๋ค.
{ "code":7, # HTTP error code 403 "message":"Permission denied for PubSub.", "details":[ { "@type":"type.googleapis.com/google.rpc.ErrorInfo", "reason":"PubSubPermissionDenied", "domain":"transcoder.googleapis.com", "metadata":{ "details":"my_service_account@my_project.iam.gserviceaccount.com does not have pubsub.topic.publish access to /projects/test-project/topic/test-topic." } } }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ์๋์ผ๋ก ์์ฑ๋ ์๋น์ค ๊ณ์ ์ ์ฌ๋ฐ๋ฅธ ๊ถํ์ด ์๋์ง ํ์ธํฉ๋๋ค. ์๋น์ค ๊ณ์ ์ ๋ํ ์์ธํ ๋ด์ฉ์ Cloud Storage ๋ฐ Pub/Sub ์ก์ธ์ค ์น์ ์ ์ฐธ์กฐํ์ธ์.
์๋ชป๋ Pub/Sub ๋์
๋ค์ ๋ฌธ์ ๋ Pub/Sub ๋์์ด ์๋ชป๋ Pub/Sub ์ฃผ์ ๋ฆฌ์์ค ๊ฒฝ๋ก์ด๋ฉด ๋ฐ์ํฉ๋๋ค.
{ "code":3, # HTTP error code 400 "message":"No video stream found in ffprobe output.", "details":[ { "@type":"type.googleapis.com/google.rpc.BadRequest", "field":"config.pubsubDestination.topic", "description":"InvalidPubsubDestination" } ] }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด Pub/Sub ์ฃผ์ ๊ฐ ์กด์ฌํ๊ณ ์ฌ๋ฐ๋ฅธ ํ์์ผ๋ก ์ง์ ๋์๋์ง ํ์ธํฉ๋๋ค. ์์ธํ ๋ด์ฉ์ ์์ ์ ๋ฐ์ดํธ์ฉ Pub/Sub ์๋ฆผ์ ์ฐธ์กฐํ์ธ์.
์ ๋ ฅ์ ์ฐพ์ ์ ์์
๋ค์ ๋ฌธ์ ๋ Cloud Storage์์ ์ ๋ ฅ ํ์ผ์ ์ฐพ์ ์ ์์ผ๋ฉด ๋ฐ์ํฉ๋๋ค.
{ "code": 5, # HTTP error code 404 "message": "No such object: my-bucket/input.mp4", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "InputNotFound", "domain": "transcoder.googleapis.com", "metadata": { "details": "No such object: my-bucket/input.mp4" } } ] }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ์
๋ ฅ ํ์ผ์ด ์กด์ฌํ๋์ง, ํ์ผ์ ๋ํ inputUri
๊ฐ ์ฌ๋ฐ๋ฅธ์ง, Transcoder API ์๋น์ค ๊ณ์ ์ ํ์ผ์ ์ก์ธ์คํ ์ ์๋ ์ก์ธ์ค ๊ถํ์ด ์๋์ง ํ์ธํฉ๋๋ค. ์
๋ ฅ ํ์ผ์ด ๋ค๋ฅธ ํ๋ก์ ํธ์ ์๋ ๊ฒฝ์ฐ Cloud Storage ๋ฒํท์ ๊ณต๊ฐ๋ก ์ค์ ํด์ผ ํ ์ ์์ต๋๋ค(์์ธํ ๋ด์ฉ์ Cloud Storage ์ก์ธ์ค ์ ์ด ์ฐธ์กฐ).
๊ตฌ์ฑ ๋๋ฝ
์์ ๊ตฌ์ฑ ํ๋๊ฐ ๋๋ฝ๋๋ฉด ๋ค์ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
{ "code":3, # HTTP error code 400 "message":"endTimeOffset of atom atom0 not set.", "details":[ { "@type":"type.googleapis.com/google.rpc.BadRequest", "field":"config.editList[0].endTimeOffset", "description":"ConfigurationMissing" } ] }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ์ค๋ฅ ๋ฉ์์ง์ ๋ฉ์
๋ JobConfig
ํ๋๋ฅผ ํ์ธํฉ๋๋ค.
์๋ชป๋ ๊ตฌ์ฑ ๊ฐ
์์ ๊ตฌ์ฑ์ ์๋ชป๋ ๊ฐ์ด ํฌํจ๋๋ฉด ๋ค์ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
{ "code":3, # HTTP error code 400 "message":"config.inputs[1].preprocessingConfig.crop is invalid, the input (input0) to have a video track with width and height", "details":[ { "@type":"type.googleapis.com/google.rpc.BadRequest", "field":"config.input[1].processingConfig.crop", "description":"InvalidConfigValue" } ] }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ์ค๋ฅ ๋ฉ์์ง์ ๋ฉ์
๋ JobConfig
ํ๋๋ฅผ ํ์ธํฉ๋๋ค.
์๋ชป๋ ํ์์คํฌํ
์์ ๊ตฌ์ฑ์ ์์ ํ์์คํฌํ๋ ์ข ๋ฃ ํ์์คํฌํ๊ฐ ์ ํจํ์ง ์์ผ๋ฉด ๋ค์ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
{ "code":3, # HTTP error code 400 "message":"Request field config.editList[0].startTimeOffset is 200s, expected start time less than the minimum duration of all inputs for this atom (198.86s).", "details":[ { "@type":"type.googleapis.com/google.rpc.BadRequest", "field":"config.editList[0].startTimeOffset", "description":"InvalidTimeOffset" } ] }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด endTimeOffset
์ด startTimeOffset
๋ณด๋ค ํฐ์ง ํ์ธํฉ๋๋ค.
๋ ์คํ์
๋ชจ๋ ์
๋ ฅ ํ์ผ์ ์ง์ ์๊ฐ์ ์ด๊ณผํ ์ ์์ต๋๋ค.
ํธ๋์ค์ฝ๋ ํ๋ ์ด๊ณผ
์ ๋ ฅ์ด๋ ์ ๋ ฅ ๊ตฌ์ฑ์ด ์๋น์ค ํ๋๋ฅผ ์ด๊ณผํ๋ฉด ๋ค์ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
{ "code":3, # HTTP error code 400 "message":"at most 400 GB input.", "details":[ { "@type":"type.googleapis.com/google.rpc.BadRequest", "field":"config.editList[0].startTimeOffset", "description":"ExceedTranscodeLimit" } ] }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ์์ ๊ตฌ์ฑ์ด ์๋น์ค ํ๋ ๋ด์ ์๋์ง ํ์ธํฉ๋๋ค.
๋์์ ๋๋ฝ
๋์์ ์คํธ๋ฆผ์ด ๊ตฌ์ฑ์์ ์ง์ ๋์ง ์์๊ฑฐ๋ ๋์์์ด ์ ๋ ฅ ํ์ผ์์ ๊ฐ์ง๋์ง ์์ผ๋ฉด ๋ค์ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
{ "code":3, # HTTP error code 400 "message":"No video stream found in ffprobe output.", "details":[ { "@type":"type.googleapis.com/google.rpc.BadRequest", "field":"config.input", "description":"VideoMissing" } ] }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ๋์์ ์คํธ๋ฆผ์ด ์์ ๊ตฌ์ฑ์ ์ง์ ๋์ด ์๊ณ ์ ๋ ฅ ํ์ผ์ ๋์์ ์คํธ๋ฆผ์ด ํฌํจ๋์ด ์๋์ง ํ์ธํฉ๋๋ค.
์ค๋์ค ๋๋ฝ
์ค๋์ค ํธ๋์ด editList
์์ ์ง์ ๋์ง ์์๊ฑฐ๋ ์ค๋์ค ํธ๋์ด ์
๋ ฅ ํ์ผ์์ ๊ฐ์ง๋์ง ์์ผ๋ฉด ๋ค์ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
{ "code":3, # HTTP error code 400 "message":"atom atom0 does not have any inputs (input0) with an audio track.", "details":[ { "@type":"type.googleapis.com/google.rpc.BadRequest", "field":"config.editList[0].input[0]", "description":"AudioMissing" } ] }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ์ค๋์ค ํธ๋์ด ์์ ๊ตฌ์ฑ์ ์ง์ ๋์๊ณ ์ค๋์ค ํธ๋์ด ์ ๋ ฅ ํ์ผ์ ํฌํจ๋์ด ์๋์ง ํ์ธํฉ๋๋ค.
ํ ์คํธ ๋๋ฝ
ํ ์คํธ ์คํธ๋ฆผ์ด ์ง์ ๋์์ง๋ง ์์ ๋ชฉ๋ก์ด๋ ์ ๋ ฅ ํ์ผ์ ํ ์คํธ ํธ๋์ด ์์ผ๋ฉด ๋ค์ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
{ "code":3, # HTTP error code 400 "message":"atom atom0 does not have any inputs (input0) with a text track.", "details":[ { "@type":"type.googleapis.com/google.rpc.BadRequest", "field":"config.editList[0].input[0]", "description":"TextMissing" } ] }
์์
๊ตฌ์ฑ์ ํ
์คํธ ํธ๋์ด ์ง์ ๋ ๊ฒฝ์ฐ editList
๋ฐ ์
๋ ฅ ํ์ผ์ ์๋์ง ํ์ธํฉ๋๋ค. ๊ตฌ์ฑ ์์๋ฅผ ์ฐธ์กฐํ์ธ์.
์ ํจํ ํธ๋ ๋๋ ์ฑ๋ ๋๋ฝ
๋ค์ ๋ฌธ์ ๋ ๊ธฐ๋ณธ ์คํธ๋ฆผ ๋งคํ์ ์ ๋ ฅ ํธ๋์ด๋ ์ฑ๋์ด ์ ํจํ ์ค๋์ค/ํ ์คํธ ์คํธ๋ฆผ ํธ๋ ๋๋ ์ฑ๋์ ์ฐธ์กฐํ์ง ์์ผ๋ฉด ๋ฐ์ํฉ๋๋ค.
{ "code":3, # HTTP error code 400 "message":"Request field config.elementaryStreams[0].mapping[0].channels[0].inputs[0].track is 2, no valid audio track available, expected an index to a valid audio track in input input0.", "details":[ "@type":"type.googleapis.com/google.rpc.BadRequest", "field":"config.elementaryStreams[0].mapping[0].channels[0].inputs[0].track", "description":"ValidTrackOrChannelMissing" ] }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ์ ๋ ฅ ๋์์/์ค๋์ค/ํ ์คํธ ๋ฐ ๊ธฐ๋ณธ ์คํธ๋ฆผ ๋งคํ์ ํ์ธํฉ๋๋ค(์คํธ๋ฆผ ๋งคํ ์์ ์ฐธ์กฐ).
์ง์๋์ง ์๋ ์ ๋ ฅ
๋ค์ ๋ฌธ์ ๋ ์ ๋ ฅ ํ์ผ์ด ์์๋์๊ฑฐ๋ ์ง์๋๋ ํ์์ด ์๋ ๊ฒฝ์ฐ์ ๋ฐ์ํฉ๋๋ค.
{ "code":3, # HTTP error code 400 "message":"Input files are not supported", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "UnsupportedInput", "domain": "transcoder.googleapis.com", "metadata": { "details": "Input is not supported. Input key = example_key, input uri = gs://example/input/video.mp4." } } ] }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ์ ๋ ฅ ํ์ผ์ด ์ ํจํ๊ณ ์ง์๋๋ ํ์์ธ์ง ํ์ธํฉ๋๋ค.
์๋ชป๋ ํ์์ ์ ๋ ฅ
์ ๋ ฅ ํ์ผ ํ์์ด ์๋ชป๋์ด ๋์ฝ๋ฉํ ์ ์๋ ๊ฒฝ์ฐ ๋ค์ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
{ "code":3, # HTTP error code 400 "message":"Input is malformed and cannot be decoded.", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "MalformattedInput", "domain": "transcoder.googleapis.com", "metadata": { "details": "Input is malformed. Input key = example_key, input uri = gs://example/input/video.mp4." } } ] }
์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ์ ๋ ฅ ํ์ผ์ด ์ ํจํ๊ณ ์ง์๋๋ ํ์์ธ์ง ํ์ธํฉ๋๋ค.
๋ด๋ถ ์ค๋ฅ
๋ด๋ถ ์๋น์ค ์ค๋ฅ๋ก ์ธํด ์์ ์ด ์ฑ๊ณต์ ์ผ๋ก ์๋ฃ๋์ง ์์ผ๋ฉด ๋ค์ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
{ "code":13, # HTTP error code 500 "message":"InternalError", "details":[ { "@type":"type.googleapis.com/google.rpc.ErrorInfo", "reason":"InternalError", "domain":"transcoder.googleapis.com", "metadata":{ "details":"Failed to transcode job" } } ] }
๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ๋ค์์ ์ํํฉ๋๋ค.
- ์ ๋ ฅ ํ์ผ์ด ์ ํจํ๊ณ ์ง์๋๋ ํ์์ธ์ง ํ์ธํฉ๋๋ค.
JobConfig
์ ์ค๋ฅ๊ฐ ์๋์ง ํ์ธํฉ๋๋ค.- ๋ค๋ฅธ ์์น์์ ์์ ์ ๋ค์ ์๋ํฉ๋๋ค.
optimization
์ ์ค์งํ ์ํ์์ ์์ ์ ๋ค์ ์๋ํฉ๋๋ค.
์ถ๊ฐ ์ง์ ์ต์ ์ ์ง์ ๋ฐ๊ธฐ๋ฅผ ์ฐธ์กฐํ์ธ์.