I am running Clipbucket script on my site blackporndom.com (a adult site) i would like to add a Text watermark in to the videos during processing – srt is fine – Below is the video processing script-
<?php
/**
* This is new file for conversion
* now , FFMPEG will only be used for video conversion
* @Author : Arslan Hassan
* @Software : ClipBucket
* @License : Attribution Assurance License — http://www.opensource.org/licenses/attribution.php – You Cannot MODIFY – REUSE THIS FILE
* @website : http://clip-bucket.com/
*/
define(“KEEP_MP4_AS_IS”,config(‘keep_mp4_as_is’));
define(“MP4Box_BINARY”,get_binaries(‘MP4Box’));
define(“FLVTool2_BINARY”,get_binaries(‘flvtool2′));
define(‘FFMPEG_BINARY’, get_binaries(‘ffmpeg’));
define(‘PROCESSESS_AT_ONCE’,config(‘max_conversion’));
class ffmpeg
{
var $input_details = array(); //Holds File value
var $output_details = array(); // Holds Converted File Details
var $ffmpeg ; // path to ffmpeg binary
var $input_file; //File to be converted
var $output_file; //File after $file is converted
var $tbl = ‘video_files’;
var $row_id ; //Db row id
var $log; //Holds overall status of conversion
var $start_time;
var $end_time;
var $total_time;
var $configs = array();
var $gen_thumbs; //If set to TRUE , it will generate thumbnails also
var $remove_input = TRUE;
var $gen_big_thumb = FALSE;
var $h264_single_pass = FALSE;
var $hq_output_file = ”;
var $log_file = ”;
var $input_ext = ”;
var $tmp_dir = ‘/’;
var $flvtool2 = ”;
var $flvtoolpp = ”;
var $thumb_dim = ’120×90′; //Thumbs Dimension
var $num_of_thumbs = ’3′; //Number of thumbs
var $big_thumb_dim = ‘original’; //Big thumb size , original will get orginal video window size thumb othersie the dimension
var $set_conv_lock = true;
var $lock_file = ”;
var $failed_reason = ”;
/**
* Initiating Class
*/
function ffmpeg($file)
{
global $Cbucket;
$this->ffmpeg = FFMPEG_BINARY;
$this->mp4box = MP4Box_BINARY;
$this->flvtool2 = FLVTool2_BINARY;
$this->flvtoolpp = $Cbucket->configs['flvtoolpp'];
$this->mplayerpath = $Cbucket->configs['mplayerpath'];
$this->input_file = $file;
}
/**
* Prepare file to be converted
* this will first get info of the file
* and enter its info into database
*/
function prepare($file=NULL)
{
global $db;
if($file)
$this->input_file = $file;
if(file_exists($this->input_file))
$this->input_file = $this->input_file;
else
$this->input_file = TEMP_DIR.’/’.$this->input_file;
//Checking File Exists
if(!file_exists($this->input_file))
{
$this->log(‘File Exists’,'No’);
}else{
$this->log(‘File Exists’,'Yes’);
}
//Get File info
$this->input_details = $this->get_file_info();
//Loging File Details
$this->log .= “nPreparing file…n”;
$this->log_file_info();
//Insert Info into database
//$this->insert_data();
}
/**
* Function used to convert video
*/
function convert($file=NULL)
{
global $db;
if($file)
$this->input_file = $file;
$this->log .= “rnConverting Videorn”;
$p = $this->configs;
$i = $this->input_details;
# Prepare the ffmpeg command to execute
if(isset($p['extra_options']))
$opt_av .= ” -y {$p['extra_options']} “;
# file format
if(isset($p['format']))
$opt_av .= ” -f {$p['format']} “;
# video codec
if(isset($p['video_codec']))
$opt_av .= ” -vcodec “.$p['video_codec'];
elseif(isset($i['video_codec']))
$opt_av .= ” -vcodec “.$i['video_codec'];
if($p['video_codec'] == ‘libx264′)
$opt_av .= ” -vpre normal “;
# video rate
if($p['use_video_rate'])
{
if(isset($p['video_rate']))
$vrate = $p['video_rate'];
elseif(isset($i['video_rate']))
$vrate = $i['video_rate'];
if(isset($p['video_max_rate'])