How to upload recorded media to an Amazon S3 bucket (S3Upload)

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


Prerequisites

Installation

Configuration

Properties

Usage

For developers

Prerequisites


Wowza Streaming Engine 4.0.0 or later is required.

The Amazon Web Services (AWS) Java SDK for Amazon S3 version 1.10.77 (or earlier) is required to provide the upload functionality.


Note: The latest versions of the AWS Java SDK have dependency requirements that aren't compatible with Wowza Streaming Engine software.

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 the following AWS Java SDK JAR files to your Wowza Streaming Engine [install-dir]/lib folder:
  1. 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
Value
Notes
/Root/Applications3UploadAccessKeyStringAKIAIOSFODNN7EXAMPLEYour AWS access key ID. (default: not set)
/Root/Applications3UploadSecretKeyStringwJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEYYour AWS secret key. (default: not set)
/Root/Applications3UploadBucketNameStringmyS3BucketYour S3 bucket that you'll upload the files to. (default: not set)
/Root/Applications3UploadEndpointStrings3.amazonaws.comSet the S3 endpoint for bucket location. This property is required for newer locations that only support V4 authentication and is optional for other locations. See AWS Regions and Endpoints for a list of endpoint names for each location. (default: not set)
/Root/Applications3UploadFilePrefixStringmyFiles/Used to specify a folder to upload the files to. (default: not set)
/Root/Applications3UploadResumeUploadsBooleantrueSpecifies if interrupted file uploads should resume after a restart. (default: true)
/Root/Applications3UploadDelayInteger30000Used to delay uploading to allow for cases where a stream is republished. (default: 0)
/Root/Applications3UploadRestartFailedUploadsBooleantrueRestart failed uploads after a timeout without having to wait for the application to be restarted. (default: true)
/Root/Applications3UploadRestartFailedUploadTimeoutInteger60000Time to wait to restart a failed upload. (default: 60000)
/Root/Applications3UploadDeleteOriginalFilesBooleanfalseSpecifies if the original files should be deleted after uploading. (default: false)
/Root/Applications3UploadVersionFileBooleantrueWhen set, uploaded files will be versioned with an incrementing version number as required. (default: false)
/Root/Applications3UploadACLGroupGranteeUriStringhttp://acs.amazonaws.com/groups/global/AllUsersThis value should be the URI representation of the Group Grantee found here Access Control List (ACL) Overview under Amazon S3 Predefined Groups (default: not set)
/Root/Applications3UploadACLPermissionRuleStringREADThis should be a string that represents the level of permissions we want to grant to the Group Grantee access to the file to be uploaded. (default: not set)
/Root/Applications3UploadDebugLogBooleantrueAddes extra debug logging. (default: false)

Usage


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


Source code is available on GitHub.


Wowza Media Systems™ provides developers with a platform to create streaming applications and solutions. See Wowza Developer Tools to learn more about our APIs and SDK.


Wowza media server software and all components, including modules, source code, and other related items offered on this page, are copyrighted (c) 2006-2016 by Wowza Media Systems, LLC, all rights reserved, and are licensed pursuant to the Wowza Media Software End User License Agreement.

Originally Published: For Wowza Streaming Engine on 04-14-2016.

 

If you're having problems or want to discuss this article, post in our forum.