2017 © Pedro Peláez
 

library coconut

Coconut is a Cloud Video Encoding Service built for developers

image

opencoconut/coconut

Coconut is a Cloud Video Encoding Service built for developers

  • Sunday, September 17, 2017
  • by sadikzzz
  • Repository
  • 3 Watchers
  • 9 Stars
  • 22,402 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 4 Versions
  • 11 % Grown

The README.md

Coconut PHP Library

The 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., (*1)

This library is only compatible with the Coconut API v2., (*2)

Documentation

See the full documentation., (*3)

Installation

To install the Coconut PHP library, you need composer first:, (*4)

curl -sS https://getcomposer.org/installer | php

Edit composer.json:, (*5)

{
    "require": {
        "opencoconut/coconut": "3.*"
    }
}

Install the depencies by executing composer:, (*6)

php composer.phar install

Usage

The library needs you to set your API key which can be found in your dashboard. Webhook URL and storage settings are optional but are very convenient because you set them only once., (*7)

notification = [
  'type' => 'http',
  'url' => 'https://yoursite/api/coconut/webhook'
];

$coconut->storage = [
  'service' => 's3',
  'bucket' => 'my-bucket',
  'region' => 'us-east-1',
  'credentials' => [
    'access_key_id' => 'access-key',
    'secret_access_key' => 'secret-key'
  ]
];

?>

Creating a job

job->create([
    'input' => [ 'url' => 'https://mysite/path/file.mp4' ],
    'outputs' => [
      'jpg:300x' => [ 'path' => '/image.jpg' ],
      'mp4:1080p' => [ 'path' => '/1080p.mp4' ],
      'httpstream' => [
        'hls' => [ 'path' => 'hls/' ]
      ]
    ]
  ]);

  print_r($job);

} cacth(Exception $e) {
  echo $e->getMessage();
}

?>

Getting information about a job

$job = $coconut->job->retrieve('OolQXaiU86NFki');

Retrieving metadata

$metadata = $coconut->metadata->retrieve('OolQXaiU86NFki');

Released under the MIT license., (*8)

The Versions

17/09 2017

dev-master

9999999-dev http://coconut.co

Coconut is a Cloud Video Encoding Service built for developers

  Sources   Download

MIT

The Development Requires

cloud video transcoding web service encoding h264

17/09 2017

2.4.0

2.4.0.0 http://coconut.co

Coconut is a Cloud Video Encoding Service built for developers

  Sources   Download

MIT

The Development Requires

cloud video transcoding web service encoding h264

16/02 2016

2.2.2

2.2.2.0 http://coconut.co

Coconut is a Cloud Video Encoding Service built for developers

  Sources   Download

MIT

The Development Requires

cloud video transcoding web service encoding h264

28/01 2016

2.2.1

2.2.1.0 http://coconut.co

Coconut is a Cloud Video Encoding Service built for developers

  Sources   Download

MIT

The Development Requires

cloud video transcoding web service encoding h264