Skip to content

omidrezasalari/cloudconvert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud Covert

Cloud Covert is a PHP library for converting .webm videos to mp4.

Installation

Use the package manager Composer to install cloud convert.

composer require omidrezasalari/cloudconvert

Set configuration

 # omidrezasalari\Cloudconvert\Classes\Convert::class
const API_KEY = "Your personal API..."
  • Set video Url that should be converted to mp4.
 # omidrezasalari\Cloudconvert\Classes\Url::class
 const URL = "Your video path";

Usage

require_once __DIR__ . '/vendor/autoload.php';

use Omidrezasalari\Cloudconvert\Classes\CloudConvert;
use Omidrezasalari\Cloudconvert\Classes\ConvertWithUrl;

# returns 'export_url'

$fileName="example.webm"


function clientCode(CloudConvert $client,string $fileName)
{

    $convertor=$client->createConvertor();

    echo $convertor->convert($fileName);
  
}

// Real example 

function clientCode(new ConvertWithUrl ,string $fileName)
{
    
    $convertor=$client->createConvertor();

    echo $convertor->convert($fileName);
    
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT