pxgamer/handbrake-php

A PHP integration with the Handbrake CLI.

v2.0.0 2018-03-09 11:25 UTC

This package is auto-updated.

Last update: 2024-12-11 15:03:13 UTC


README

Latest Version on Packagist Software License Build Status Style CI Code Coverage Total Downloads

A PHP integration with the Handbrake CLI.

Structure

src/
tests/
vendor/

Install

Via Composer

$ composer require pxgamer/handbrake-php

Usage

<?php

use pxgamer\Handbrake;

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

$config = new Handbrake\Config();

// Set Type40 Defaults
$config->input = '/home/user/test.avi';
$config->output = '/var/www/';
$config->audioLanguage = 'English';
$config->bitRate = '384k';
$config->mixdown = '6ch';
$config->videoRate = '23.976';
$config->audioRate = '48';
$config->encodingScheme = 'x264';
$config->audioEncodingScheme = 'av_aac';
$config->quality = '25';
$config->frameRateType = 'cfr';
$config->additionalData =
    'level=4.1:cabac=1:ref=5:analyse=0x133:me=umh:subme=9:chroma-me=1:deadzone-inter=21:deadzone-intra=11:b-adapt=2:rc-lookahead=60:vbv-maxrate=10000:vbv-bufsize=10000:qpmax=69:bframes=4:b-adapt=2:direct=auto:crf-max=51:weightp=2:merange=24:chroma-qp-offset=-1:sync-lookahead=2:psy-rd=1.00,0.15:trellis=2:min-keyint=23:partitions=all';

$handbrake = new Handbrake\Handbrake($config);
echo $handbrake->run();

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email owzie123@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.