Download the PHP package meema/laravel-media-converter without Composer

On this page you can find all versions of the php package meema/laravel-media-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-media-converter

Media Converter Package for Laravel

Latest Version on Packagist GitHub Workflow Status StyleCI Scrutinizer Code Quality Total Downloads Discord License

This is a wrapper package for AWS MediaConvert. Additional drivers may be added.

laravel-media-converter package image

๐Ÿ’ก Usage

๐Ÿ™ Installation

You can install the package via composer:

The package will automatically register itself.

Next, publish the config file with:

Next, please add the following keys their values to your .env file.

The following is the content of the published config file:

Preparing Your Media Model (optional)

This package includes a trait for your "Media model" that you may use to define the relationship of your media model with the tracked conversions.

Simply use it as follows:

Set Up Webhooks (optional)

This package makes use of webhooks in order to communicate the status/progress of the MediaConvert job. Please follow the following steps to enable webhooks for yourself.

Please note, this is only optional, and you should only enable this if you want to track the MediaConvert job's progressions.

Setup Expose

First, let's use Expose to "expose" / generate a URL for our local API. Follow the Expose documentation on how you can get started and generate a "live" & sharable URL for within your development environment.

It should be as simple as cd my-laravel-api && expose.

Setup AWS SNS Topic & Subscription

Second, let's create an AWS SNS Topic which will notify our "exposed" API endpoint:

  1. Open the Amazon SNS console at https://console.aws.amazon.com/sns/v3/home
  2. In the navigation pane, choose Topics, and then choose "Create new topic".
  3. For Topic name, enter MediaConvertJobUpdate, and then choose "Create topic".

AWS SNS Topic Creation Screenshot

  1. Choose the topic ARN link for the topic that you just created. It looks something like this: arn:aws:sns:region:123456789012:MediaConvertJobUpdate.
  2. On the Topic details: MediaConvertJobUpdate page, in the Subscriptions section, choose "Create subscription".
  3. For Protocol, choose "HTTPS". For Endpoint, enter your "exposed" API URL which you generated in a previous step.

For example,

  1. Choose "Create subscription".

Confirming Your Subscription

Finally, we need to confirm the subscription which is easily done by navigating to the MediaConvertJobUpdate Topic page. There, you should see the following section:

AWS SNS Subscription Confirmation Screenshot

By default, AWS will have sent a post request to URL you defined in your "Subscription" setup. This package automatically handles the "confirmation" part. In case there is an issue and it is not confirmed yet, please click on the "Request confirmation" button as seen in the screenshot above.

You can also view the request in the Expose interface, by visiting the "Dashboard Url", which should be similar to: http://127.0.0.1:4040

Once the status reflects "Confirmed", your API will receive webhooks as AWS provides updates.

Create CloudWatch Event

  1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.
  2. In the navigation pane, choose Events, and then choose "Create rule".
  3. Make sure the inputs match the following screenshots:

AWS CloudWatch Rule Creation Screenshot

As you can see in above screenshot, we needed to select the "Service Name", "Event Type", and the "Target" which is referencing our SNS Topic we earlier created.

Lastly, the second & final step of the "Rule creation" prompts you to enter a name and an optional description. You may use any name, e.g. mediaconvert-job-updates.

Now, your API will receive webhooks!

Deploying to Laravel Vapor

Please note, as of right now, you cannot reuse the AWS credentials stored in your "environment file". The "workaround" for this is to adjust the media-converter.php-config file by renaming

From: AWS_ACCESS_KEY_ID - To: e.g. VAPOR_ACCESS_KEY_ID

From: AWS_SECRET_ACCESS_KEY - To: e.g. VAPOR_SECRET_ACCESS_KEY

and, lastly, please ensure that your Vapor environment has these values defined.

๐Ÿงช Testing

๐Ÿ“ˆ Changelog

Please see our releases page for more information on what has changed recently.

๐Ÿ’ช๐Ÿผ Contributing

Please see CONTRIBUTING for details.

๐Ÿ Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Media Converter on GitHub

For casual chit-chat with others using this package:

Join the Meema Discord Server

๐Ÿšจ Security

Please review our security policy on how to report security vulnerabilities.

๐Ÿ™๐Ÿผ Credits

๐Ÿ“„ License

The MIT License (MIT). Please see LICENSE for more information.

Made with โค๏ธ by Meema, Inc.


All versions of laravel-media-converter with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
ext-json Version *
aws/aws-php-sns-message-validator Version ^1.6
aws/aws-sdk-php Version ^3.173
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package meema/laravel-media-converter contains the following files

Loading the files please wait ....