Upload recorded media to an Amazon S3 bucket with a Wowza Streaming Engine Java module

The ModuleS3Upload module for Wowza Streaming Engine™ media server software automatically uploads finished recordings to an Amazon S3 bucket. It uses the Amazon Web Services (AWS) SDK for Java to upload the recorded files.

Contents


Video tutorial: Upload recorded media to an Amazon S3 bucket

Prerequisites

Installation

Configuration

Properties

Usage

For developers

Video tutorial: Upload recorded media to an Amazon S3 bucket


See how upload recorded media to an Amazon S3 bucket with the ModuleS3Upload module for Wowza Streaming Engine.

Prerequisites


Wowza Streaming Engine 4.7.2.02 or later is required.

The Amazon Web Services (AWS) Java SDK is required to provide the upload functionality.

Note: The module will work with earlier versions of Wowza Streaming Engine but they require an older version of the AWS SDK (version 1.10.77 or earlier) because the latest versions of the SDK have dependency requirements that aren't compatible with Wowza Streaming Engine prior to 4.7.2.02.

Installation


  1. Download wse-plugin-s3upload.zip.
     
  2. Extract the contents from the downloaded (zipped) package, and then copy the lib/wse-plugin-s3upload.jar file from the package to the lib folder in your Wowza Streaming Engine installation ([install-dir]/lib).
     
  3. Download AWS Java SDK (aws-java-sdk-x.xx.xxx.zip).
  4. Extract the contents from the downloaded (zipped) package, and then copy the lib/aws-java-sdk-x.xx.xxx.jar file from the package to the lib folder in your Wowza Streaming Engine installation ([install-dir]/lib).
  5. Restart Wowza Streaming Engine.

Configuration


To enable this module, add the following module definition to your application configuration. See Configure modules for details.

Name
Description
Fully Qualified Class Name
ModuleS3UploadUploads recordings to Amazon S3.com.wowza.wms.plugin.s3upload.ModuleS3Upload

 




Properties


After enabling the module, you can adjust the default settings by adding the following properties to your application. See Configure properties for details.

Path
Name
Type
Description
/Root/Applications3UploadAccessKeyStringThe AWS access key ID. There isn't a default value.
/Root/Applications3UploadSecretKeyStringThe AWS secret key. There isn't a default value.
/Root/Applications3UploadBucketNameStringThe S3 bucket to which you upload files. There isn't a default value.
/Root/Applications3UploadProfileStringThe AWS username to use for authentication. There isn't a default value.
/Root/Applications3UploadProfilePathStringAn alternative path to the AWS credentials. There isn't a default value.
/Root/Applications3UploadRegionStringThe S3 region for bucket location. For a list of region names for each location, see AWS Regions and Endpoints. There isn't a default value.
/Root/Applications3UploadUseDefaultRegionBooleanEnables the uploader to use the same region as the EC2 instance or the AWS SDK default region. The default value is true. Set to false to prevent the uploader from automatically using those regions.
/Root/Applications3UploadAllowBucketRegionOverrideBooleanEnables global access to buckets. This is used to prevent region mismatches from causing uploads to fail.The default value is true. Set to false to disable global access to buckets.

/Root/Application

s3UploadCannedAclStringA predefined grant (list of grantees and permissions) known as a canned access control list (ACL). See Amazon's list of supported canned ACLs. There isn't a default value.
/Root/Applications3UploadFilePrefixStringThe name of the folder to which files are uploaded. There isn't a default value.
/Root/Applications3UploadResumeUploadsBooleanSpecifies that uploads should resume if interrupted. The default value is true. Set to false to prevent interrupted uploads from resuming.
/Root/Applications3UploadDelayIntegerDelays the uploading of files by the value in case a stream is republished. The default value, 0 milliseconds, results in no delay. Increase the value to delay the upload.
/Root/Applications3UploadRestartFailedUploadsBooleanRestarts failed uploads after a timeout without restarting the application. The default value is true.
/Root/Applications3UploadRestartFailedUploadTimeoutIntegerSpecifies the time, in milliseconds, to wait to restart a failed upload. The default value is 60000 milliseconds.
/Root/Applications3UploadDeleteOriginalFilesBooleanSpecifies whether to delete the original files after uploading. The default value is false. Set to true to delete files after uploading.(default: false)
/Root/Applications3UploadVersionFileBooleanEnables automatic incremented versioning of uploaded files. The default value is false. Set to true to enable versioning.
/Root/Applications3UploadACLGroupGranteeUriStringThe URI representation of the Group Grantee from the Amazon S3 Predefined Groups. There isn't a default value.
/Root/Applications3UploadACLPermissionRuleStringThe level of permissions granted to the Group Grantee to access the uploaded file. For a list of valid values, see What permissions can I grant? There isn't a default value.
/Root/Applications3UploadDebugLogBooleanEnables verbose debug logging. The default value is false. Set to true to turn on verbose logging.

Usage


Note the following details about using the ModuleS3Upload module:

  • If you don't provide credentials, the default AWS methods are used to authenticate with S3. For more information, see Using the default credential provider chain.
  • When a recording is finished, a temporary file named [recording-name].upload is created to track the recording and sort any data that may be needed to resume the file upload later if it's interrupted. AWS TransferManager uploads the recorded file, splitting it into a multipart upload if required. After the recorded file is uploaded, the temporary [recording-name].upload file is deleted.
  • When the Wowza Streaming Engine application starts or restarts, the module checks to see if any interrupted uploads must be completed. Interrupted single part uploads are restarted from the beginning while interrupted multipart uploads are resumed from the last complete part. If the module is set to not resume uploads after interruptions (s3UploadResumeUploads = false), incomplete multipart uploads are deleted from the S3 bucket.

For developers