{"id":41919259,"url":"https://github.com/finller/laravel-aws-mediaconvert","last_synced_at":"2026-01-25T16:36:49.556Z","repository":{"id":65784174,"uuid":"599710828","full_name":"finller/laravel-aws-mediaconvert","owner":"finller","description":"Bring AWS MediaConvert to Laravel","archived":false,"fork":false,"pushed_at":"2025-08-18T00:09:43.000Z","size":99,"stargazers_count":6,"open_issues_count":2,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-08T09:57:14.043Z","etag":null,"topics":["aws","aws-mediaconvert","aws-s3","finller","laravel","mediaconvert","s3"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/finller.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-09T18:08:40.000Z","updated_at":"2025-07-28T00:47:18.000Z","dependencies_parsed_at":"2024-04-15T02:27:38.579Z","dependency_job_id":"1cf45113-1f95-4612-9a47-7f13a9430e27","html_url":"https://github.com/finller/laravel-aws-mediaconvert","commit_stats":{"total_commits":46,"total_committers":5,"mean_commits":9.2,"dds":0.3913043478260869,"last_synced_commit":"b856110658a569568d32e04b1459891b32dc25c0"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":"spatie/package-skeleton-laravel","purl":"pkg:github/finller/laravel-aws-mediaconvert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finller%2Flaravel-aws-mediaconvert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finller%2Flaravel-aws-mediaconvert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finller%2Flaravel-aws-mediaconvert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finller%2Flaravel-aws-mediaconvert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/finller","download_url":"https://codeload.github.com/finller/laravel-aws-mediaconvert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finller%2Flaravel-aws-mediaconvert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28755558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-mediaconvert","aws-s3","finller","laravel","mediaconvert","s3"],"created_at":"2026-01-25T16:36:48.598Z","updated_at":"2026-01-25T16:36:49.550Z","avatar_url":"https://github.com/finller.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bring AWS MediaConvert to Laravel\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/finller/laravel-aws-mediaconvert.svg?style=flat-square)](https://packagist.org/packages/finller/laravel-aws-mediaconvert)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/finller/laravel-aws-mediaconvert/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/finller/laravel-aws-mediaconvert/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/finller/laravel-aws-mediaconvert/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/finller/laravel-aws-mediaconvert/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/finller/laravel-aws-mediaconvert.svg?style=flat-square)](https://packagist.org/packages/finller/laravel-aws-mediaconvert)\n\nThis package provides an easy way to interact with AWS MediaConvert. It provides usefull presets for **HLS**, **MP4** optimization and **thumbnail**.\n\nThe package is greatly inspired by the work of meemalabs and their similar package https://github.com/meemalabs/laravel-media-converter !\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require finller/laravel-aws-mediaconvert\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"laravel-aws-mediaconvert-config\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    /**\n     * IAM Credentials from AWS.\n     *\n     * Please note, if you are intending to use Laravel Vapor, rename\n     * From: AWS_ACCESS_KEY_ID - To: e.g. VAPOR_ACCESS_KEY_ID\n     * From: AWS_SECRET_ACCESS_KEY - To: e.g. VAPOR_SECRET_ACCESS_KEY\n     * and ensure that your Vapor environment has these values defined.\n     */\n    'credentials' =\u003e [\n        'key' =\u003e env('AWS_ACCESS_KEY_ID'),\n        'secret' =\u003e env('AWS_SECRET_ACCESS_KEY'),\n    ],\n    'region' =\u003e env('AWS_DEFAULT_REGION', 'us-east-1'),\n    'version' =\u003e 'latest',\n    'url' =\u003e env('AWS_MEDIACONVERT_ACCOUNT_URL'),\n\n    /**\n     * Specify the IAM Role ARN.\n     *\n     * You can find the Role ARN visiting the following URL:\n     * https://console.aws.amazon.com/iam/home?region=us-east-1#/roles\n     * Please note to adjust the \"region\" in the URL above.\n     * Tip: in case you need to create a new Role, you may name it `MediaConvert_Default_Role`\n     * by making use of this name, AWS MediaConvert will default to using this IAM Role.\n     */\n    'iam_arn' =\u003e env('AWS_IAM_ARN'),\n\n    /**\n     * Specify the queue you would like use.\n     *\n     * It can be found by visiting the following URL:\n     * https://us-east-1.console.aws.amazon.com/mediaconvert/home?region=us-east-1#/queues/details/Default\n     * Please note to adjust the \"region\" in the URL above.\n     */\n    'queue_arn' =\u003e env('AWS_QUEUE_ARN'),\n\n    /**\n     * Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events.\n     * Set the interval, in seconds, between status updates.\n     *\n     * MediaConvert sends an update at this interval from the time the service begins processing\n     * your job to the time it completes the transcode or encounters an error.\n     *\n     * Accepted values: 10, 12, 15, 20, 30, 60, 120, 180, 240, 300, 360, 420, 480, 540, 600\n     */\n    'webhook_interval' =\u003e 60,\n];\n```\n\n## Usage\n\nIn the most basic way, this package provides a service which is a wrap around the aws sdk.\nSo you can simply create a MediaConvert job by calling `createJob` like that.\n\n```php\nFinller\\AwsMediaConvert\\Facades\\AwsMediaConvert::createJob(settings: []);\n```\n\nBut we also provid usefull `HLS` and `MP4` presets that are optimized for the web.\nHere is a more advanced usage:\n\nConvert any video to an optimized MP4:\n\n```php\n$input = AwsMediaConvert::getUri($path); // you can use getUri to build the S3 uri quickly\n\nAwsMediaConvert::createJob(\n    settings: DefaultMediaConvertSettings::make($input)\n        -\u003eaddOutputGroup(\n            DefaultOptimizedVideoMediaConvertGroup::make(\n                Destination: $destination,\n                Height: min(1080, $originalHeight) // optional but you can set a Height or Width to resize the video\n            )\n        )\n        -\u003etoArray(),\n    metaData: [ // feel free to add metadata so you can do the right action when receiving the webhook\n        'env' =\u003e config('app.env'),\n        get_class($this-\u003emedia) =\u003e $this-\u003emedia-\u003eid,\n        'job' =\u003e get_class($this),\n    ]\n);\n```\n\nConvert any video to an optimized Apple HLS set of files:\n\n```php\n$input = AwsMediaConvert::getUri($path); // you can use getUri to build the S3 uri easily\n\nAwsMediaConvert::createJob(\n    settings: DefaultMediaConvertSettings::make($input)\n        -\u003eaddOutputGroup(\n            DefaultHlsMediaConvertGroup::make($destination)\n                -\u003eaddOutputWhen($maxHeight \u003e= 1080, DefaultHls1080pMediaConvertOutput::make())\n                -\u003eaddOutputWhen($maxHeight \u003e= 720, DefaultHls720pMediaConvertOutput::make())\n                -\u003eaddOutputWhen($maxHeight \u003e= 540, DefaultHls540pMediaConvertOutput::make())\n                -\u003eaddOutputWhen($maxHeight \u003e= 540, DefaultHls480pMediaConvertOutput::make())\n        )\n        -\u003etoArray(),\n    metaData: []\n);\n```\n\nPerform multiple Conversion in 1 job:\n\n```php\n$input = AwsMediaConvert::getUri($path); // you can use getUri to build the S3 uri easily\n\nAwsMediaConvert::createJob(\n    settings: DefaultMediaConvertSettings::make($input)\n    -\u003eaddOutputGroup(\n            DefaultOptimizedVideoMediaConvertGroup::make(\n                Destination: $destination,\n                Height: min(1080, $originalHeight) // optional but you can set a Height or Width to resize the video\n            )\n        )\n        -\u003eaddOutputGroup(\n            DefaultHlsMediaConvertGroup::make($destination)\n                -\u003eaddOutputWhen($originalHeight \u003e= 1080, DefaultHls1080pMediaConvertOutput::make())\n                -\u003eaddOutputWhen($originalHeight \u003e= 720, DefaultHls720pMediaConvertOutput::make())\n                -\u003eaddOutputWhen($originalHeight \u003e= 540, DefaultHls540pMediaConvertOutput::make())\n                -\u003eaddOutputWhen($originalHeight \u003e= 540, DefaultHls480pMediaConvertOutput::make())\n        )\n        -\u003etoArray(),\n    metaData: []\n);\n```\n\n### Tracks MediaConvert jobs with webhooks\n\n### 1. Register the webhook route in your app.\n\nYou can simply use our prebuilt Webhook controller\n\nIn your `web`, `api` or any route file of yours, register the prebuilt route with the following macro.\nYou can use any url\n\n```php\nRoute::awsMediaConvertWebhook('aws/webhooks/media-convert');\n```\n\nIf you have put your route in a place where the `VerifyCsrfToken` is attached, you will have to add an exception just like that:\n```php\nclass VerifyCsrfToken extends Middleware\n{\n    /**\n     * The URIs that should be excluded from CSRF verification.\n     *\n     * @var array\u003cint, string\u003e\n     */\n    protected $except = [\n        'aws/*', // Put the route you have chosen here\n    ];\n}\n```\n\n### 2. Create an SNS Topic\nGo to https://console.aws.amazon.com/sns/v3/home (don't forget to select the right region for you).\n\nOn the right navigation bar, select \"Topics\" and click the \"Create topic\" button on your right.\nFor the Type, choose \"Standard\" and give a name to your Topic juste like \"MediaConvertJobUpdate\" and click \"Create topic\"\n\nNow, click \"Create subscription\" and select HTTPS for the \"Protocol\". Then enter the webhook route you have chosen like `https://app.example/aws/webhooks/media-convert` and confirm creation.\n\nBy 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.\n\n\n#### 3. Create an AWS CloudWatch rule\n1. Go to https://console.aws.amazon.com/cloudwatch/home (don't forget to select the right region for you).\n2. Open Events \u003e Rule from the left navigation bar.\n3. Click Create Rule.\nIn the Event Source panel select the \"Event pattern\" radio and \"Events by Services\" (it should be the default value)\nIn \"Service Name\", choose \"MediaConvert\" et keep  \"All Events\" for Event Type.\n\nYour Event pattern preview should be\n```json\n{\n  \"source\": [\n    \"aws.mediaconvert\"\n  ]\n}\n```\n\nIf you need to listen to only a specific queue for example, you can do it like that:\n```json\n{\n  \"source\": [\"aws.mediaconvert\"],\n  \"detail\": {\n    \"queue\": [\"arn:aws:mediaconvert:us-east-1:123456789:queues/Default\"]\n  }\n}\n```\n\nIn the Target panel (on the right), click \"Add Target\" and select \"SNS Topic\". Then select the previously created SNS Topic.\n\nThat's all, this package will dispatch Laravel events for you to listen.\nBut if you need more specific behavior, you can create your own controller by extending `AwsMediaConvertWebhookController` for example.\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n-   [Quentin Gabriele](https://github.com/QuentinGab)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinller%2Flaravel-aws-mediaconvert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinller%2Flaravel-aws-mediaconvert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinller%2Flaravel-aws-mediaconvert/lists"}