dumpk/elastcoder
Larablocks Analysis
dumpk/elastcoder works with any PHP project: the latest release (0.9.1, Mar 29, 2018) doesn't depend on Laravel.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- No release in the last 12 months (last: Mar 29, 2018)
- 38 downloads a month (needs 10,000)
- 28 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Mar 29, 2018.
- No releases in the last 12 months.
- First released: Oct 29, 2015.
- Monthly downloads: 38, down 42% from six months ago.
- 4 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 2, 2026.
| Install | |
|---|---|
composer require dumpk/elastcoder |
|
| Latest Version: | 0.9.1 |
| License: | MIT |
| Last Updated: | Jan 18, 2019 |
| Links: | GitHub · Packagist |
Elastcoder
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!.
Installation
Require this package with composer:
composer require dumpk/elastcoder
Add the service provider to your config/app.php file:
Dumpk\Elastcoder\ElastcoderServiceProvider::class
Publish config file by running :
php artisan vendor:publish --tag=elastcoder
Add this variables to your .env with your Amazon credentials
AWS_ACCESS_KEY_ID={AMAZONACCESSKEY}
AWS_SECRET_ACCESS_KEY={SECRETAMAZONSOMETHINGLONG}
AWS_REGION={YOURREGION}
Usage
Add the ElastcoderAWS class to your class header
use Dumpk\Elastcoder\ElastcoderAWS;
Now you just need to instance your class
$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:
$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.
So now you can call the transcoding function:
$job = $elastcoder->transcodeVideo($asset->key, $destinationKey, $config, $thumbPattern);
You can also transcode audio files like so :
$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:
$job = $elastcoder->getJob($job["Id"]);
And check if $job['Status'] == 'complete'
Also you can change the ACL of your file, because you might want to give access to everyone to see your amazing video, so:
$elastcoder->setPublicObject($key, $bucket);
If you want to be more specific about that and have different types of permissions, you can use:
$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
Related Packages
Custom Eloquent syntax for DynamoDB from https://github.com/baopham/laravel-dyna...
Deploy to auto scale without down time. By backup an master instance to AMI, cre...
Version History
| Version | Released | License |
|---|---|---|
| 0.9.1 | MIT | |
| 0.9.0 | MIT | |
| 0.1 | MIT |