Setting Up The Amazon Elastic Transcoder Integration

Adding the Group and User to IAM Service

Before we can proceed setting up the integration, we will need the “group” and the user that will be used to communicate between your PeepSo-based site and Amazon.

Creating the Group

  1. Login to AWS Console
  2. Go To IAM Service
  3. Click Groups on Left Sidebar
  4. Click Create New Group
  5. >Fill “PeepSoVideoUpload” in Group Name field, click Next Step
  6. Attach policy:
  • AmazonElasticTranscoder_FullAccess
  • AmazonS3FullAccess
  • AmazonElasticTranscoder_JobsSubmitter
  1. Click Next Step for Review Group User Creation>
  2. Click Create Group

Create User

  1. Login to AWS Console
  2. Go To IAM Services
  3. Click Users on Left Sidebar
  4. Click Add Users
  5. Fill username
  6. Choose access type Programmatic access
  7. Click Next to add permission
  8. Check Recently Created Group in Add user to group section
  9. Click Next for tagging users
  10. Click Next for review
  11. Click Create User

Configuring AWS S3

Create Bucket

  1. Login to AWS Console
  2. Go to S3 Service
  3. Click button Create Bucket
  4. In the bucket name fill DNS-compliant bucket name
  5. Choose region, please note that the region must be same with Elastic Transcoder Service
  6. Click next for configuring logging options
  7. Click next for set permissions
  8. Uncheck “Block public access” section
  9. Click next for review
  10. Click Create Bucket for start bucket creation

Attach Policy

  1. Login to AWS Console
  2. Go to S3 Service
  3. Click bucket name in your list bucket
  4. Click permissions tab
  5. Click bucket policy
  6. Click policy Generator
  7. In policy type, choose S3 Bucket Policy
  8. In principal field, fill ARN of your selected user (you can get User ARN in Amazon AWS IAM dashboard)
  9. In actions, check these options:
  • PutObject
  • PutObjectAcl
  • GetObject
  1. Fill resource with ARn of your S3 bucket
  2. Click add statement
  3. Click Generate Policy
  4. Copy paste the policy to your Bucket Policy

Configuring AWS Elastic Transcoder Pipeline

Create Pipeline

  1. Login to AWS Console
  2. Go to Elastic Transcoder Service
  3. Chose the same region of your S3 bucket in navbar
  4. Click Create a new Pipeline button
  5. Fill pipeline name
  6. Fill input bucket with your newly created bucket
  7. In the Configuration for Amazon S3 Bucket for Transcoded Files and Playlists, fill bucket and select storage class “Reduce Redundancy”. Then Click Add permission:
  • Grantee Type : Amazon S3 Group
  • Grantee : All User
  • Access : Open/Download and View Permission
  1. In the Configuration for Amazon S3 Bucket for Thumbnails, fill bucket and select storage class “Reduce Redundancy”. Then Click Add permission:
  • Grantee Type : Amazon S3 Group
  • Grantee : All User
  • Access : Open/Download and View Permission
  1. Choose notification type : Optional
  2. Choose encryption
  3. Click “Save”

Create Preset

  1. Login to AWS Console
  2. Go To Elastic Transcoder Service
  3. Choose the same region of your S3 bucket in navbar
  4. Click Preset on your left sidebar
  5. Click Create New Preset Button
  6. If you’d like to start with predefine AWS Preset, you can choose it in Start With preset Section and choose your prefered configurations, for example I choose “System Preset: Generic 1080p”
  7. Then I rename it to “System Preset: Generic 1080p – Finale” in the name field
  8. Fill description
  9. Chose mp4 in container
  10. For the rest configuration we used default configuration, except for the Watermark and Thumbnails sections
  11. I have removed all of watermark configuration since I don’t need this for now
  12. I change the interval value in thumbnail section to 999999, in order to create only one thumbnail for every converted video
  13. Review and Create Preset Button if the configurations is looks great

Configuring PeepSo Videos

  1. Login to your WordPress Backend
  2. Go To PeepSo -> Configurations -> Audio & Video
  3. Enable Video Upload
  4. Enable AWS Elastic transcoder Integration
  5. Fill Amazon Access Key ID and Amazon Secret Access Key from your IAM Role
  6. Choose AWS Region where S3 Bucket and Elastic Transcoder Pipeline Created
  7. Fill Bucket name
  8. Fill Elastic Transcoder Pipeline ID
  9. Fill Elastic Transcoder Preset ID
  10. Check “Don’t keep a local copy of uploaded files” if you don’t want to keep original file video in S3
  11. Click Save

