public class AwsMediaConvertServiceImpl extends AbstractAwsService<MediaConvertProfile> implements AwsMediaConvertService
AwsMediaConvertService| Modifier and Type | Field and Description |
|---|---|
protected String |
dashExtension
The extension used by DASH ISO files
|
protected String |
delimiter
The delimiter for S3 paths
|
protected String |
hlsExtension
The extension used by Apple HLS files
|
protected int |
partSize
The part size used for S3 uploads
|
protected String |
smoothExtension
The extension used by MS Smooth files
|
protected String |
urlPattern
The URL pattern for the generated files
|
profileLoader| Constructor and Description |
|---|
AwsMediaConvertServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addUrl(List<String> urls,
String outputProfileId,
String destination,
String originalName,
String modifier,
String extension) |
protected MediaConvertResult |
buildResult(com.amazonaws.services.mediaconvert.model.JobTemplate jobTemplate,
com.amazonaws.services.mediaconvert.model.CreateJobResult createJobResult,
String outputProfileId,
String originalName) |
protected String |
createUrl(String profileId,
String fullUri)
Builds a remote-asset url using the given profile & S3 URI
|
protected com.amazonaws.services.mediaconvert.AWSMediaConvert |
getMediaConvertClient(MediaConvertProfile profile)
Creates an instance of
AWSMediaConvert to start the transcoding jobs. |
protected com.amazonaws.services.s3.AmazonS3 |
getS3Client(MediaConvertProfile profile)
Creates an instance of
AmazonS3 to upload the files. |
void |
setDashExtension(String dashExtension) |
void |
setDelimiter(String delimiter) |
void |
setHlsExtension(String hlsExtension) |
void |
setPartSize(int partSize) |
void |
setSmoothExtension(String smoothExtension) |
void |
setUrlPattern(String urlPattern) |
MediaConvertResult |
uploadVideo(String site,
String inputProfileId,
String outputProfileId,
String filename,
InputStream content)
Uploads a file to S3 and creates a transcoding job using the specified profile.
|
getProfile, setProfileLoaderprotected int partSize
protected String delimiter
protected String urlPattern
protected String hlsExtension
protected String dashExtension
protected String smoothExtension
public void setPartSize(int partSize)
public void setDelimiter(String delimiter)
public void setUrlPattern(String urlPattern)
public void setHlsExtension(String hlsExtension)
public void setDashExtension(String dashExtension)
public void setSmoothExtension(String smoothExtension)
protected com.amazonaws.services.s3.AmazonS3 getS3Client(MediaConvertProfile profile)
AmazonS3 to upload the files.profile - AWS profileprotected com.amazonaws.services.mediaconvert.AWSMediaConvert getMediaConvertClient(MediaConvertProfile profile)
AWSMediaConvert to start the transcoding jobs.profile - AWS profilepublic MediaConvertResult uploadVideo(String site, String inputProfileId, String outputProfileId, String filename, InputStream content) throws AwsException
uploadVideo in interface AwsMediaConvertServicesite - name of the siteinputProfileId - id of the profile for uploadsoutputProfileId - id of the s3 profile for downloadsfilename - name of the filecontent - content of the fileAwsException - if the upload or transcoding job creation failsprotected MediaConvertResult buildResult(com.amazonaws.services.mediaconvert.model.JobTemplate jobTemplate, com.amazonaws.services.mediaconvert.model.CreateJobResult createJobResult, String outputProfileId, String originalName)
protected void addUrl(List<String> urls, String outputProfileId, String destination, String originalName, String modifier, String extension)
Copyright © 2022 CrafterCMS. All rights reserved.