PHP code example of pxgamer / handbrake-php

1. Go to this page and download the library: Download pxgamer/handbrake-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pxgamer / handbrake-php example snippets




use pxgamer\Handbrake;

g();

// 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();
 bash
$ composer