Installing File preview
Generates a preview on the user files (videos, images, and PDFs) when they are uploaded to S3.
Important: This feature is available for Aspera on Cloud Premium subscribers. To enable
the use of the IBM Aspera File preview, you must build a container image with FFmpeg packaged
inside. FFmpeg is a free open-source utility, that is not provided or managed by IBM and is subject
to third party’s terms and conditions. FFmpeg contains codecs for encoding and decoding various
video coding formats. Certain codecs contained within FFmpeg may be covered by patents and require a
license to use. The Dockerfile provided by IBM will enable all codecs in FFMPEG by default; however,
you must assess your licensing needs in connection with your use of FFmpeg and adjust which codecs
to enable accordingly. IBM makes no warranties or conditions, express or implied, and IBM will have
no liability to Client, regarding the FFmpeg utility when used with the Cloud Service.
For a list of file types that are available for preview, see File preview supported file types.
Prerequisites
Before you begin, fulfill these requirements:
- Access file preview's public repository at https://github.com/IBM/aspera-on-cloud-file-previews
- Install Docker Engine following the official documentation https://docs.docker.com/engine/install/.
- You need an AWS account with permissions to create an ECR private repository and push docker images into it.
- AWS CLI installed and configured with credentials.
- In the later steps, you will need to define
aws_access_key
,aws_secret_key
andsecurity_token
in thevariables.tf
file under the directory./terraform-aws/previews
, and which will be used in theterraform
script. - Install Terraform following the official documentation https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli
Configuring File preview
Update the ./terraform-aws/variables.tf configuration file depending on your use case.
preview_duration
: adjusts the duration of a preview for video files.- Default value is set to 15 seconds
- You can update this value in the AWS Lambda page, inside the Configuration > Environment variables section .
preview_audio
: Set this totrue
to enable the audio of preview videos.- There will be 2 instances of File Preview in AWS Lambda:
- One with high resources used for the
video
preview processing - One with low resources for the
image
thumbnail processing. - Depending on the file extension, it will invoke either one of them to reduce
costs
of the running AWS Lambda Instances. - You do not need to change the environment variables for
high_resource_lambda_name
norlow_resource_lambda_name
unless the names for the lambda functions are manually changed outside of Terraform.
- One with high resources used for the
Installing File preview
Important: You must wait a few minutes before uploading or transferring new files after
the installation is complete.
To install File preview, do the following:
Build the docker images:
Using Previews-checker
Previews-checker
generates previews for existing files without previews
(more specifically for files that were in the bucket before installing File
Preview).