2017 © Pedro Peláez
 

library elastcoder

AWS Elastic Transcoder Service Integration

image

dumpk/elastcoder

AWS Elastic Transcoder Service Integration

  • Thursday, March 29, 2018
  • by nicolasbistolfi
  • Repository
  • 2 Watchers
  • 21 Stars
  • 5,008 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 3 Open issues
  • 6 Versions
  • 19 % Grown

The README.md

Elastcoder

Build Status Latest Stable Version Author, (*1)

AWS Elastic Transcoder integration for Laravel. This is a simple wrapper if you don't want to go too deep with the AWS SDK for PHP 3.x!., (*2)

Installation

Require this package with composer:, (*3)

composer require dumpk/elastcoder

Add the service provider to your config/app.php file:, (*4)

Dumpk\Elastcoder\ElastcoderServiceProvider::class

Publish config file by running :, (*5)

php artisan vendor:publish --tag=elastcoder

Add this variables to your .env with your Amazon credentials, (*6)

AWS_ACCESS_KEY_ID={AMAZONACCESSKEY}
AWS_SECRET_ACCESS_KEY={SECRETAMAZONSOMETHINGLONG}
AWS_REGION={YOURREGION}

Usage

Add the ElastcoderAWS class to your class header, (*7)

use Dumpk\Elastcoder\ElastcoderAWS;

Now you just need to instance your class, (*8)

$elastcoder = new ElastcoderAWS();

You'll need to have your video uploaded to S3 before using this library, so that means that you already have the key for the file you want to encode. The configuration has to look like:, (*9)


$config = [ 'PresetId' => '432423-dsda', 'width' => 1920, 'height' => 1080, 'aspect' => '16:9', 'ext' => 'mp4', 'PipelineId' => '343244232-n2fuqq4', 'Watermarks' => [[ 'PresetWatermarkId' => 'BottomRight', 'InputKey' => '1080.png', ]], 'TimeSpan' => [ 'StartTime' => '0.4', 'Duration' => '5.3' ], ]

There's an example file you can throw in on your config folder in dumpk/elastcoder/example/elastcoder.php remember to change the values for the pipeline and presetId you want and you have configured on your AWS account., (*10)

So now you can call the transcoding function:, (*11)

$job = $elastcoder->transcodeVideo($asset->key, $destinationKey, $config, $thumbPattern);

You can also transcode audio files like so :, (*12)

$job = $elastcoder->transcodeAudio($inputfile,$uotputfile,$artwork)

This will return a job with an array, where you can find the "Id" of the Job, you'll need to check the job for completeness to know if your video is ready. Buy you already know that, so for your convienience you can use:, (*13)

$job = $elastcoder->getJob($job["Id"]);

And check if $job['Status'] == 'complete', (*14)

Also you can change the ACL of your file, because you might want to give access to everyone to see your amazing video, so:, (*15)

$elastcoder->setPublicObject($key, $bucket);

If you want to be more specific about that and have different types of permissions, you can use:, (*16)

$elastcoder->setObjectACL($key, $bucket, $acl);

$acl can be a string with this values => private|public-read|public-read-write|authenticated-read|bucket-owner-read|bucket-owner-full-control, (*17)

The Versions

29/03 2018

dev-master

9999999-dev http://github.com/dumpk/elastcoder

AWS Elastic Transcoder Service Integration

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nicolás Bistolfi

laravel aws transcoder amazon elastic transcoder

29/03 2018

0.9.1

0.9.1.0 http://github.com/dumpk/elastcoder

AWS Elastic Transcoder Service Integration

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nicolás Bistolfi

laravel aws transcoder amazon elastic transcoder

28/03 2018

dev-clips

dev-clips http://github.com/dumpk/elastcoder

AWS Elastic Transcoder Service Integration

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nicolás Bistolfi

laravel aws transcoder amazon elastic transcoder

05/11 2015

0.9.0

0.9.0.0 http://github.com/dumpk/elastcoder

AWS Elastic Transcoder Service Integration

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nicolás Bistolfi

laravel aws transcoder amazon elastic transcoder

05/11 2015

dev-develop

dev-develop http://github.com/dumpk/elastcoder

AWS Elastic Transcoder Service Integration

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nicolás Bistolfi

laravel aws transcoder amazon elastic transcoder

29/10 2015

0.1

0.1.0.0

AWS Elastic Transcoder Service Integration

  Sources   Download

MIT

The Requires

 

by Nicolás Bistolfi

laravel aws transcoder amazon elastic transcoder