Class AwsMediaConvertServiceImpl

    • Field Detail

      • partSize

        protected int partSize
        The part size used for S3 uploads
      • delimiter

        protected String delimiter
        The delimiter for S3 paths
      • urlPattern

        protected String urlPattern
        The URL pattern for the generated files
      • hlsExtension

        protected String hlsExtension
        The extension used by Apple HLS files
      • dashExtension

        protected String dashExtension
        The extension used by DASH ISO files
      • smoothExtension

        protected String smoothExtension
        The extension used by MS Smooth files
    • Constructor Detail

      • AwsMediaConvertServiceImpl

        public AwsMediaConvertServiceImpl()
    • Method Detail

      • setPartSize

        public void setPartSize​(int partSize)
      • setDelimiter

        public void setDelimiter​(String delimiter)
      • setUrlPattern

        public void setUrlPattern​(String urlPattern)
      • setHlsExtension

        public void setHlsExtension​(String hlsExtension)
      • setDashExtension

        public void setDashExtension​(String dashExtension)
      • setSmoothExtension

        public void setSmoothExtension​(String smoothExtension)
      • getS3Client

        protected com.amazonaws.services.s3.AmazonS3 getS3Client​(MediaConvertProfile profile)
        Creates an instance of AmazonS3 to upload the files.
        Parameters:
        profile - AWS profile
        Returns:
        an S3 client
      • getMediaConvertClient

        protected com.amazonaws.services.mediaconvert.AWSMediaConvert getMediaConvertClient​(MediaConvertProfile profile)
        Creates an instance of AWSMediaConvert to start the transcoding jobs.
        Parameters:
        profile - AWS profile
        Returns:
        a MediaConvert client
      • uploadVideo

        public MediaConvertResult uploadVideo​(String site,
                                              String inputProfileId,
                                              String outputProfileId,
                                              String filename,
                                              InputStream content)
                                       throws AwsException
        Uploads a file to S3 and creates a transcoding job using the specified profile.
        Specified by:
        uploadVideo in interface AwsMediaConvertService
        Parameters:
        site - name of the site
        inputProfileId - id of the profile for uploads
        outputProfileId - id of the s3 profile for downloads
        filename - name of the file
        content - content of the file
        Returns:
        the result of the transcoding job
        Throws:
        AwsException - if the upload or transcoding job creation fails
      • buildResult

        protected MediaConvertResult buildResult​(com.amazonaws.services.mediaconvert.model.JobTemplate jobTemplate,
                                                 com.amazonaws.services.mediaconvert.model.CreateJobResult createJobResult,
                                                 String outputProfileId,
                                                 String originalName)
      • createUrl

        protected String createUrl​(String profileId,
                                   String fullUri)
        Builds a remote-asset url using the given profile and S3 URI