public class ElasticTranscoderImpl extends Object implements ElasticTranscoder
ElasticTranscoder. Just as indicated by the interface, the video file is first uploaded to the
S3 input bucket of the AWS Elastic Transcoder pipeline, but before uploading, a unique bucket key is generated so that there's no
issue when a file with the same filename is uploaded several times. In this way all video file versions (original or transcoded) are
kept at all times and there's no downtime when a file is transcoded again.| Modifier and Type | Field and Description |
|---|---|
protected int |
partSize |
| Constructor and Description |
|---|
ElasticTranscoderImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected com.amazonaws.services.elastictranscoder.model.CreateJobResult |
createJob(String inputKey,
String baseKey,
TranscoderProfile profile,
com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder transcoderClient) |
protected TranscoderJob |
createResult(String baseKey,
com.amazonaws.services.elastictranscoder.model.CreateJobResult jobResult,
com.amazonaws.services.elastictranscoder.model.Pipeline pipeline) |
protected com.amazonaws.services.elastictranscoder.model.CreateJobOutput |
getCreateJobOutput(String baseKey,
TranscoderOutput output) |
protected com.amazonaws.services.elastictranscoder.model.CreateJobRequest |
getCreateJobRequest(String inputKey,
String baseKey,
TranscoderProfile profile) |
protected com.amazonaws.services.elastictranscoder.model.Pipeline |
getPipeline(String pipelineId,
com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder client) |
protected com.amazonaws.services.s3.AmazonS3 |
getS3Client(TranscoderProfile profile) |
protected com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder |
getTranscoderClient(TranscoderProfile profile) |
void |
setPartSize(int partSize) |
TranscoderJob |
startJob(String filename,
InputStream content,
TranscoderProfile profile)
Starts a transcoder job for the specified file, based on the given
TranscoderProfile. |
protected void |
uploadInput(String inputKey,
String filename,
InputStream content,
com.amazonaws.services.elastictranscoder.model.Pipeline pipeline,
com.amazonaws.services.s3.AmazonS3 s3Client) |
public void setPartSize(int partSize)
public TranscoderJob startJob(String filename, InputStream content, TranscoderProfile profile) throws AwsException
ElasticTranscoderTranscoderProfile. It first uploads the file to
the input bucket in S3 before the job is created.startJob in interface ElasticTranscoderfilename - the video's file namecontent - the file of the videoprofile - the transcoding profileAwsException - if an error occurredprotected com.amazonaws.services.elastictranscoder.model.Pipeline getPipeline(String pipelineId, com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder client)
protected void uploadInput(String inputKey, String filename, InputStream content, com.amazonaws.services.elastictranscoder.model.Pipeline pipeline, com.amazonaws.services.s3.AmazonS3 s3Client) throws AwsException
AwsExceptionprotected com.amazonaws.services.elastictranscoder.model.CreateJobResult createJob(String inputKey, String baseKey, TranscoderProfile profile, com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder transcoderClient)
protected TranscoderJob createResult(String baseKey, com.amazonaws.services.elastictranscoder.model.CreateJobResult jobResult, com.amazonaws.services.elastictranscoder.model.Pipeline pipeline)
protected com.amazonaws.services.s3.AmazonS3 getS3Client(TranscoderProfile profile)
protected com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder getTranscoderClient(TranscoderProfile profile)
protected com.amazonaws.services.elastictranscoder.model.CreateJobRequest getCreateJobRequest(String inputKey, String baseKey, TranscoderProfile profile)
protected com.amazonaws.services.elastictranscoder.model.CreateJobOutput getCreateJobOutput(String baseKey, TranscoderOutput output)
Copyright © 2023 CrafterCMS. All rights reserved.