z***s 发帖数: 3241 | 1 First, watch this video, it's nearly identical to what we're trying to
accomplish:
http://aws.amazon.com/elastictranscoder/
Desired Result:
An app / service with the following components:
-RESTful webservice interface
-Service for transcoding video files
-RESTful client for calling other RESTful webservices
At this time the service doesn't really need a database backend however it
would be good to add some failover / fault tolerance this could be
accomplished by embedding a persistent queue (for example).
Workflow:
Some of these requirements are less stringent than others depending on your
experience - for instance rather than a RESTful interface we could leverage
a JMS queue, what is outlined here is simply how we'd build it:
1) Our platform calls out to the transcoder service via a REST endpoint to
initiate a transcoding job:
-POST /transcoder/jobs
-JSON payload something akin to:
{
url: "https://s3-us-west-2.amazonaws.com/tab-local-uploads/Carl+Birthday+
FRONT.png"
tabId: 1234
transcodeJobParam1:"value"
transcodeJobParam2:"value"
transcodeJobParam3:"value"
}
-The payload contains enough information to initiate the transcode job. Some
of the items we have above are:
-url: represents a video file that has been uploaded to our Amazon S3 bucket
, the 'input bucket' for -the transcoding service
-transcodeJobParam1: Metadata describing the encoding profile to use during
transcoding
-transcodeJobParam2: Metadata describing the encoding profile to use during
transcoding
-etc...
-Additional parameters as required, these need to-be-defined
2) Upon receipt of a successful call, transcoding service is initiated.
Transcoding service will leverage the AWS Elastic transcoder to perform the
following:
-Create a transcode job as defined in the POST payload
-Submits the job to the AWS transcoder
-Monitors the AWS transcoder job
-When complete saves the output of the transcoder job to a processed /
complete S3 bucket
3) Once complete, the transcoding service will make a REST call to our
platform (callback) to indicate completion of processing.
-GET dev.tabrific.io/api/v1/tabs/1234/transcoder?url=pathToNewS3URL |
|