Giter Club home page Giter Club logo

laravel-coconutpalm's Introduction

laravel-coconutpalm

A Laravel 5 wrapper around coconut video encoding service library (for php).

This package is in its early development and there's still quite a lot of room for improvements. However, it's already working for simple Amazon S3 file uploads.

Feel free to read the official coconut documentation to see all the available features of the official package.

Installation

composer require codeurco/laravel-coconutpalm:dev-master

Add the service provider to your config\app.php file

Codeurco\Coconutpalm\CoconutpalmServiceProvider::class

You can also use the Facade to the aliases array:

'Coconutpalm' => Codeurco\Coconutpalm\Facades\Coconutpalm::class;

Configuration

To start using this package, you have to give the following info in your .env variables:

COCONUT_API_KEY=your_coconut_api_key

# used for local development
NGROK_TUNNEL_URL=ngrok_url

# currently only Amazon S3 is supported
COCONUT_CDN=s3

AWS_KEY=your_s3_key
AWS_SECRET=your_s3_secret
AWS_BUCKET=your_s3_bucket

Additionally you can change the default paths for you manipulated video files by published the configuration for this package. You will then be able to modify videos_source_path and videos_destination_path .

Usage

To start encoding a file simply use this code

use Codeurco\Coconutpalm\Facades\Coconutpalm;

...

Coconutpalm::encode('SomeVideo.mp4');

Where SomeVideo.mp4 points to a video located in your videos_source_path. The video will be renamed, a configuration file gets created and the encoding job is then started with Coconut.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

laravel-coconutpalm's People

Contributors

naimkhalifa avatar

Watchers

James Cloos avatar

Forkers

shermandahippo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.