Uploading Audio

Note: Make sure audio upload is enabled in backend configuration.

Go to the activity stream on the community or profile page and press “Post Type” to select “Video”

The postbox will switch to the options to either link a file from third-party providers, or upload from your computer. Click on the link or icon to upload.

The prompt to select audio file will be shown. Locate the video file and select it. Upload should start automatically and when finished, the “Done” message should be displayed under the icon as shown on the image bellow.

Insert the title and optional data like artist or title and press “Post” button.
As soon the stream is created, audio file will be ready for listening

Uploading Videos

Note: Video upload require external cron job to be configured on the server.

Go to the activity stream on the community or profile page and press “Post Type” to select “Video”

The postbox will switch to the options to either link a video from third-party providers, or upload from your computer. Click on the link or icon to upload.

The prompt to select a video file will be show. Locate the video file and select it. Upload should start automatically and when finished, the “Done” message should be displayed under the icon as shown on the image bellow.

All you have to do now is to enter the title, maybe add some description and press “Post” button

The placeholder stream item will be created with the message that video is pending conversion

After cron job is triggered, the video will be converted and available on the site.

Audio And Video Settings

Audio and Video configuration is accessed through WP Admin -> PeepSo -> Configuration -> Audio And Video

It is divided into two sections.
Left hand section contains all the configuration options, while right-hand section contains useful information for proper setup of the features provided with the plugin.

Configuration Options

Video and Audio panels

Only one configuration in these panels. Enabling or disabling them will completely enable or disable Audio and Video features. It is a “master switch”.

Video Uploads panel

This panel holds all configuration options regarding uploading videos to the site.

  • Enabled: A master switch, once enabled users are able to upload audio. Has no effect on video linking feature.

AWS Elastic Transcoder Integration section

  • Enable AWS S3 & Elastic Transcoder integration
  • Amazon Access Key ID: The Access Key ID you received when you signed up for AWS
  • Amazon Secret Access Key: Enter your Amazon Secret Access Key here if you wish to use AWS S3 Storage.
  • AWS Region: Select bucket location of Amazon S3 Bucket
  • Amazon S3 Bucket: Name of the Bucket to upload your videos to on Amazon S3
  • Elastic Transcoder Pipeline Id: Enter your Elastic Transcoder Pipeline Id here if you wish to use AWS S3 Storage.
  • Elastic Transcoder Preset Id: Enter your Elastic Transcoder Pipeline Id here if you wish to use AWS S3 Storage.
  • Don’t keep a local copy of uploaded files: Enable: videos will be not saved in local

Conversion Section:

  • Path to the FFmpeg binary: Path to the FFmpeg binary on your server. The FFmpeg library is required for video conversions. Please ask your hosting provider about it.
  • FFmpeg extra param – Advanced users only! Leave blank if you don’t know any FFmpeg parameter.
  • Output resolution: Video resolution of the output video.
  • Never upscale videos: When enabled, source videos with resolution lower than the defined output resolution will not be upscaled. The nearest lower resolution will be preferred. This setting is recommended to save space.
  • Delete original file after conversion: Deleting the original file after conversion is recommended to save space on the server

No conversions mode (If this option is selected due to the lack of video conversion process, no thumbnails are generated for the videos):

  • Allowed file extensions: It will allow all file types if empty. The only officially supported format at the moment is mp4.

Limits Section

  • Maximum upload size: Maximum video upload size in megabytes – larger videos take longer to upload and convert.
  • Allowed space per user: Allowed space per user in megabytes. 0 (zero) for no limit.

Thumbnails and previews Section

  • Generate poster videos: When enabled video preview thumbnail will be generated. With the option disabled, there will be no preview frame. It’ll just be black background with a play icon on it.
  • Generate animated GIF: When enabled a quick few second GIF will be generated from the video. It’ll be visible when hovering a cursor over the video.
  • Output Format: Dropdown with following options
    • GIF
    • WEBM
    • Both

Audio Uploads Panel

Enabled: Master Switch. Users will be able to upload audio files. The files will be published immediately without conversion. Has no effect on audio linking feature.

Limits Section

  • Maximum upload size: Maximum audio upload size in megabytes – WordPress maximum upload size allowed is 64MB
  • Allowed space per user: Allowed space per user in megabytes. 0 (zero) for no limit.

Cover Art Section

Enabled: Cover art download will be attempted via Last.fm API.
Last.fm API key: You should enter the API key provided by Last.fm