{"id":37007791,"url":"https://github.com/opencoconut/coconutphp","last_synced_at":"2026-01-14T00:49:19.321Z","repository":{"id":49113895,"uuid":"46866841","full_name":"opencoconut/coconutphp","owner":"opencoconut","description":"PHP client Library for encoding Videos with Coconut","archived":false,"fork":false,"pushed_at":"2024-06-18T12:08:40.000Z","size":525,"stargazers_count":17,"open_issues_count":3,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-02T15:44:54.164Z","etag":null,"topics":["api","dash","encoding","gif","hls","thumbnails","transcoding","video"],"latest_commit_sha":null,"homepage":"https://coconut.co","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opencoconut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-11-25T14:34:30.000Z","updated_at":"2025-02-27T09:07:08.000Z","dependencies_parsed_at":"2024-01-01T08:13:51.293Z","dependency_job_id":"46854b3c-1774-40d5-8c0f-a37b5cad76ef","html_url":"https://github.com/opencoconut/coconutphp","commit_stats":{"total_commits":34,"total_committers":4,"mean_commits":8.5,"dds":0.2647058823529411,"last_synced_commit":"1491bab1a2eb6bd9edae3f36997e647c2721e7f5"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/opencoconut/coconutphp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoconut%2Fcoconutphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoconut%2Fcoconutphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoconut%2Fcoconutphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoconut%2Fcoconutphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencoconut","download_url":"https://codeload.github.com/opencoconut/coconutphp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoconut%2Fcoconutphp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T00:40:43.272Z","status":"ssl_error","status_checked_at":"2026-01-14T00:40:42.636Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["api","dash","encoding","gif","hls","thumbnails","transcoding","video"],"created_at":"2026-01-14T00:49:19.209Z","updated_at":"2026-01-14T00:49:19.297Z","avatar_url":"https://github.com/opencoconut.png","language":"PHP","readme":"# Coconut PHP Library\n\nThe Coconut PHP library provides access to the Coconut API for encoding videos, packaging media files into HLS and MPEG-Dash, generating thumbnails and GIF animation.\n\nThis library is only compatible with the Coconut API v2.\n\n## Documentation\n\nSee the [full documentation](https://docs.coconut.co).\n\n## Installation\n\nTo install the Coconut PHP library, you need [composer](http://getcomposer.org) first:\n\n```console\ncurl -sS https://getcomposer.org/installer | php\n```\n\nEdit `composer.json`:\n\n```javascript\n{\n    \"require\": {\n        \"opencoconut/coconut\": \"3.*\"\n    }\n}\n```\n\nInstall the depencies by executing `composer`:\n\n```console\nphp composer.phar install\n```\n\n## Usage\n\nThe library needs you to set your API key which can be found in your [dashboard](https://app.coconut.co/api). Webhook URL and storage settings are optional but are very convenient because you set them only once.\n\n```php\n\u003c?php\n\nrequire_once('vendor/autoload.php');\n\n$coconut = new Coconut\\Client('k-api-key');\n\n$coconut-\u003enotification = [\n  'type' =\u003e 'http',\n  'url' =\u003e 'https://yoursite/api/coconut/webhook'\n];\n\n$coconut-\u003estorage = [\n  'service' =\u003e 's3',\n  'bucket' =\u003e 'my-bucket',\n  'region' =\u003e 'us-east-1',\n  'credentials' =\u003e [\n    'access_key_id' =\u003e 'access-key',\n    'secret_access_key' =\u003e 'secret-key'\n  ]\n];\n\n?\u003e\n```\n\n## Creating a job\n\n```php\n\u003c?php\n\ntry {\n  $job = $coconut-\u003ejob-\u003ecreate([\n    'input' =\u003e [ 'url' =\u003e 'https://mysite/path/file.mp4' ],\n    'outputs' =\u003e [\n      'jpg:300x' =\u003e [ 'path' =\u003e '/image.jpg' ],\n      'mp4:1080p' =\u003e [ 'path' =\u003e '/1080p.mp4' ],\n      'httpstream' =\u003e [\n        'hls' =\u003e [ 'path' =\u003e 'hls/' ]\n      ]\n    ]\n  ]);\n\n  print_r($job);\n\n} cacth(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n\n?\u003e\n```\n\n## Getting information about a job\n\n```php\n$job = $coconut-\u003ejob-\u003eretrieve('OolQXaiU86NFki');\n```\n\n## Retrieving metadata\n\n```php\n$metadata = $coconut-\u003emetadata-\u003eretrieve('OolQXaiU86NFki');\n```\n\n*Released under the [MIT license](http://www.opensource.org/licenses/mit-license.php).*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencoconut%2Fcoconutphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencoconut%2Fcoconutphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencoconut%2Fcoconutphp/lists"}